Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/build.properties1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconciler_1_1_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconciler.java)332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.configuration35
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml29
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/edit/policies/UMLBaseItemSemanticEditPolicy.java1788
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/PackageDiagramEditorFactory.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_1_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/clazzdiagram.configuration73
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml16
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java286
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateUMLModelCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/ModelCreationCommandBase.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/dialogs/CreateUmlElementDialog.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/EditableLabelForNodeEditPart.java1483
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/FilteringPaletteProvider.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalExtendedPaletteProvider.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PapyrusPaletteService.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteApplicator.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/StereotypeDisplayDiagramReconciler_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/StereotypeDisplayDiagramReconciler.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationLabelMigrationEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationMigrationEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationNestedMigrationEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationPropertiesMigrationEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler_1_1_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler.java)116
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomLifelineItemSemanticEditPolicyCN.java278
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.configuration35
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java262
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconciler_1_1_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconciler.java)152
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.configuration59
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconciler_1_1_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconciler.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/parsers/NamedElementLabelParser.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.configuration30
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconciler_1_1_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconciler.java)124
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.configuration17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml22
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/build.properties29
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/model/InteractionOverviewDiagram.configuration35
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.xml1423
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/policy/DiagramSemanticEditPolicy.java86
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/CreateProfileModelCommand.java116
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.configuration24
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src-gen/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/build.properties1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.configuration41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml26
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java290
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java292
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java292
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java286
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java260
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java284
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java290
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java290
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java286
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/migration/StateMachineReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/migration/StateMachineReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.configuration47
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.xml8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/StereotypeDisplayMigrationEditPolicyProvider.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/migration/TimingReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/migration/TimingReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/model/timingdiagram.configuration17
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/plugin.xml28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactLifelineCreateCommandCN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactStateInvariantCreateCommandCN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DestructionOccurrenceSpecificationCreateCommandCN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationConstraintCreateCommandCN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationObservationCreateCommandCN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullLifelineCreateCommandCN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullStateInvariantCreateCommandCN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GateCreateCommand.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GeneralOrderingCreateCommand.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/InteractionCreateCommandTN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/LifelineCreateCommand.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageOccurrenceSpecificationCreateCommandCN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/OccurrenceSpecificationCreateCommandCN.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeConstraintCreateCommand.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeObservationCreateCommand.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/migration/UseCaseReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/migration/UseCaseReconcilerForCompartment.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/migration/UseCaseReconciler_1_1_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/migration/UseCaseReconciler.java)152
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.configuration23
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.classpath14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.settings/org.eclipse.jdt.core.prefs590
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/META-INF/MANIFEST.MF5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/DiagramCategoryDescriptor.java179
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/DiagramCategoryRegistry.java156
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java106
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindContentProvider.java136
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/RepresentationKindComposite.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindComposite.java)736
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/RepresentationKindContentProvider.java82
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/messages/Messages.java41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/messages/messages.properties38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewModelFilePage.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectArchitectureContextPage.java252
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramCategoryPage.java471
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectRepresentationKindPage.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramKindPage.java)129
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/AbstractNewModelStorageProvider.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/INewModelStorageProvider.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/NewModelStorageProviderRegistry.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/WorkspaceNewModelStorageProvider.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/utils/SettingsHelper.java272
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateModelWizard.java1967
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateSeveralModelsWizard.java26
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/InitModelWizard.java478
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWithMultiModelsWizard.java194
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWizard.java316
139 files changed, 11765 insertions, 13129 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/build.properties
index 2e3d8ccd1c8..2043598e7aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/build.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/build.properties
@@ -11,7 +11,6 @@ bin.includes = .,\
about.html,\
custom-messages.properties,\
model/activityDiagram.elementtypesconfigurations,\
- model/activityDiagram.configuration,\
css/
jars.compile.order=.
src.includes = about.html
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconcilerForCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconcilerForCompartment_1_2_0.java
index dc44870c50f..b4e68d60a2e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconcilerForCompartment.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconcilerForCompartment_1_2_0.java
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.ReconcilerForCompartm
/**
* Class Diagram Reconciler for compartment from 1.1.0 to 1.2.0
*/
-public class ActivityReconcilerForCompartment extends ReconcilerForCompartment {
+public class ActivityReconcilerForCompartment_1_2_0 extends ReconcilerForCompartment {
private static final String ActivityActivityParametersCompartmentEditPart_VISUAL_ID = "7001";
private static final String ActivityActivityPreConditionsCompartmentEditPart_VISUAL_ID = "7002";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconciler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconciler_1_1_0.java
index af620dd4054..751629b38fe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconciler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/migration/ActivityReconciler_1_1_0.java
@@ -1,166 +1,166 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2015 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.migration;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.gmfdiag.common.commands.InsertFloatingLabelFromMapCommand;
-import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
-
-/**
- * Activity Diagram Reconciler from 1.0.0 to 1.1.0
- */
-public class ActivityReconciler extends DiagramReconciler {
-
- private final static String AcceptEventActionEditPart_VISUAL_ID = "3063";
- private final static String AcceptEventActionFloatingNameEditPart_VISUAL_ID = "6040";
- private final static String ActivityFinalNodeEditPart_VISUAL_ID = "3005";
- private final static String ActivityFinalNodeFloatingNameEditPart_VISUAL_ID = "5081";
- private final static String ActivityPartitionEditPart_VISUAL_ID = "3067";
- private final static String ActivityPartitionFloatingNameEditPart_VISUAL_ID = "6016";
- private final static String AddStructuralFeatureValueActionEditPart_VISUAL_ID = "3091";
- private final static String AddStructuralFeatureValueActionFloatingNameEditPart_VISUAL_ID = "6019";
- private final static String AddVariableValueActionEditPart_VISUAL_ID = "3099";
- private final static String AddVariableValueActionFloatingNameEditPart_VISUAL_ID = "6018";
- private final static String BroadcastSignalActionEditPart_VISUAL_ID = "3102";
- private final static String BroadcastSignalActionFloatingNameEditPart_VISUAL_ID = "6017";
- private final static String CallBehaviorActionEditPart_VISUAL_ID = "3008";
- private final static String CallBehaviorActionFloatingNameEditPart_VISUAL_ID = "6029";
- private final static String CallOperationActionEditPart_VISUAL_ID = "3010";
- private final static String CallOperationActionFloatingNameEditPart_VISUAL_ID = "6020";
- private final static String CentralBufferNodeEditPart_VISUAL_ID = "3104";
- private final static String CentralBufferNodeFloatingNameEditPart_VISUAL_ID = "6030";
- private final static String ClearAssociationActionEditPart_VISUAL_ID = "3119";
- private final static String ClearAssociationActionFloatingNameEditPart_VISUAL_ID = "5400";
- private final static String ClearStructuralFeatureActionEditPart_VISUAL_ID = "3115";
- private final static String ClearStructuralFeatureActionFloatingNameEditPart_VISUAL_ID = "5396";
- private final static String CreateLinkActionEditPart_VISUAL_ID = "3117";
- private final static String CreateLinkActionFloatingNameEditPart_VISUAL_ID = "5397";
- private final static String CreateLinkObjectActionEditPart_VISUAL_ID = "3198";
- private final static String CreateLinkObjectActionFloatingNameEditPart_VISUAL_ID = "5407";
- private final static String CreateObjectActionEditPart_VISUAL_ID = "3086";
- private final static String CreateObjectActionFloatingNameEditPart_VISUAL_ID = "6024";
- private final static String DataStoreNodeEditPart_VISUAL_ID = "3078";
- private final static String DataStoreNodeFloatingNameEditPart_VISUAL_ID = "6031";
- private final static String DecisionNodeEditPart_VISUAL_ID = "3038";
- private final static String DecisionNodeFloatingNameEditPart_VISUAL_ID = "6036";
- private final static String DestroyLinkActionEditPart_VISUAL_ID = "3118";
- private final static String DestroyLinkActionFloatingNameEditPart_VISUAL_ID = "5399";
- private final static String DestroyObjectActionEditPart_VISUAL_ID = "3095";
- private final static String DestroyObjectActionFloatingNameEditPart_VISUAL_ID = "6022";
- private final static String FlowFinalNodeEditPart_VISUAL_ID = "3006";
- private final static String FlowFinalNodeFloatingNameEditPart_VISUAL_ID = "6035";
- private final static String ForkNodeEditPart_VISUAL_ID = "3040";
- private final static String ForkNodeFloatingNameEditPart_VISUAL_ID = "6038";
- private final static String InitialNodeEditPart_VISUAL_ID = "3004";
- private final static String InitialNodeFloatingNameEditPart_VISUAL_ID = "6034";
- private final static String JoinNodeEditPart_VISUAL_ID = "3041";
- private final static String JoinNodeFloatingNameEditPart_VISUAL_ID = "6039";
- private final static String MergeNodeEditPart_VISUAL_ID = "3039";
- private final static String MergeNodeFloatingNameEditPart_VISUAL_ID = "6037";
- private final static String OpaqueActionEditPart_VISUAL_ID = "3007";
- private final static String OpaqueActionFloatingNameEditPart_VISUAL_ID = "6028";
- private final static String ReadExtentActionEditPart_VISUAL_ID = "3120";
- private final static String ReadExtentActionFloatingNameEditPart_VISUAL_ID = "5402";
- private final static String ReadIsClassifiedObjectActionEditPart_VISUAL_ID = "3122";
- private final static String ReadIsClassifiedObjectActionFloatingNameEditPart_VISUAL_ID = "5403";
- private final static String ReadLinkActionEditPart_VISUAL_ID = "3116";
- private final static String ReadLinkActionFloatingNameEditPart_VISUAL_ID = "5398";
- private final static String ReadSelfActionEditPart_VISUAL_ID = "3081";
- private final static String ReadSelfActionFloatingNameEditPart_VISUAL_ID = "6025";
- private final static String ReadStructuralFeatureActionEditPart_VISUAL_ID = "3088";
- private final static String ReadStructuralFeatureActionFloatingNameEditPart_VISUAL_ID = "6023";
- private final static String ReadVariableActionEditPart_VISUAL_ID = "3097";
- private final static String ReadVariableActionFloatingNameEditPart_VISUAL_ID = "6021";
- private final static String ReclassifyObjectActionEditPart_VISUAL_ID = "3221";
- private final static String ReclassifyObjectActionFloatingNameEditPart_VISUAL_ID = "5401";
- private final static String ReduceActionEditPart_VISUAL_ID = "3123";
- private final static String ReduceActionFloatingNameEditPart_VISUAL_ID = "5404";
- private final static String SendObjectActionEditPart_VISUAL_ID = "3042";
- private final static String SendObjectActionFloatingNameEditPart_VISUAL_ID = "6027";
- private final static String SendSignalActionEditPart_VISUAL_ID = "3052";
- private final static String SendSignalActionFloatingNameEditPart_VISUAL_ID = "6032";
- private final static String StartClassifierBehaviorActionEditPart_VISUAL_ID = "3124";
- private final static String StartClassifierBehaviorActionFloatingNameEditPart_VISUAL_ID = "5405";
- private final static String StartObjectBehavoiurActionEditPart_VISUAL_ID = "3113";
- private final static String StartObjectBehaviorActionFloatingNameEditPart_VISUAL_ID = "5394";
- private final static String TestIdentityActionEditPart_VISUAL_ID = "3114";
- private final static String TestIdentityActionFloatingNameEditPart_VISUAL_ID = "5395";
- private final static String ValueSpecificationActionEditPart_VISUAL_ID = "3076";
- private final static String ValueSpecificationActionFloatingNameEditPart_VISUAL_ID = "6026";
-
- /**
- * Gets the reconcile command.
- *
- * @param diagram
- * the diagram
- * @return the reconcile command
- * @see org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler#getReconcileCommand(org.eclipse.gmf.runtime.notation.Diagram)
- */
- @Override
- public ICommand getReconcileCommand(Diagram diagram) {
- return new InsertFloatingLabelFromMapCommand(diagram, getFloatingLabelMap());
- }
-
- /**
- * Gets the floating label map to add.
- *
- * @return the floating label map
- */
- private Map<String, String> getFloatingLabelMap() {
- Map<String, String> map = new HashMap<String, String>();
- map.put(AcceptEventActionEditPart_VISUAL_ID, AcceptEventActionFloatingNameEditPart_VISUAL_ID);
- map.put(ActivityFinalNodeEditPart_VISUAL_ID, ActivityFinalNodeFloatingNameEditPart_VISUAL_ID);
- map.put(ActivityPartitionEditPart_VISUAL_ID, ActivityPartitionFloatingNameEditPart_VISUAL_ID);
- map.put(AddStructuralFeatureValueActionEditPart_VISUAL_ID, AddStructuralFeatureValueActionFloatingNameEditPart_VISUAL_ID);
- map.put(AddVariableValueActionEditPart_VISUAL_ID, AddVariableValueActionFloatingNameEditPart_VISUAL_ID);
- map.put(BroadcastSignalActionEditPart_VISUAL_ID, BroadcastSignalActionFloatingNameEditPart_VISUAL_ID);
- map.put(CallBehaviorActionEditPart_VISUAL_ID, CallBehaviorActionFloatingNameEditPart_VISUAL_ID);
- map.put(CallOperationActionEditPart_VISUAL_ID, CallOperationActionFloatingNameEditPart_VISUAL_ID);
- map.put(CentralBufferNodeEditPart_VISUAL_ID, CentralBufferNodeFloatingNameEditPart_VISUAL_ID);
- map.put(ClearAssociationActionEditPart_VISUAL_ID, ClearAssociationActionFloatingNameEditPart_VISUAL_ID);
- map.put(ClearStructuralFeatureActionEditPart_VISUAL_ID, ClearStructuralFeatureActionFloatingNameEditPart_VISUAL_ID);
- map.put(CreateLinkActionEditPart_VISUAL_ID, CreateLinkActionFloatingNameEditPart_VISUAL_ID);
- map.put(CreateLinkObjectActionEditPart_VISUAL_ID, CreateLinkObjectActionFloatingNameEditPart_VISUAL_ID);
- map.put(CreateObjectActionEditPart_VISUAL_ID, CreateObjectActionFloatingNameEditPart_VISUAL_ID);
- map.put(DataStoreNodeEditPart_VISUAL_ID, DataStoreNodeFloatingNameEditPart_VISUAL_ID);
- map.put(DecisionNodeEditPart_VISUAL_ID, DecisionNodeFloatingNameEditPart_VISUAL_ID);
- map.put(DestroyLinkActionEditPart_VISUAL_ID, DestroyLinkActionFloatingNameEditPart_VISUAL_ID);
- map.put(DestroyObjectActionEditPart_VISUAL_ID, DestroyObjectActionFloatingNameEditPart_VISUAL_ID);
- map.put(FlowFinalNodeEditPart_VISUAL_ID, FlowFinalNodeFloatingNameEditPart_VISUAL_ID);
- map.put(ForkNodeEditPart_VISUAL_ID, ForkNodeFloatingNameEditPart_VISUAL_ID);
- map.put(InitialNodeEditPart_VISUAL_ID, InitialNodeFloatingNameEditPart_VISUAL_ID);
- map.put(JoinNodeEditPart_VISUAL_ID, JoinNodeFloatingNameEditPart_VISUAL_ID);
- map.put(MergeNodeEditPart_VISUAL_ID, MergeNodeFloatingNameEditPart_VISUAL_ID);
- map.put(OpaqueActionEditPart_VISUAL_ID, OpaqueActionFloatingNameEditPart_VISUAL_ID);
- map.put(ReadExtentActionEditPart_VISUAL_ID, ReadExtentActionFloatingNameEditPart_VISUAL_ID);
- map.put(ReadIsClassifiedObjectActionEditPart_VISUAL_ID, ReadIsClassifiedObjectActionFloatingNameEditPart_VISUAL_ID);
- map.put(ReadLinkActionEditPart_VISUAL_ID, ReadLinkActionFloatingNameEditPart_VISUAL_ID);
- map.put(ReadSelfActionEditPart_VISUAL_ID, ReadSelfActionFloatingNameEditPart_VISUAL_ID);
- map.put(ReadStructuralFeatureActionEditPart_VISUAL_ID, ReadStructuralFeatureActionFloatingNameEditPart_VISUAL_ID);
- map.put(ReadVariableActionEditPart_VISUAL_ID, ReadVariableActionFloatingNameEditPart_VISUAL_ID);
- map.put(ReclassifyObjectActionEditPart_VISUAL_ID, ReclassifyObjectActionFloatingNameEditPart_VISUAL_ID);
- map.put(ReduceActionEditPart_VISUAL_ID, ReduceActionFloatingNameEditPart_VISUAL_ID);
- map.put(SendObjectActionEditPart_VISUAL_ID, SendObjectActionFloatingNameEditPart_VISUAL_ID);
- map.put(SendSignalActionEditPart_VISUAL_ID, SendSignalActionFloatingNameEditPart_VISUAL_ID);
- map.put(StartClassifierBehaviorActionEditPart_VISUAL_ID, StartClassifierBehaviorActionFloatingNameEditPart_VISUAL_ID);
- map.put(StartObjectBehavoiurActionEditPart_VISUAL_ID, StartObjectBehaviorActionFloatingNameEditPart_VISUAL_ID);
- map.put(TestIdentityActionEditPart_VISUAL_ID, TestIdentityActionFloatingNameEditPart_VISUAL_ID);
- map.put(ValueSpecificationActionEditPart_VISUAL_ID, ValueSpecificationActionFloatingNameEditPart_VISUAL_ID);
-
- return map;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.migration;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.InsertFloatingLabelFromMapCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
+
+/**
+ * Activity Diagram Reconciler from 1.0.0 to 1.1.0
+ */
+public class ActivityReconciler_1_1_0 extends DiagramReconciler {
+
+ private final static String AcceptEventActionEditPart_VISUAL_ID = "3063";
+ private final static String AcceptEventActionFloatingNameEditPart_VISUAL_ID = "6040";
+ private final static String ActivityFinalNodeEditPart_VISUAL_ID = "3005";
+ private final static String ActivityFinalNodeFloatingNameEditPart_VISUAL_ID = "5081";
+ private final static String ActivityPartitionEditPart_VISUAL_ID = "3067";
+ private final static String ActivityPartitionFloatingNameEditPart_VISUAL_ID = "6016";
+ private final static String AddStructuralFeatureValueActionEditPart_VISUAL_ID = "3091";
+ private final static String AddStructuralFeatureValueActionFloatingNameEditPart_VISUAL_ID = "6019";
+ private final static String AddVariableValueActionEditPart_VISUAL_ID = "3099";
+ private final static String AddVariableValueActionFloatingNameEditPart_VISUAL_ID = "6018";
+ private final static String BroadcastSignalActionEditPart_VISUAL_ID = "3102";
+ private final static String BroadcastSignalActionFloatingNameEditPart_VISUAL_ID = "6017";
+ private final static String CallBehaviorActionEditPart_VISUAL_ID = "3008";
+ private final static String CallBehaviorActionFloatingNameEditPart_VISUAL_ID = "6029";
+ private final static String CallOperationActionEditPart_VISUAL_ID = "3010";
+ private final static String CallOperationActionFloatingNameEditPart_VISUAL_ID = "6020";
+ private final static String CentralBufferNodeEditPart_VISUAL_ID = "3104";
+ private final static String CentralBufferNodeFloatingNameEditPart_VISUAL_ID = "6030";
+ private final static String ClearAssociationActionEditPart_VISUAL_ID = "3119";
+ private final static String ClearAssociationActionFloatingNameEditPart_VISUAL_ID = "5400";
+ private final static String ClearStructuralFeatureActionEditPart_VISUAL_ID = "3115";
+ private final static String ClearStructuralFeatureActionFloatingNameEditPart_VISUAL_ID = "5396";
+ private final static String CreateLinkActionEditPart_VISUAL_ID = "3117";
+ private final static String CreateLinkActionFloatingNameEditPart_VISUAL_ID = "5397";
+ private final static String CreateLinkObjectActionEditPart_VISUAL_ID = "3198";
+ private final static String CreateLinkObjectActionFloatingNameEditPart_VISUAL_ID = "5407";
+ private final static String CreateObjectActionEditPart_VISUAL_ID = "3086";
+ private final static String CreateObjectActionFloatingNameEditPart_VISUAL_ID = "6024";
+ private final static String DataStoreNodeEditPart_VISUAL_ID = "3078";
+ private final static String DataStoreNodeFloatingNameEditPart_VISUAL_ID = "6031";
+ private final static String DecisionNodeEditPart_VISUAL_ID = "3038";
+ private final static String DecisionNodeFloatingNameEditPart_VISUAL_ID = "6036";
+ private final static String DestroyLinkActionEditPart_VISUAL_ID = "3118";
+ private final static String DestroyLinkActionFloatingNameEditPart_VISUAL_ID = "5399";
+ private final static String DestroyObjectActionEditPart_VISUAL_ID = "3095";
+ private final static String DestroyObjectActionFloatingNameEditPart_VISUAL_ID = "6022";
+ private final static String FlowFinalNodeEditPart_VISUAL_ID = "3006";
+ private final static String FlowFinalNodeFloatingNameEditPart_VISUAL_ID = "6035";
+ private final static String ForkNodeEditPart_VISUAL_ID = "3040";
+ private final static String ForkNodeFloatingNameEditPart_VISUAL_ID = "6038";
+ private final static String InitialNodeEditPart_VISUAL_ID = "3004";
+ private final static String InitialNodeFloatingNameEditPart_VISUAL_ID = "6034";
+ private final static String JoinNodeEditPart_VISUAL_ID = "3041";
+ private final static String JoinNodeFloatingNameEditPart_VISUAL_ID = "6039";
+ private final static String MergeNodeEditPart_VISUAL_ID = "3039";
+ private final static String MergeNodeFloatingNameEditPart_VISUAL_ID = "6037";
+ private final static String OpaqueActionEditPart_VISUAL_ID = "3007";
+ private final static String OpaqueActionFloatingNameEditPart_VISUAL_ID = "6028";
+ private final static String ReadExtentActionEditPart_VISUAL_ID = "3120";
+ private final static String ReadExtentActionFloatingNameEditPart_VISUAL_ID = "5402";
+ private final static String ReadIsClassifiedObjectActionEditPart_VISUAL_ID = "3122";
+ private final static String ReadIsClassifiedObjectActionFloatingNameEditPart_VISUAL_ID = "5403";
+ private final static String ReadLinkActionEditPart_VISUAL_ID = "3116";
+ private final static String ReadLinkActionFloatingNameEditPart_VISUAL_ID = "5398";
+ private final static String ReadSelfActionEditPart_VISUAL_ID = "3081";
+ private final static String ReadSelfActionFloatingNameEditPart_VISUAL_ID = "6025";
+ private final static String ReadStructuralFeatureActionEditPart_VISUAL_ID = "3088";
+ private final static String ReadStructuralFeatureActionFloatingNameEditPart_VISUAL_ID = "6023";
+ private final static String ReadVariableActionEditPart_VISUAL_ID = "3097";
+ private final static String ReadVariableActionFloatingNameEditPart_VISUAL_ID = "6021";
+ private final static String ReclassifyObjectActionEditPart_VISUAL_ID = "3221";
+ private final static String ReclassifyObjectActionFloatingNameEditPart_VISUAL_ID = "5401";
+ private final static String ReduceActionEditPart_VISUAL_ID = "3123";
+ private final static String ReduceActionFloatingNameEditPart_VISUAL_ID = "5404";
+ private final static String SendObjectActionEditPart_VISUAL_ID = "3042";
+ private final static String SendObjectActionFloatingNameEditPart_VISUAL_ID = "6027";
+ private final static String SendSignalActionEditPart_VISUAL_ID = "3052";
+ private final static String SendSignalActionFloatingNameEditPart_VISUAL_ID = "6032";
+ private final static String StartClassifierBehaviorActionEditPart_VISUAL_ID = "3124";
+ private final static String StartClassifierBehaviorActionFloatingNameEditPart_VISUAL_ID = "5405";
+ private final static String StartObjectBehavoiurActionEditPart_VISUAL_ID = "3113";
+ private final static String StartObjectBehaviorActionFloatingNameEditPart_VISUAL_ID = "5394";
+ private final static String TestIdentityActionEditPart_VISUAL_ID = "3114";
+ private final static String TestIdentityActionFloatingNameEditPart_VISUAL_ID = "5395";
+ private final static String ValueSpecificationActionEditPart_VISUAL_ID = "3076";
+ private final static String ValueSpecificationActionFloatingNameEditPart_VISUAL_ID = "6026";
+
+ /**
+ * Gets the reconcile command.
+ *
+ * @param diagram
+ * the diagram
+ * @return the reconcile command
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler#getReconcileCommand(org.eclipse.gmf.runtime.notation.Diagram)
+ */
+ @Override
+ public ICommand getReconcileCommand(Diagram diagram) {
+ return new InsertFloatingLabelFromMapCommand(diagram, getFloatingLabelMap());
+ }
+
+ /**
+ * Gets the floating label map to add.
+ *
+ * @return the floating label map
+ */
+ private Map<String, String> getFloatingLabelMap() {
+ Map<String, String> map = new HashMap<String, String>();
+ map.put(AcceptEventActionEditPart_VISUAL_ID, AcceptEventActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ActivityFinalNodeEditPart_VISUAL_ID, ActivityFinalNodeFloatingNameEditPart_VISUAL_ID);
+ map.put(ActivityPartitionEditPart_VISUAL_ID, ActivityPartitionFloatingNameEditPart_VISUAL_ID);
+ map.put(AddStructuralFeatureValueActionEditPart_VISUAL_ID, AddStructuralFeatureValueActionFloatingNameEditPart_VISUAL_ID);
+ map.put(AddVariableValueActionEditPart_VISUAL_ID, AddVariableValueActionFloatingNameEditPart_VISUAL_ID);
+ map.put(BroadcastSignalActionEditPart_VISUAL_ID, BroadcastSignalActionFloatingNameEditPart_VISUAL_ID);
+ map.put(CallBehaviorActionEditPart_VISUAL_ID, CallBehaviorActionFloatingNameEditPart_VISUAL_ID);
+ map.put(CallOperationActionEditPart_VISUAL_ID, CallOperationActionFloatingNameEditPart_VISUAL_ID);
+ map.put(CentralBufferNodeEditPart_VISUAL_ID, CentralBufferNodeFloatingNameEditPart_VISUAL_ID);
+ map.put(ClearAssociationActionEditPart_VISUAL_ID, ClearAssociationActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ClearStructuralFeatureActionEditPart_VISUAL_ID, ClearStructuralFeatureActionFloatingNameEditPart_VISUAL_ID);
+ map.put(CreateLinkActionEditPart_VISUAL_ID, CreateLinkActionFloatingNameEditPart_VISUAL_ID);
+ map.put(CreateLinkObjectActionEditPart_VISUAL_ID, CreateLinkObjectActionFloatingNameEditPart_VISUAL_ID);
+ map.put(CreateObjectActionEditPart_VISUAL_ID, CreateObjectActionFloatingNameEditPart_VISUAL_ID);
+ map.put(DataStoreNodeEditPart_VISUAL_ID, DataStoreNodeFloatingNameEditPart_VISUAL_ID);
+ map.put(DecisionNodeEditPart_VISUAL_ID, DecisionNodeFloatingNameEditPart_VISUAL_ID);
+ map.put(DestroyLinkActionEditPart_VISUAL_ID, DestroyLinkActionFloatingNameEditPart_VISUAL_ID);
+ map.put(DestroyObjectActionEditPart_VISUAL_ID, DestroyObjectActionFloatingNameEditPart_VISUAL_ID);
+ map.put(FlowFinalNodeEditPart_VISUAL_ID, FlowFinalNodeFloatingNameEditPart_VISUAL_ID);
+ map.put(ForkNodeEditPart_VISUAL_ID, ForkNodeFloatingNameEditPart_VISUAL_ID);
+ map.put(InitialNodeEditPart_VISUAL_ID, InitialNodeFloatingNameEditPart_VISUAL_ID);
+ map.put(JoinNodeEditPart_VISUAL_ID, JoinNodeFloatingNameEditPart_VISUAL_ID);
+ map.put(MergeNodeEditPart_VISUAL_ID, MergeNodeFloatingNameEditPart_VISUAL_ID);
+ map.put(OpaqueActionEditPart_VISUAL_ID, OpaqueActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ReadExtentActionEditPart_VISUAL_ID, ReadExtentActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ReadIsClassifiedObjectActionEditPart_VISUAL_ID, ReadIsClassifiedObjectActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ReadLinkActionEditPart_VISUAL_ID, ReadLinkActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ReadSelfActionEditPart_VISUAL_ID, ReadSelfActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ReadStructuralFeatureActionEditPart_VISUAL_ID, ReadStructuralFeatureActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ReadVariableActionEditPart_VISUAL_ID, ReadVariableActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ReclassifyObjectActionEditPart_VISUAL_ID, ReclassifyObjectActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ReduceActionEditPart_VISUAL_ID, ReduceActionFloatingNameEditPart_VISUAL_ID);
+ map.put(SendObjectActionEditPart_VISUAL_ID, SendObjectActionFloatingNameEditPart_VISUAL_ID);
+ map.put(SendSignalActionEditPart_VISUAL_ID, SendSignalActionFloatingNameEditPart_VISUAL_ID);
+ map.put(StartClassifierBehaviorActionEditPart_VISUAL_ID, StartClassifierBehaviorActionFloatingNameEditPart_VISUAL_ID);
+ map.put(StartObjectBehavoiurActionEditPart_VISUAL_ID, StartObjectBehaviorActionFloatingNameEditPart_VISUAL_ID);
+ map.put(TestIdentityActionEditPart_VISUAL_ID, TestIdentityActionFloatingNameEditPart_VISUAL_ID);
+ map.put(ValueSpecificationActionEditPart_VISUAL_ID, ValueSpecificationActionFloatingNameEditPart_VISUAL_ID);
+
+ return map;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.configuration
deleted file mode 100644
index e2468a0ce24..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.configuration
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
- <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_UzcgsHDtEeWh-MssWmCB_A" implementationID="PapyrusUMLActivityDiagram">
- <modelRules xmi:id="_UzcgsXDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Activity"/>
- </modelRules>
- <owningRules xmi:id="_UzcgsnDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Activity"/>
- </owningRules>
- <owningRules xmi:id="_Uzcgs3DtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/>
- <newModelPath xmi:id="_UzcgtHDtEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Activity">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
- </newModelPath>
- </owningRules>
- <owningRules xmi:id="_UzcgtXDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/>
- <newModelPath xmi:id="_UzcgtnDtEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Activity">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
- </newModelPath>
- </owningRules>
- <owningRules xmi:id="_Uzcgt3DtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <newModelPath xmi:id="_UzcguHDtEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Activity">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
- </newModelPath>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_UzcguXDtEeWh-MssWmCB_A"/>
- </modelKinds>
- </viewpoints>
- <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
- <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
-</configuration:PapyrusConfiguration>
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 ee9945c59d1..ca04d139eae 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
@@ -15,14 +15,6 @@
-->
<plugin>
- <extension
- point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
- <contribution
- file="model/activityDiagram.configuration"
- original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
- </contribution>
- </extension>
-
<extension point="org.eclipse.ui.contexts" id="ui-context">
<?gmfgen generated="true"?>
<context
@@ -3284,33 +3276,26 @@ self.structuralFeature.oclAsType(Property).opposite.type = self.object.type]]>
</mapping>
</diagramMappings>
</extension>
-<extension
- point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration">
- <elementTypeSet
- clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext"
- path="model/activityDiagram.elementtypesconfigurations">
- </elementTypeSet>
-</extension>
<extension
point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
<diagramReconciler
diagramType="PapyrusUMLActivityDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.activity.migration.ActivityReconciler"
- source="undefined"
- target="1.1.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.activity.migration.ActivityReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLActivityDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.activity.migration.ActivityReconcilerForCompartment"
- source="undefined"
- target="1.2.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.activity.migration.ActivityReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLActivityDiagram"
reconcilerClass="org.eclipse.papyrus.uml.diagram.activity.migration.ActivityReconciler_1_2_0"
source="1.1.0"
- target="1.2.0">
+ target="1.3.0">
</diagramReconciler>
</extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 5d9d13744e7..99f1dbde08e 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -1,894 +1,894 @@
-/*****************************************************************************
- * 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:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.policies;
-
-import java.util.Iterator;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
-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.MoveElementsCommand;
-import 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.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
-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.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.helpers.GeneratedEditHelperBase;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.activity.helper.CustomObjectFlowEditHelper;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.Action;
-import org.eclipse.uml2.uml.Activity;
-import org.eclipse.uml2.uml.ActivityEdge;
-import org.eclipse.uml2.uml.ActivityNode;
-import org.eclipse.uml2.uml.ActivityParameterNode;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.ControlFlow;
-import org.eclipse.uml2.uml.DecisionNode;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExceptionHandler;
-import org.eclipse.uml2.uml.ExecutableNode;
-import org.eclipse.uml2.uml.FinalNode;
-import org.eclipse.uml2.uml.ForkNode;
-import org.eclipse.uml2.uml.InitialNode;
-import org.eclipse.uml2.uml.InputPin;
-import org.eclipse.uml2.uml.JoinNode;
-import org.eclipse.uml2.uml.MergeNode;
-import org.eclipse.uml2.uml.ObjectFlow;
-import org.eclipse.uml2.uml.ObjectNode;
-import org.eclipse.uml2.uml.OutputPin;
-import org.eclipse.uml2.uml.StructuredActivityNode;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
-
- /**
- * Extended request data key to hold editpart visual id.
- *
- * @generated
- */
- public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
-
- /**
- * Extended request data key to hold the edge view during a reconnect request.
- *
- * @generated
- */
- public static final String GRAPHICAL_RECONNECTED_EDGE = "graphical_edge"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final IElementType myElementType;
-
- /**
- * @generated
- */
- protected UMLBaseItemSemanticEditPolicy(IElementType elementType) {
- myElementType = elementType;
- }
-
- /**
- * Extended request data key to hold editpart visual id.
- * Add visual id of edited editpart to extended data of the request
- * so command switch can decide what kind of diagram element is being edited.
- * It is done in those cases when it's not possible to deduce diagram
- * element kind from domain element.
- *
- * @generated
- */
- @Override
- @SuppressWarnings("unchecked")
- public Command getCommand(Request request) {
- if (request instanceof ReconnectRequest) {
- Object view = ((ReconnectRequest) request).getConnectionEditPart().getModel();
- if (view instanceof View) {
- String id = UMLVisualIDRegistry.getVisualID((View) view);
- request.getExtendedData().put(VISUAL_ID_KEY, id);
- request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, view);
- }
- }
- return super.getCommand(request);
- }
-
- /**
- * Returns visual id from request parameters.
- *
- * @generated
- */
- protected String getVisualID(IEditCommandRequest request) {
- return (String) request.getParameter(VISUAL_ID_KEY);
- }
-
- /**
- * @generated
- */
- @Override
- 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;
- }
- return semanticCommand;
- }
-
- /**
- * @generated
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
- }
-
- /**
- * @generated NOT adding the possibility to globally disabling a request
- */
- private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
- // disable the request if necessary
- if (requestIsDisabled(request)) {
- return null;
- }
- // return command for reorient, as this has already been computed through the edit helpers
- if (request instanceof ReorientRelationshipRequest) {
- return editPolicyCommand;
- }
- // generated code
- 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);
- if (requestContextElementType != null) {
- 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);
- }
- return new ICommandProxy(command);
- }
- }
- return editPolicyCommand;
- }
-
- /**
- * Check whether the request should be disabled.
- *
- * @param request
- * the request to analyze
- * @return true if the request must not succeed
- * @generated NOT
- */
- private boolean requestIsDisabled(IEditCommandRequest request) {
- if (request instanceof MoveRequest) {
- // prevent moving a constraint to another parent, since the representation would not be the same
- for (Object element : ((MoveRequest) request).getElementsToMove().keySet()) {
- if (element instanceof Constraint) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected IElementType getContextElementType(IEditCommandRequest request) {
- 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);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getConfigureCommand(ConfigureRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementEditService commandService = ElementEditServiceUtils
- .getCommandProvider(((IGraphicalEditPart) getHost()).resolveSemanticElement());
- if (req.getElementType() != null) {
- commandService = ElementEditServiceUtils.getCommandProvider(req.getElementType());
- }
-
- if (commandService == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- ICommand semanticCommand = commandService.getEditCommand(req);
-
- if ((semanticCommand != null) && (semanticCommand.canExecute())) {
- return getGEFWrapper(semanticCommand);
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType instanceof IElementType) {
- 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;
- }
-
- /**
- * @generated
- */
- protected ICommand getSemanticCreationCommand(CreateElementRequest req) {
- IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(req.getContainer());
- if (commandService == null) {
- return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
- }
- return commandService.getEditCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getSetCommand(SetRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getEditContextCommand(GetEditContextRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getMoveCommand(MoveRequest req) {
- EObject targetCEObject = req.getTargetContainer();
- if (targetCEObject != null) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
- if (provider != null) {
- ICommand moveCommand = provider.getEditCommand(req);
- if (moveCommand != null) {
- return new ICommandProxy(moveCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- } else {
- return getGEFWrapper(new MoveElementsCommand(req));
- }
-
- }
-
- /**
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected final Command getGEFWrapper(ICommand cmd) {
- return (cmd == null) ? UnexecutableCommand.INSTANCE : new ICommandProxy(cmd);
- }
-
- /**
- * Returns editing domain from the host edit part.
- *
- * @generated
- */
- protected TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart) getHost()).getEditingDomain();
- }
-
- /**
- * Clean all shortcuts to the host element from the same diagram
- *
- * @generated
- */
- 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() //$NON-NLS-1$
- || nextView.getElement() != view.getElement()) {
- continue;
- }
- cmd.add(new DeleteCommand(getEditingDomain(), nextView));
- }
- }
-
- /**
- * @generated
- */
- public static LinkConstraints getLinkConstraints() {
- LinkConstraints cached = UMLDiagramEditorPlugin.getInstance().getLinkConstraints();
- if (cached == null) {
- UMLDiagramEditorPlugin.getInstance().setLinkConstraints(cached = new LinkConstraints());
- }
- return cached;
- }
-
- /**
- * @generated
- */
- public static class LinkConstraints {
-
- /**
- * @generated
- */
- public LinkConstraints() { // use static method #getLinkConstraints() to access instance
- }
-
- /**
- * @generated
- */
- public boolean canCreateAction_LocalPreconditionEdge(Action source, Constraint target) {
- if (source != null) {
- if (source.getLocalPreconditions().contains(target)) {
- return false;
- }
- if (source == target) {
- return false;
- }
- }
-
- return canExistAction_LocalPreconditionEdge(source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateAction_LocalPostconditionEdge(Action source, Constraint target) {
- if (source != null) {
- if (source.getLocalPostconditions().contains(target)) {
- return false;
- }
- if (source == target) {
- return false;
- }
- }
-
- return canExistAction_LocalPostconditionEdge(source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateObjectFlow_Edge(Activity container, ActivityNode source, ActivityNode target) {
- return canExistObjectFlow_Edge(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateControlFlow_Edge(Activity container, ActivityNode source, ActivityNode target) {
- return canExistControlFlow_Edge(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateExceptionHandler_Edge(ExecutableNode container, ExecutableNode source,
- ObjectNode target) {
- return canExistExceptionHandler_Edge(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateComment_AnnotatedElementEdge(Comment source, Element target) {
- if (source != null) {
- if (source.getAnnotatedElements().contains(target)) {
- return false;
- }
- }
-
- return canExistComment_AnnotatedElementEdge(source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateConstraint_ConstrainedElementEdge(Constraint source, Element target) {
- if (source != null) {
- if (source.getConstrainedElements().contains(target)) {
- return false;
- }
- }
-
- return canExistConstraint_ConstrainedElementEdge(source, target);
- }
-
- /**
- * @generated
- */
- public boolean canExistAction_LocalPreconditionEdge(Action source, Constraint target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistAction_LocalPostconditionEdge(Action source, Constraint target) {
- return true;
- }
-
- /**
- * modify the generation to call explicitly custom helper
- *
- * @generated NOT
- */
- public boolean canExistObjectFlow_Edge(Activity container, ObjectFlow linkInstance, ActivityNode source,
- ActivityNode target) {
- try {
- if (source instanceof Action) {
- // rule validateObjectFlow_validateNoActions
- // rule workaround by addition of pins in case of Action
- if (!CustomObjectFlowEditHelper.canStartNewObjectFlow((Action) source)) {
- return false;
- }
- }
- if (source instanceof InputPin) {
- // rule validateInputPin_validateOutgoingEdgesStructuredOnly
- if (source.getOwner() instanceof StructuredActivityNode) {
- if (target != null && !source.getOwner().equals(target.getInStructuredNode())) {
- return false;
- }
- } else {
- return false;
- }
- }
- if (source instanceof InitialNode) {
- // rule validateInitialNode_validateControlEdges
- return false;
- }
- if (source instanceof FinalNode) {
- // rule validateFinalNode_validateNoOutgoingEdges
- return false;
- }
- if (source instanceof JoinNode) {
- // rule validateJoinNode_validateOneOutgoingEdge
- if (!source.getOutgoings().isEmpty()) {
- return false;
- }
- /*
- * rule validateJoinNode_validateIncomingObjectFlow :
- * We do not prevent creation of an outgoing ObjectFlow even if there is no incoming ObjectFlow.
- * We let the possibility that the user intends to add an incoming ObjectFlow later.
- */
- }
- if (source instanceof ForkNode) {
- // rule validateForkNode_validateEdges on source Fork node
- ActivityEdge outgoingControlFlow = source.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- ActivityEdge incomingControlFlow = source.getIncoming(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- if (outgoingControlFlow != null || incomingControlFlow != null) {
- // there is a ControlFlow which means there must be no ObjectFlow
- return false;
- }
- }
- if (source instanceof MergeNode) {
- // rule validateMergeNode_validateOneOutgoingEdge
- if (!source.getOutgoings().isEmpty()) {
- return false;
- }
- // rule validateMergeNode_validateEdges on source Merge node
- ActivityEdge outgoingControlFlow = source.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- ActivityEdge incomingControlFlow = source.getIncoming(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- if (outgoingControlFlow != null || incomingControlFlow != null) {
- // there is a ControlFlow which means there must be no ObjectFlow
- return false;
- }
- }
- if (source instanceof DecisionNode) {
- // rule validateDecisionNode_validateEdges on source Decision node
- ActivityEdge outgoingControlFlow = source.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- ActivityEdge incomingControlFlow = source.getIncoming(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- if (outgoingControlFlow != null || incomingControlFlow != null) {
- // there is a ControlFlow which means there must be no ObjectFlow
- return false;
- }
- }
- if (source instanceof ActivityParameterNode) {
- // rule validateActivityParameterNode_validateIncomingOrOutgoing
- EList<ActivityEdge> incomings = source.getIncomings();
- if (!incomings.isEmpty()) {
- return false;
- }
- }
- if (target instanceof Action) {
- // rule validateObjectFlow_validateNoActions
- // rule workaround by addition of pins in case of Action
- if (!CustomObjectFlowEditHelper.canEndNewObjectFlow((Action) target)) {
- return false;
- }
- }
- if (target instanceof OutputPin) {
- // rule validateOutputPin_validateIncomingEdgesStructuredOnly
- if (target.getOwner() instanceof StructuredActivityNode) {
- if (source != null && !target.getOwner().equals(source.getInStructuredNode())) {
- return false;
- }
- } else {
- return false;
- }
- }
- if (target instanceof InitialNode) {
- // rule validateInitialNode_validateNoIncomingEdges
- return false;
- }
- if (target instanceof JoinNode) {
- // rule validateJoinNode_validateIncomingObjectFlow
- ActivityEdge outgoingControlFlow = target.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- if (outgoingControlFlow != null) {
- // the outgoing edge is a ControlFlow which means there must be no incoming ObjectFlow
- return false;
- }
- }
- if (target instanceof ForkNode) {
- // rule validateForkNode_validateOneIncomingEdge
- if (!target.getIncomings().isEmpty()) {
- return false;
- }
- // rule validateForkNode_validateEdges on target Fork node
- ActivityEdge outgoingControlFlow = target.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- ActivityEdge incomingControlFlow = target.getIncoming(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- if (outgoingControlFlow != null || incomingControlFlow != null) {
- // there is a ControlFlow which means there must be no ObjectFlow
- return false;
- }
- }
- if (target instanceof MergeNode) {
- // rule validateMergeNode_validateEdges on target Merge node
- ActivityEdge outgoingControlFlow = target.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- ActivityEdge incomingControlFlow = target.getIncoming(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- if (outgoingControlFlow != null || incomingControlFlow != null) {
- // there is a ControlFlow which means there must be no ObjectFlow
- return false;
- }
- }
- if (target instanceof DecisionNode) {
- // rule validateDecisionNode_validateIncomingOutgoingEdges
- if (target.getIncomings().size() >= 2) {
- // no more than two incoming edges
- return false;
- }
- // rule validateDecisionNode_validateEdges on target Decision node
- ActivityEdge outgoingControlFlow = target.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- ActivityEdge incomingControlFlow = target.getIncoming(null, true,
- UMLPackage.eINSTANCE.getControlFlow());
- if (outgoingControlFlow != null || incomingControlFlow != null) {
- /*
- * There is a ControlFlow which means there must be no
- * ObjectFlow but the decision flow itself.
- * We let the user insert up to one ObjectFlow for being
- * able to select the decision flow among existing
- * input flows.
- */
- if (target.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow()) != null) {
- // there is already an object flow which is intended to become the decision flow
- return false;
- }
- }
- }
- if (target instanceof ActivityParameterNode) {
- // rule validateActivityParameterNode_validateIncomingOrOutgoing
- EList<ActivityEdge> outgoings = target.getOutgoings();
- if (!outgoings.isEmpty()) {
- return false;
- }
- }
- return true;
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * @generated
- */
- public boolean canExistControlFlow_Edge(Activity container, ControlFlow linkInstance, ActivityNode source,
- ActivityNode target) {
- try {
- if (source instanceof ObjectNode) {
- if (!((ObjectNode) source).isControlType()) {
- // rule validateControlFlow_validateObjectNodes
- return false;
- }
- }
- if (source instanceof InputPin) {
- // rule validateInputPin_validateOutgoingEdgesStructuredOnly
- if (source.getOwner() instanceof StructuredActivityNode) {
- if (target != null && !source.getOwner().equals(target.getInStructuredNode())) {
- return false;
- }
- } else {
- return false;
- }
- }
- if (source instanceof FinalNode) {
- // rule validateFinalNode_validateNoOutgoingEdges
- return false;
- }
- if (source instanceof JoinNode) {
- // rule validateJoinNode_validateOneOutgoingEdge
- if (!source.getOutgoings().isEmpty()) {
- return false;
- }
- // rule validateJoinNode_validateIncomingObjectFlow
- ActivityEdge incomingObjectFlow = source.getIncoming(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- if (incomingObjectFlow != null) {
- // the outgoing edge must be an ObjectFlow
- return false;
- }
- }
- if (source instanceof ForkNode) {
- // rule validateForkNode_validateEdges on source Fork node
- ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- ActivityEdge incomingObjectFlow = source.getIncoming(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- if (outgoingObjectFlow != null || incomingObjectFlow != null) {
- // there is an ObjectFlow which means there must be no ControlFlow
- return false;
- }
- }
- if (source instanceof MergeNode) {
- // rule validateMergeNode_validateOneOutgoingEdge
- if (!source.getOutgoings().isEmpty()) {
- return false;
- }
- // rule validateMergeNode_validateEdges on source Merge node
- ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- ActivityEdge incomingObjectFlow = source.getIncoming(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- if (outgoingObjectFlow != null || incomingObjectFlow != null) {
- // there is an ObjectFlow which means there must be no ControlFlow
- return false;
- }
- }
- if (source instanceof DecisionNode) {
- // rule validateDecisionNode_validateEdges on source Decision node
- ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- int incomingObjectFlowNumber = 0;
- for (ActivityEdge incomingEdge : source.getIncomings()) {
- if (incomingEdge instanceof ObjectFlow) {
- incomingObjectFlowNumber++;
- }
- }
- if (outgoingObjectFlow != null || incomingObjectFlowNumber > 1) {
- // there is an ObjectFlow (not intended for decisionInputFlow) which means there must be no ControlFlow
- return false;
- }
- }
- if (target instanceof ObjectNode) {
- if (!((ObjectNode) target).isControlType()) {
- // rule validateControlFlow_validateObjectNodes
- return false;
- }
- }
- if (target instanceof OutputPin) {
- // rule validateOutputPin_validateIncomingEdgesStructuredOnly
- if (target.getOwner() instanceof StructuredActivityNode) {
- if (source != null && !target.getOwner().equals(source.getInStructuredNode())) {
- return false;
- }
- } else {
- return false;
- }
- }
- if (target instanceof InitialNode) {
- // rule validateInitialNode_validateNoIncomingEdges
- return false;
- }
- if (target instanceof ForkNode) {
- // rule validateForkNode_validateOneIncomingEdge
- if (!target.getIncomings().isEmpty()) {
- return false;
- }
- // rule validateForkNode_validateEdges on target Fork node
- ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- ActivityEdge incomingObjectFlow = target.getIncoming(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- if (outgoingObjectFlow != null || incomingObjectFlow != null) {
- // there is an ObjectFlow which means there must be no ControlFlow
- return false;
- }
- }
- if (target instanceof MergeNode) {
- // rule validateMergeNode_validateEdges on target Merge node
- ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- ActivityEdge incomingObjectFlow = target.getIncoming(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- if (outgoingObjectFlow != null || incomingObjectFlow != null) {
- // there is an ObjectFlow which means there must be no ControlFlow
- return false;
- }
- }
- if (target instanceof DecisionNode) {
- // rule validateDecisionNode_validateIncomingOutgoingEdges
- if (target.getIncomings().size() >= 2) {
- // no more than two incoming edges
- return false;
- }
- // rule validateDecisionNode_validateEdges on target Decision node
- ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true,
- UMLPackage.eINSTANCE.getObjectFlow());
- ActivityEdge incomingObjectFlow = null;
- for (ActivityEdge incomingEdge : target.getIncomings()) {
- // filter the decision flow
- if (incomingEdge instanceof ObjectFlow
- && incomingEdge != ((DecisionNode) target).getDecisionInputFlow()) {
- incomingObjectFlow = incomingEdge;
- }
- }
- if (outgoingObjectFlow != null || incomingObjectFlow != null) {
- // there is an ObjectFlow which means there must be no ControlFlow
- return false;
- }
- }
- return true;
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * @generated
- */
- public boolean canExistExceptionHandler_Edge(ExecutableNode container, ExceptionHandler linkInstance,
- ExecutableNode source, ObjectNode target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistComment_AnnotatedElementEdge(Comment source, Element target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistConstraint_ConstrainedElementEdge(Constraint source, Element target) {
- return true;
- }
- }
-}
+/*****************************************************************************
+ * 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:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.policies;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
+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.MoveElementsCommand;
+import 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.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+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.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.helpers.GeneratedEditHelperBase;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.activity.helper.CustomObjectFlowEditHelper;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.Action;
+import org.eclipse.uml2.uml.Activity;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.ActivityNode;
+import org.eclipse.uml2.uml.ActivityParameterNode;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.ControlFlow;
+import org.eclipse.uml2.uml.DecisionNode;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExceptionHandler;
+import org.eclipse.uml2.uml.ExecutableNode;
+import org.eclipse.uml2.uml.FinalNode;
+import org.eclipse.uml2.uml.ForkNode;
+import org.eclipse.uml2.uml.InitialNode;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.JoinNode;
+import org.eclipse.uml2.uml.MergeNode;
+import org.eclipse.uml2.uml.ObjectFlow;
+import org.eclipse.uml2.uml.ObjectNode;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.StructuredActivityNode;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
+
+ /**
+ * Extended request data key to hold editpart visual id.
+ *
+ * @generated
+ */
+ public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
+
+ /**
+ * Extended request data key to hold the edge view during a reconnect request.
+ *
+ * @generated
+ */
+ public static final String GRAPHICAL_RECONNECTED_EDGE = "graphical_edge"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final IElementType myElementType;
+
+ /**
+ * @generated
+ */
+ protected UMLBaseItemSemanticEditPolicy(IElementType elementType) {
+ myElementType = elementType;
+ }
+
+ /**
+ * Extended request data key to hold editpart visual id.
+ * Add visual id of edited editpart to extended data of the request
+ * so command switch can decide what kind of diagram element is being edited.
+ * It is done in those cases when it's not possible to deduce diagram
+ * element kind from domain element.
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Command getCommand(Request request) {
+ if (request instanceof ReconnectRequest) {
+ Object view = ((ReconnectRequest) request).getConnectionEditPart().getModel();
+ if (view instanceof View) {
+ String id = UMLVisualIDRegistry.getVisualID((View) view);
+ request.getExtendedData().put(VISUAL_ID_KEY, id);
+ request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, view);
+ }
+ }
+ return super.getCommand(request);
+ }
+
+ /**
+ * Returns visual id from request parameters.
+ *
+ * @generated
+ */
+ protected String getVisualID(IEditCommandRequest request) {
+ return (String) request.getParameter(VISUAL_ID_KEY);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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;
+ }
+ return semanticCommand;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
+ Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
+ return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
+ }
+
+ /**
+ * @generated NOT adding the possibility to globally disabling a request
+ */
+ private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
+ // disable the request if necessary
+ if (requestIsDisabled(request)) {
+ return null;
+ }
+ // return command for reorient, as this has already been computed through the edit helpers
+ if (request instanceof ReorientRelationshipRequest) {
+ return editPolicyCommand;
+ }
+ // generated code
+ 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);
+ if (requestContextElementType != null) {
+ 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);
+ }
+ return new ICommandProxy(command);
+ }
+ }
+ return editPolicyCommand;
+ }
+
+ /**
+ * Check whether the request should be disabled.
+ *
+ * @param request
+ * the request to analyze
+ * @return true if the request must not succeed
+ * @generated NOT
+ */
+ private boolean requestIsDisabled(IEditCommandRequest request) {
+ if (request instanceof MoveRequest) {
+ // prevent moving a constraint to another parent, since the representation would not be the same
+ for (Object element : ((MoveRequest) request).getElementsToMove().keySet()) {
+ if (element instanceof Constraint) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected IElementType getContextElementType(IEditCommandRequest request) {
+ 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);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getConfigureCommand(ConfigureRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementEditService commandService = ElementEditServiceUtils
+ .getCommandProvider(((IGraphicalEditPart) getHost()).resolveSemanticElement());
+ if (req.getElementType() != null) {
+ commandService = ElementEditServiceUtils.getCommandProvider(req.getElementType(), req.getClientContext());
+ }
+
+ if (commandService == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ ICommand semanticCommand = commandService.getEditCommand(req);
+
+ if ((semanticCommand != null) && (semanticCommand.canExecute())) {
+ return getGEFWrapper(semanticCommand);
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if (requestElementType instanceof IElementType) {
+ 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;
+ }
+
+ /**
+ * @generated
+ */
+ protected ICommand getSemanticCreationCommand(CreateElementRequest req) {
+ IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(req.getContainer());
+ if (commandService == null) {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+ return commandService.getEditCommand(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getSetCommand(SetRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getEditContextCommand(GetEditContextRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDuplicateCommand(DuplicateElementsRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getMoveCommand(MoveRequest req) {
+ EObject targetCEObject = req.getTargetContainer();
+ if (targetCEObject != null) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
+ if (provider != null) {
+ ICommand moveCommand = provider.getEditCommand(req);
+ if (moveCommand != null) {
+ return new ICommandProxy(moveCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ } else {
+ return getGEFWrapper(new MoveElementsCommand(req));
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ protected final Command getGEFWrapper(ICommand cmd) {
+ return (cmd == null) ? UnexecutableCommand.INSTANCE : new ICommandProxy(cmd);
+ }
+
+ /**
+ * Returns editing domain from the host edit part.
+ *
+ * @generated
+ */
+ protected TransactionalEditingDomain getEditingDomain() {
+ return ((IGraphicalEditPart) getHost()).getEditingDomain();
+ }
+
+ /**
+ * Clean all shortcuts to the host element from the same diagram
+ *
+ * @generated
+ */
+ 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() //$NON-NLS-1$
+ || nextView.getElement() != view.getElement()) {
+ continue;
+ }
+ cmd.add(new DeleteCommand(getEditingDomain(), nextView));
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static LinkConstraints getLinkConstraints() {
+ LinkConstraints cached = UMLDiagramEditorPlugin.getInstance().getLinkConstraints();
+ if (cached == null) {
+ UMLDiagramEditorPlugin.getInstance().setLinkConstraints(cached = new LinkConstraints());
+ }
+ return cached;
+ }
+
+ /**
+ * @generated
+ */
+ public static class LinkConstraints {
+
+ /**
+ * @generated
+ */
+ public LinkConstraints() { // use static method #getLinkConstraints() to access instance
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateAction_LocalPreconditionEdge(Action source, Constraint target) {
+ if (source != null) {
+ if (source.getLocalPreconditions().contains(target)) {
+ return false;
+ }
+ if (source == target) {
+ return false;
+ }
+ }
+
+ return canExistAction_LocalPreconditionEdge(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateAction_LocalPostconditionEdge(Action source, Constraint target) {
+ if (source != null) {
+ if (source.getLocalPostconditions().contains(target)) {
+ return false;
+ }
+ if (source == target) {
+ return false;
+ }
+ }
+
+ return canExistAction_LocalPostconditionEdge(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateObjectFlow_Edge(Activity container, ActivityNode source, ActivityNode target) {
+ return canExistObjectFlow_Edge(container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateControlFlow_Edge(Activity container, ActivityNode source, ActivityNode target) {
+ return canExistControlFlow_Edge(container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateExceptionHandler_Edge(ExecutableNode container, ExecutableNode source,
+ ObjectNode target) {
+ return canExistExceptionHandler_Edge(container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateComment_AnnotatedElementEdge(Comment source, Element target) {
+ if (source != null) {
+ if (source.getAnnotatedElements().contains(target)) {
+ return false;
+ }
+ }
+
+ return canExistComment_AnnotatedElementEdge(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateConstraint_ConstrainedElementEdge(Constraint source, Element target) {
+ if (source != null) {
+ if (source.getConstrainedElements().contains(target)) {
+ return false;
+ }
+ }
+
+ return canExistConstraint_ConstrainedElementEdge(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistAction_LocalPreconditionEdge(Action source, Constraint target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistAction_LocalPostconditionEdge(Action source, Constraint target) {
+ return true;
+ }
+
+ /**
+ * modify the generation to call explicitly custom helper
+ *
+ * @generated NOT
+ */
+ public boolean canExistObjectFlow_Edge(Activity container, ObjectFlow linkInstance, ActivityNode source,
+ ActivityNode target) {
+ try {
+ if (source instanceof Action) {
+ // rule validateObjectFlow_validateNoActions
+ // rule workaround by addition of pins in case of Action
+ if (!CustomObjectFlowEditHelper.canStartNewObjectFlow((Action) source)) {
+ return false;
+ }
+ }
+ if (source instanceof InputPin) {
+ // rule validateInputPin_validateOutgoingEdgesStructuredOnly
+ if (source.getOwner() instanceof StructuredActivityNode) {
+ if (target != null && !source.getOwner().equals(target.getInStructuredNode())) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ if (source instanceof InitialNode) {
+ // rule validateInitialNode_validateControlEdges
+ return false;
+ }
+ if (source instanceof FinalNode) {
+ // rule validateFinalNode_validateNoOutgoingEdges
+ return false;
+ }
+ if (source instanceof JoinNode) {
+ // rule validateJoinNode_validateOneOutgoingEdge
+ if (!source.getOutgoings().isEmpty()) {
+ return false;
+ }
+ /*
+ * rule validateJoinNode_validateIncomingObjectFlow :
+ * We do not prevent creation of an outgoing ObjectFlow even if there is no incoming ObjectFlow.
+ * We let the possibility that the user intends to add an incoming ObjectFlow later.
+ */
+ }
+ if (source instanceof ForkNode) {
+ // rule validateForkNode_validateEdges on source Fork node
+ ActivityEdge outgoingControlFlow = source.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ ActivityEdge incomingControlFlow = source.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ if (outgoingControlFlow != null || incomingControlFlow != null) {
+ // there is a ControlFlow which means there must be no ObjectFlow
+ return false;
+ }
+ }
+ if (source instanceof MergeNode) {
+ // rule validateMergeNode_validateOneOutgoingEdge
+ if (!source.getOutgoings().isEmpty()) {
+ return false;
+ }
+ // rule validateMergeNode_validateEdges on source Merge node
+ ActivityEdge outgoingControlFlow = source.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ ActivityEdge incomingControlFlow = source.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ if (outgoingControlFlow != null || incomingControlFlow != null) {
+ // there is a ControlFlow which means there must be no ObjectFlow
+ return false;
+ }
+ }
+ if (source instanceof DecisionNode) {
+ // rule validateDecisionNode_validateEdges on source Decision node
+ ActivityEdge outgoingControlFlow = source.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ ActivityEdge incomingControlFlow = source.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ if (outgoingControlFlow != null || incomingControlFlow != null) {
+ // there is a ControlFlow which means there must be no ObjectFlow
+ return false;
+ }
+ }
+ if (source instanceof ActivityParameterNode) {
+ // rule validateActivityParameterNode_validateIncomingOrOutgoing
+ EList<ActivityEdge> incomings = source.getIncomings();
+ if (!incomings.isEmpty()) {
+ return false;
+ }
+ }
+ if (target instanceof Action) {
+ // rule validateObjectFlow_validateNoActions
+ // rule workaround by addition of pins in case of Action
+ if (!CustomObjectFlowEditHelper.canEndNewObjectFlow((Action) target)) {
+ return false;
+ }
+ }
+ if (target instanceof OutputPin) {
+ // rule validateOutputPin_validateIncomingEdgesStructuredOnly
+ if (target.getOwner() instanceof StructuredActivityNode) {
+ if (source != null && !target.getOwner().equals(source.getInStructuredNode())) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ if (target instanceof InitialNode) {
+ // rule validateInitialNode_validateNoIncomingEdges
+ return false;
+ }
+ if (target instanceof JoinNode) {
+ // rule validateJoinNode_validateIncomingObjectFlow
+ ActivityEdge outgoingControlFlow = target.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ if (outgoingControlFlow != null) {
+ // the outgoing edge is a ControlFlow which means there must be no incoming ObjectFlow
+ return false;
+ }
+ }
+ if (target instanceof ForkNode) {
+ // rule validateForkNode_validateOneIncomingEdge
+ if (!target.getIncomings().isEmpty()) {
+ return false;
+ }
+ // rule validateForkNode_validateEdges on target Fork node
+ ActivityEdge outgoingControlFlow = target.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ ActivityEdge incomingControlFlow = target.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ if (outgoingControlFlow != null || incomingControlFlow != null) {
+ // there is a ControlFlow which means there must be no ObjectFlow
+ return false;
+ }
+ }
+ if (target instanceof MergeNode) {
+ // rule validateMergeNode_validateEdges on target Merge node
+ ActivityEdge outgoingControlFlow = target.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ ActivityEdge incomingControlFlow = target.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ if (outgoingControlFlow != null || incomingControlFlow != null) {
+ // there is a ControlFlow which means there must be no ObjectFlow
+ return false;
+ }
+ }
+ if (target instanceof DecisionNode) {
+ // rule validateDecisionNode_validateIncomingOutgoingEdges
+ if (target.getIncomings().size() >= 2) {
+ // no more than two incoming edges
+ return false;
+ }
+ // rule validateDecisionNode_validateEdges on target Decision node
+ ActivityEdge outgoingControlFlow = target.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ ActivityEdge incomingControlFlow = target.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getControlFlow());
+ if (outgoingControlFlow != null || incomingControlFlow != null) {
+ /*
+ * There is a ControlFlow which means there must be no
+ * ObjectFlow but the decision flow itself.
+ * We let the user insert up to one ObjectFlow for being
+ * able to select the decision flow among existing
+ * input flows.
+ */
+ if (target.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow()) != null) {
+ // there is already an object flow which is intended to become the decision flow
+ return false;
+ }
+ }
+ }
+ if (target instanceof ActivityParameterNode) {
+ // rule validateActivityParameterNode_validateIncomingOrOutgoing
+ EList<ActivityEdge> outgoings = target.getOutgoings();
+ if (!outgoings.isEmpty()) {
+ return false;
+ }
+ }
+ return true;
+ } catch (Exception e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
+ return false;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistControlFlow_Edge(Activity container, ControlFlow linkInstance, ActivityNode source,
+ ActivityNode target) {
+ try {
+ if (source instanceof ObjectNode) {
+ if (!((ObjectNode) source).isControlType()) {
+ // rule validateControlFlow_validateObjectNodes
+ return false;
+ }
+ }
+ if (source instanceof InputPin) {
+ // rule validateInputPin_validateOutgoingEdgesStructuredOnly
+ if (source.getOwner() instanceof StructuredActivityNode) {
+ if (target != null && !source.getOwner().equals(target.getInStructuredNode())) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ if (source instanceof FinalNode) {
+ // rule validateFinalNode_validateNoOutgoingEdges
+ return false;
+ }
+ if (source instanceof JoinNode) {
+ // rule validateJoinNode_validateOneOutgoingEdge
+ if (!source.getOutgoings().isEmpty()) {
+ return false;
+ }
+ // rule validateJoinNode_validateIncomingObjectFlow
+ ActivityEdge incomingObjectFlow = source.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ if (incomingObjectFlow != null) {
+ // the outgoing edge must be an ObjectFlow
+ return false;
+ }
+ }
+ if (source instanceof ForkNode) {
+ // rule validateForkNode_validateEdges on source Fork node
+ ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ ActivityEdge incomingObjectFlow = source.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ if (outgoingObjectFlow != null || incomingObjectFlow != null) {
+ // there is an ObjectFlow which means there must be no ControlFlow
+ return false;
+ }
+ }
+ if (source instanceof MergeNode) {
+ // rule validateMergeNode_validateOneOutgoingEdge
+ if (!source.getOutgoings().isEmpty()) {
+ return false;
+ }
+ // rule validateMergeNode_validateEdges on source Merge node
+ ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ ActivityEdge incomingObjectFlow = source.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ if (outgoingObjectFlow != null || incomingObjectFlow != null) {
+ // there is an ObjectFlow which means there must be no ControlFlow
+ return false;
+ }
+ }
+ if (source instanceof DecisionNode) {
+ // rule validateDecisionNode_validateEdges on source Decision node
+ ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ int incomingObjectFlowNumber = 0;
+ for (ActivityEdge incomingEdge : source.getIncomings()) {
+ if (incomingEdge instanceof ObjectFlow) {
+ incomingObjectFlowNumber++;
+ }
+ }
+ if (outgoingObjectFlow != null || incomingObjectFlowNumber > 1) {
+ // there is an ObjectFlow (not intended for decisionInputFlow) which means there must be no ControlFlow
+ return false;
+ }
+ }
+ if (target instanceof ObjectNode) {
+ if (!((ObjectNode) target).isControlType()) {
+ // rule validateControlFlow_validateObjectNodes
+ return false;
+ }
+ }
+ if (target instanceof OutputPin) {
+ // rule validateOutputPin_validateIncomingEdgesStructuredOnly
+ if (target.getOwner() instanceof StructuredActivityNode) {
+ if (source != null && !target.getOwner().equals(source.getInStructuredNode())) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ if (target instanceof InitialNode) {
+ // rule validateInitialNode_validateNoIncomingEdges
+ return false;
+ }
+ if (target instanceof ForkNode) {
+ // rule validateForkNode_validateOneIncomingEdge
+ if (!target.getIncomings().isEmpty()) {
+ return false;
+ }
+ // rule validateForkNode_validateEdges on target Fork node
+ ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ ActivityEdge incomingObjectFlow = target.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ if (outgoingObjectFlow != null || incomingObjectFlow != null) {
+ // there is an ObjectFlow which means there must be no ControlFlow
+ return false;
+ }
+ }
+ if (target instanceof MergeNode) {
+ // rule validateMergeNode_validateEdges on target Merge node
+ ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ ActivityEdge incomingObjectFlow = target.getIncoming(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ if (outgoingObjectFlow != null || incomingObjectFlow != null) {
+ // there is an ObjectFlow which means there must be no ControlFlow
+ return false;
+ }
+ }
+ if (target instanceof DecisionNode) {
+ // rule validateDecisionNode_validateIncomingOutgoingEdges
+ if (target.getIncomings().size() >= 2) {
+ // no more than two incoming edges
+ return false;
+ }
+ // rule validateDecisionNode_validateEdges on target Decision node
+ ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true,
+ UMLPackage.eINSTANCE.getObjectFlow());
+ ActivityEdge incomingObjectFlow = null;
+ for (ActivityEdge incomingEdge : target.getIncomings()) {
+ // filter the decision flow
+ if (incomingEdge instanceof ObjectFlow
+ && incomingEdge != ((DecisionNode) target).getDecisionInputFlow()) {
+ incomingObjectFlow = incomingEdge;
+ }
+ }
+ if (outgoingObjectFlow != null || incomingObjectFlow != null) {
+ // there is an ObjectFlow which means there must be no ControlFlow
+ return false;
+ }
+ }
+ return true;
+ } catch (Exception e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
+ return false;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistExceptionHandler_Edge(ExecutableNode container, ExceptionHandler linkInstance,
+ ExecutableNode source, ObjectNode target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistComment_AnnotatedElementEdge(Comment source, Element target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistConstraint_ConstrainedElementEdge(Constraint source, Element target) {
+ return true;
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/PackageDiagramEditorFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/PackageDiagramEditorFactory.java
index 543bb725198..ae71ceb7538 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/PackageDiagramEditorFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/PackageDiagramEditorFactory.java
@@ -1,84 +1,87 @@
-/*****************************************************************************
- * 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.uml.diagram.clazz;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-
-/**
- * Factory for legacy package diagrams tht migrates them to the viewpoints-defined ones
- *
- * @author Laurent Wouters
- *
- */
-public class PackageDiagramEditorFactory extends GmfEditorFactory {
-
- /**
- * Initializes this factory
- */
- public PackageDiagramEditorFactory() {
- super(UmlClassDiagramForMultiEditor.class, "Package");
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory#createIPageModel(java.lang.Object)
- */
- @Override
- public IPageModel createIPageModel(Object pageIdentifier) {
- migrate((Diagram) pageIdentifier);
- return super.createIPageModel(pageIdentifier);
- }
-
- /**
- * Migrate the given package diagram to the viewpoints-defined one
- *
- * @param diagram
- * The diagram to migrate
- */
- private void migrate(final Diagram diagram) {
- TransactionalEditingDomain domain = null;
- try {
- domain = ServiceUtilsForResourceSet.getInstance().getTransactionalEditingDomain(diagram.eResource().getResourceSet());
- } catch (ServiceException e) {
- return;
- }
- domain.getCommandStack().execute(new AbstractCommand() {
- @Override
- public void execute() {
- ViewPrototype proto = DiagramUtils.getPrototype(diagram);
- DiagramUtils.setPrototype(diagram, proto);
- diagram.setType("PapyrusUMLClassDiagram");
- }
-
- @Override
- public void redo() {
- execute();
- }
-
- @Override
- public boolean canExecute() {
- return true;
- }
- });
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramPrototype;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * Factory for legacy package diagrams tht migrates them to the viewpoints-defined ones
+ *
+ * @author Laurent Wouters
+ *
+ */
+public class PackageDiagramEditorFactory extends GmfEditorFactory {
+
+ /**
+ * Initializes this factory
+ */
+ public PackageDiagramEditorFactory() {
+ super(UmlClassDiagramForMultiEditor.class, "Package");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory#createIPageModel(java.lang.Object)
+ */
+ @Override
+ public IPageModel createIPageModel(Object pageIdentifier) {
+ migrate((Diagram) pageIdentifier);
+ return super.createIPageModel(pageIdentifier);
+ }
+
+ /**
+ * Migrate the given package diagram to the viewpoints-defined one
+ *
+ * @param diagram
+ * The diagram to migrate
+ */
+ private void migrate(final Diagram diagram) {
+ TransactionalEditingDomain domain = null;
+ try {
+ domain = ServiceUtilsForResourceSet.getInstance().getTransactionalEditingDomain(diagram.eResource().getResourceSet());
+ } catch (ServiceException e) {
+ return;
+ }
+ domain.getCommandStack().execute(new AbstractCommand() {
+ @Override
+ public void execute() {
+ ViewPrototype proto = DiagramUtils.getPrototype(diagram);
+ if (proto instanceof DiagramPrototype) {
+ DiagramUtils.setPrototype(diagram, (DiagramPrototype) proto);
+ diagram.setType("PapyrusUMLClassDiagram");
+ }
+ }
+
+ @Override
+ public void redo() {
+ execute();
+ }
+
+ @Override
+ public boolean canExecute() {
+ return true;
+ }
+ });
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment_1_2_0.java
index 567e742ec06..3bac8ed066e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconcilerForCompartment_1_2_0.java
@@ -20,7 +20,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.ReconcilerForCompartm
/**
* Diagram Reconciler for compartment from 1.1.0 to 1.2.0
*/
-public class ClassReconcilerForCompartment extends ReconcilerForCompartment {
+public class ClassReconcilerForCompartment_1_2_0 extends ReconcilerForCompartment {
private static final String ClassAttributeCompartmentEditPart_VISUAL_ID = "7017"; //$NON-NLS-1$
private static final String ClassOperationCompartmentEditPart_VISUAL_ID = "7018"; //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_1_0.java
index ab5beda8092..c883e42f143 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/migration/ClassReconciler_1_1_0.java
@@ -35,7 +35,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
/**
* Class Diagram Reconciler from 1.0.0 to 1.1.0
*/
-public class ClassReconciler extends DiagramReconciler {
+public class ClassReconciler_1_1_0 extends DiagramReconciler {
private final static String CONTAINMENT_LINK_OLD_VISUAL_ID = "4022"; //$NON-NLS-1$
private final static String CONTAINMENT_LINK_NEW_VISUAL_ID = "4023"; //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/clazzdiagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/clazzdiagram.configuration
deleted file mode 100644
index 77d0c8d003c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/clazzdiagram.configuration
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
- <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_zzf4YHDtEeWh-MssWmCB_A" name="Inner Class Diagram" icon="platform:/plugin/org.eclipse.papyrus.uml.diagram.clazz/icons/obj16/Diagram_Class.gif" implementationID="PapyrusUMLClassDiagram">
- <modelRules xmi:id="_zzf4YXDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </modelRules>
- <owningRules xmi:id="_zzf4YnDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </owningRules>
- <owningRules xmi:id="_zzf4Y3DtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_zzf4ZHDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier"/>
- <origin href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- <insertionPath xmi:id="_zzf4ZXDtEeWh-MssWmCB_A">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
- </insertionPath>
- </childRules>
- <childRules xmi:id="_zzf4ZnDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Comment"/>
- <origin href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- <insertionPath xmi:id="_zzf4Z3DtEeWh-MssWmCB_A">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedComment"/>
- </insertionPath>
- </childRules>
- <paletteRules xmi:id="_zzf4aHDtEeWh-MssWmCB_A" element="clazz.tool.class"/>
- <paletteRules xmi:id="_zzf4aXDtEeWh-MssWmCB_A" element="clazz.tool.comment"/>
- <paletteRules xmi:id="_zzf4anDtEeWh-MssWmCB_A" element="clazz.tool.interface"/>
- <paletteRules xmi:id="_zzf4a3DtEeWh-MssWmCB_A" element="clazz.tool.abstraction"/>
- <paletteRules xmi:id="_zzf4bHDtEeWh-MssWmCB_A" element="clazz.tool.association"/>
- <paletteRules xmi:id="_zzf4bXDtEeWh-MssWmCB_A" element="clazz.tool.generalization"/>
- <paletteRules xmi:id="_zzf4bnDtEeWh-MssWmCB_A" element="clazz.tool.generalizationset"/>
- <paletteRules xmi:id="_zzf4b3DtEeWh-MssWmCB_A" permit="false" element="clazz.tool.*"/>
- <paletteRules xmi:id="_zzf4cHDtEeWh-MssWmCB_A" element=""/>
- </modelKinds>
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_zzf4cXDtEeWh-MssWmCB_A" name="Package Diagram" icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/Diagram_Package.gif" implementationID="PapyrusUMLClassDiagram">
- <modelRules xmi:id="_zzf4cnDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </modelRules>
- <owningRules xmi:id="_zzf4c3DtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_zzf4dHDtEeWh-MssWmCB_A"/>
- <paletteRules xmi:id="_zzf4dXDtEeWh-MssWmCB_A" element="clazz.tool.comment"/>
- <paletteRules xmi:id="_zzf4dnDtEeWh-MssWmCB_A" element="clazz.tool.constraint"/>
- <paletteRules xmi:id="_zzf4d3DtEeWh-MssWmCB_A" element="clazz.tool.model"/>
- <paletteRules xmi:id="_zzf4eHDtEeWh-MssWmCB_A" element="clazz.tool.package"/>
- <paletteRules xmi:id="_zzf4eXDtEeWh-MssWmCB_A" element="clazz.tool.abstraction"/>
- <paletteRules xmi:id="_zzf4enDtEeWh-MssWmCB_A" element="clazz.tool.dependency"/>
- <paletteRules xmi:id="_zzf4e3DtEeWh-MssWmCB_A" element="clazz.tool.packageimport"/>
- <paletteRules xmi:id="_zzf4fHDtEeWh-MssWmCB_A" element="clazz.tool.link"/>
- <paletteRules xmi:id="_zzf4fXDtEeWh-MssWmCB_A" element="clazz.tool.containmentlink"/>
- <paletteRules xmi:id="_zzf4fnDtEeWh-MssWmCB_A" permit="false" element="clazz.tool.*"/>
- <paletteRules xmi:id="_zzf4f3DtEeWh-MssWmCB_A" element=""/>
- </modelKinds>
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_zzf4gHDtEeWh-MssWmCB_A" implementationID="PapyrusUMLClassDiagram">
- <modelRules xmi:id="_zzf4gXDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </modelRules>
- <owningRules xmi:id="_zzf4gnDtEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_zzf4g3DtEeWh-MssWmCB_A"/>
- </modelKinds>
- </viewpoints>
- <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
- <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
-</configuration:PapyrusConfiguration>
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 5d516983f83..0786511df3b 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
@@ -15,14 +15,6 @@
-->
<plugin>
- <extension
- point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
- <contribution
- file="model/clazzdiagram.configuration"
- original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
- </contribution>
- </extension>
-
<extension point="org.eclipse.ui.contexts" id="ui-context">
<?gmfgen generated="true"?>
<context
@@ -1688,13 +1680,6 @@
<?gmfgen generated="true"?>
</extension>
<extension
- point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration">
- <elementTypeSet
- clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext"
- path="model/classdiagram.elementtypesconfigurations">
- </elementTypeSet>
-</extension>
-<extension
point="org.eclipse.papyrus.infra.gmfdiag.assistant.modelProviders">
<modelProvider
uri="model/classdiagram.assistants"></modelProvider>
@@ -1703,21 +1688,21 @@
point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
<diagramReconciler
diagramType="PapyrusUMLClassDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconciler"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconciler_1_1_0"
source="1.0.0"
- target="1.1.0">
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLClassDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconcilerForCompartment"
- source="1.0.0"
- target="1.2.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLClassDiagram"
reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconciler_1_2_0"
source="1.1.0"
- target="1.2.0">
+ target="1.3.0">
</diagramReconciler>
</extension>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml
index 470b3d50ce4..d98fa765037 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml
@@ -214,16 +214,6 @@
realization="org.eclipse.papyrus.uml.diagram.common.providers.DefaultPasteCommandProvider">
</PasteCommandProvider>
</extension>
- <extension
- point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
- <diagramCategory
- class="org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand"
- description="Create Unified Modeling Language diagrams"
- icon="icons/category_uml.gif"
- id="uml"
- label="UML">
- </diagramCategory>
- </extension>
<!-- Property tester to check the nature (UML Model or Profile) of currently opened project -->
<extension
@@ -610,9 +600,9 @@
point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
<diagramReconciler
diagramType="AllDiagrams"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler"
- source="Undefined"
- target="1.2.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
</diagramReconciler>
</extension>
</plugin>
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 68ca41c9922..741c98217a7 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,144 +1,142 @@
-/*******************************************************************************
- * 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;
- }
-}
+/*******************************************************************************
+ * 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.helper.DiagramPrototype;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+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, DiagramPrototype 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);
+ 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/CreateUMLModelCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateUMLModelCommand.java
index 4190a606438..d6c743006b1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateUMLModelCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateUMLModelCommand.java
@@ -21,8 +21,6 @@ import org.eclipse.uml2.uml.UMLFactory;
*/
public class CreateUMLModelCommand extends ModelCreationCommandBase {
- public static final String COMMAND_ID = "uml";
-
/**
* @see org.eclipse.papyrus.infra.core.extension.commands.ModelCreationCommandBase#createRootElement()
*
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/ModelCreationCommandBase.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/ModelCreationCommandBase.java
index e723d778fd2..8f391aba395 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/ModelCreationCommandBase.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/ModelCreationCommandBase.java
@@ -13,19 +13,10 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.commands;
-import java.util.Collections;
-
-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.resource.Resource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.papyrus.infra.architecture.commands.IModelCreationCommand;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.ui.extension.commands.IModelCreationCommand;
import org.eclipse.papyrus.uml.tools.model.UmlUtils;
/**
@@ -34,41 +25,14 @@ import org.eclipse.papyrus.uml.tools.model.UmlUtils;
public abstract class ModelCreationCommandBase implements IModelCreationCommand {
/**
- * @see org.eclipse.papyrus.infra.ui.extension.commands.IModelCreationCommand#createModel(org.eclipse.papyrus.infra.core.utils.DiResourceSet)
- *
- * @param diResourceSet
+ * @param modelSet
*/
@Override
public void createModel(final ModelSet modelSet) {
- runAsTransaction(modelSet);
- }
-
- /**
- * Run as transaction.
- *
- * @param diResourceSet
- * the di resource set
- */
- protected void runAsTransaction(final ModelSet modelSet) {
- // Get the uml element to which the newly created diagram will be
- // attached.
- // Create the diagram
final Resource modelResource = UmlUtils.getUmlResource(modelSet);
- TransactionalEditingDomain editingDomain = modelSet.getTransactionalEditingDomain();
-
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain, "Initialize model", Collections.EMPTY_LIST) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- EObject model = getRootElement(modelResource);
- attachModelToResource(model, modelResource);
-
- initializeModel(model);
- return CommandResult.newOKCommandResult();
-
- }
- };
- editingDomain.getCommandStack().execute(new GMFtoEMFCommandWrapper(command));
+ EObject model = getRootElement(modelResource);
+ attachModelToResource(model, modelResource);
+ initializeModel(model);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/dialogs/CreateUmlElementDialog.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/dialogs/CreateUmlElementDialog.java
index 36b2875b928..a75e773556c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/dialogs/CreateUmlElementDialog.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/dialogs/CreateUmlElementDialog.java
@@ -31,6 +31,7 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.CreateRelationshipCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
@@ -39,8 +40,11 @@ import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.diagram.common.Messages;
import org.eclipse.papyrus.uml.tools.utils.ElementUtil;
import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
@@ -297,13 +301,19 @@ public class CreateUmlElementDialog extends ElementTreeSelectionDialog {
* The command corresponding to this request or an {@link UnexecutableCommand} when the command can not be build
*/
private ICommand getCommand(IEditCommandRequest request) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(UMLPackage.eINSTANCE.getNamedElement());
- {
- if (provider != null) {
- ICommand cmd = provider.getEditCommand(request);
- if (cmd != null && cmd.canExecute()) {
- return cmd;
- }
+ IClientContext context;
+ try {
+ context = TypeContext.getContext(domain);
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(UMLPackage.eINSTANCE.getNamedElement(), context);
+ if (provider != null) {
+ ICommand cmd = provider.getEditCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ return cmd;
}
}
return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/EditableLabelForNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/EditableLabelForNodeEditPart.java
index c62a031a360..174b4790ed3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/EditableLabelForNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/EditableLabelForNodeEditPart.java
@@ -1,747 +1,736 @@
-/**
- * Copyright (c) 2015 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.common.editparts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.CellEditorLocator;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.directedit.locator.CellEditorLocatorAccess;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
-import org.eclipse.papyrus.uml.diagram.common.locator.MultilineCellEditorLocator;
-import org.eclipse.papyrus.uml.diagram.common.parser.DefaultParserHintAdapter;
-import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Feature;
-
-public class EditableLabelForNodeEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
-
- private DirectEditManager manager;
-
- private IParser parser;
-
- private List<?> parserElements;
-
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- protected IDirectEditorConfiguration configuration;
-
- public EditableLabelForNodeEditPart(View view) {
- super(view);
- }
-
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
- }
-
- protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
- } else {
- return ((Label) figure).getText();
- }
- }
-
- protected void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setText(text);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
- } else {
- ((Label) figure).setText(text);
- }
- }
-
- protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
- } else {
- return ((Label) figure).getIcon();
- }
- }
-
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if (figure instanceof WrappingLabel) {
- ((WrappingLabel) figure).setIcon(icon);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setIcon(icon);
- } else {
- ((Label) figure).setIcon(icon);
- }
- }
-
- public void setLabel(IFigure
- figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- @Override
- public void setParser(IParser parser) {
- this.parser = parser;
- }
-
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(AppearanceHelper.showElementIcon(view)) {
- return org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getImage(parserElement.eClass());
- }
- }
- return null;
- }
-
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if (parserElement != null && getParser() != null) {
- text = getParser().getPrintString(
- new EObjectAdapter(parserElement),
- getParserOptions().intValue());
- }
- if (text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- @Override
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- @Override
- public String getEditText() {
- if (getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(
- new EObjectAdapter(getParserElement()),
- getParserOptions().intValue());
- }
-
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- public String isValid(final Object value) {
- if (value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- public IParser getParser() {
-
- if(parser == null) {
- parser =ParserService.getInstance().getParser(new DefaultParserHintAdapter(getNotationView().getDiagram(), resolveSemanticElement(), getNotationView().getType()));
- if(parser == null) {
- parser = new NamedElementLabelParser();
- }
- }
- return parser;
- }
-
- protected DirectEditManager getManager() {
- if (manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- protected void performDirectEdit() {
- BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
-
- @Override
- public void run() {
- getManager().show();
- }
- });
- }
-
- protected void performDirectEdit(Point eventLocation) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- private void performDirectEdit(char initialCharacter) {
- if (getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
- if (source.getFigure() instanceof IMultilineEditableFigure) {
- return new MultilineCellEditorLocator(
- (IMultilineEditableFigure) source.getFigure());
- }
- else {
- return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
-
- }
- }
- @Override
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch (directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
- // Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this),getTextCellEditorLocator(this)));
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if (configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
- initializeDirectEditManager(theRequest);
- return;
- } else if (configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if (configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if (Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
- initializeDirectEditManager(theRequest);
- break;
- default:
- break;
- }
- }
-
- protected void initializeDirectEditManager(final Request request) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
- @Override
- public void run() {
- if (isActive() && isEditable()) {
- if (request.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- }
- else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
- }
- if (resolveSemanticElement() instanceof Feature) {
- if (((Feature) resolveSemanticElement()).isStatic()) {
- ((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
- ((WrappingLabel) getFigure()).setTextUnderline(false);
- }
- }
- }
-
- protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- @Override
- protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
- if (style != null) {
- FontData fontData = new FontData(
- style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- @Override
- protected void addSemanticListeners() {
- if (getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
- for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- */
- public int getDirectEditionType() {
- if (checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if (checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- */
- protected boolean checkExtendedEditor() {
- if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- */
- protected void initExtendedEditorConfiguration() {
- if (configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
- IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- @Override
- public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(
- RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- @Override
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if (resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
- refreshLabel();
- }
- super.handleNotificationEvent(event);
- }
-
- protected IFigure createFigure() {
- IFigure label=null;
- if(getParent() instanceof ContainerNodeEditPart){
- label= ((ContainerNodeEditPart)getParent()).getPrimaryShape().getNameLabel();
- }
- else{
- label = createFigurePrim();
- }
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- protected IFigure createFigurePrim() {
- return new PapyrusWrappingLabel();
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
- @Override
- public boolean isSelectable() {
- return getFigure().isShowing();
- }
-}
+/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.common.editparts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.directedit.locator.CellEditorLocatorAccess;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.MultilineCellEditorLocator;
+import org.eclipse.papyrus.uml.diagram.common.parser.DefaultParserHintAdapter;
+import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Feature;
+
+public class EditableLabelForNodeEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+
+ private DirectEditManager manager;
+
+ private IParser parser;
+
+ private List<?> parserElements;
+
+ private String defaultText;
+
+ /**
+ * direct edition mode (default, undefined, registered editor, etc.)
+ *
+ */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ protected IDirectEditorConfiguration configuration;
+
+ public EditableLabelForNodeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
+ }
+
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setText(text);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setIcon(icon);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ public void setLabel(IFigure figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ @Override
+ public void setParser(IParser parser) {
+ this.parser = parser;
+ }
+
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for (View view : views) {
+ if (AppearanceHelper.showElementIcon(view)) {
+ return org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getImage(parserElement.eClass());
+ }
+ }
+ return null;
+ }
+
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if (parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(
+ new EObjectAdapter(parserElement),
+ getParserOptions().intValue());
+ }
+ if (text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ @Override
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ @Override
+ public String getEditText() {
+ if (getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(
+ new EObjectAdapter(getParserElement()),
+ getParserOptions().intValue());
+ }
+
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ public IParser getParser() {
+
+ if (parser == null) {
+ parser = ParserService.getInstance().getParser(new DefaultParserHintAdapter(getNotationView().getDiagram(), resolveSemanticElement(), getNotationView().getType()));
+ if (parser == null) {
+ parser = new NamedElementLabelParser();
+ }
+ }
+ return parser;
+ }
+
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ @Override
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+ protected void performDirectEdit(Point eventLocation) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ private void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
+ if (source.getFigure() instanceof IMultilineEditableFigure) {
+ return new MultilineCellEditorLocator(
+ (IMultilineEditableFigure) source.getFigure());
+ } else {
+ return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
+
+ }
+ }
+
+ @Override
+ protected void performDirectEditRequest(Request request) {
+
+ final Request theRequest = request;
+
+ if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch (directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if (configuration == null || configuration.getLanguage() == null) {
+ // Create default edit manager
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this)));
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if (configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ initializeDirectEditManager(theRequest);
+ return;
+ } else if (configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if (configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+
+ if (Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
+
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+ initializeDirectEditManager(theRequest);
+ break;
+ default:
+ break;
+ }
+ }
+
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (request.getExtendedData().get(
+ RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if (maskLabelPolicy == null) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if (resolveSemanticElement() instanceof Feature) {
+ if (((Feature) resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel) getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel) getFigure()).setTextUnderline(false);
+ }
+ }
+ }
+
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ @Override
+ protected void refreshFont() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null) {
+ FontData fontData = new FontData(
+ style.getFontName(), style.getFontHeight(),
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
+ (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ @Override
+ protected void addSemanticListeners() {
+ if (getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
+ for (int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * Returns the kind of associated editor for direct edition.
+ *
+ * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
+ */
+ public int getDirectEditionType() {
+ if (checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if (checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * Checks if an extended editor is present.
+ *
+ * @return <code>true</code> if an extended editor is present.
+ */
+ protected boolean checkExtendedEditor() {
+ if (resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a default direct edition is available
+ *
+ * @return <code>true</code> if a default direct edition is available
+ */
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ /**
+ * Initializes the extended editor configuration
+ *
+ */
+ protected void initExtendedEditorConfiguration() {
+ if (configuration == null) {
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ /**
+ * Updates the preference configuration
+ *
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
+ IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
+ .eClass().getInstanceClassName());
+ } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ *
+ * @param theRequest
+ * the direct edit request that starts the direct edit system
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(
+ RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ refreshLabel();
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer) event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
+ NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
+ NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
+ NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if (getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser) getParser();
+ if (modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if (resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ refreshLabel();
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ protected IFigure createFigure() {
+ IFigure label = null;
+ if (getParent() instanceof ContainerNodeEditPart) {
+ label = ((ContainerNodeEditPart) getParent()).getPrimaryShape().getNameLabel();
+ } else {
+ label = createFigurePrim();
+ }
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ @Override
+ public void deactivate() {
+ removeOwnerElementListeners();
+ super.deactivate();
+
+ }
+
+ protected void removeOwnerElementListeners() {
+ removeListenerFilter(ADD_PARENT_MODEL);
+
+ }
+
+ @Override
+ public boolean isSelectable() {
+ return getFigure().isShowing();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java
index 87a03052d44..04e5c0da46b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java
@@ -27,11 +27,13 @@ import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.uml.diagram.common.Activator;
@@ -171,7 +173,8 @@ public class ConstraintLabelParser extends NamedElementLabelParser {
try {
if (updateRequest != null) {
- command = ElementEditServiceUtils.getEditServiceProvider().getEditService(constraint).getEditCommand(updateRequest);
+ IClientContext context = TypeContext.getContext(constraint);
+ command = ElementEditServiceUtils.getEditServiceProvider(context).getEditService(constraint).getEditCommand(updateRequest);
}
} catch (ServiceException e) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java
index 1da684d9783..ace38c1c8cf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java
@@ -28,6 +28,7 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
@@ -37,6 +38,7 @@ import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.MaskLabelHelper;
import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
@@ -91,7 +93,8 @@ public class NamedElementLabelParser implements IMaskManagedSemanticParser {
final ModelSet modelSet = (ModelSet)objectToEdit.eResource().getResourceSet();
command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), (NamedElement)objectToEdit, newString, null));
}else{
- command = ElementEditServiceUtils.getEditServiceProvider().getEditService(objectToEdit).getEditCommand(new SetRequest(objectToEdit, UMLPackage.eINSTANCE.getNamedElement_Name(), newString));
+ IClientContext context = TypeContext.getContext(objectToEdit);
+ command = ElementEditServiceUtils.getEditServiceProvider(context).getEditService(objectToEdit).getEditCommand(new SetRequest(objectToEdit, UMLPackage.eINSTANCE.getNamedElement_Name(), newString));
}
} catch (ServiceException e) {
Activator.log.error(e);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java
index 1aa258833df..df76d78fa31 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java
@@ -14,7 +14,6 @@
package org.eclipse.papyrus.uml.diagram.common.part;
import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
@@ -25,15 +24,12 @@ import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.gmfdiag.common.SynchronizableGmfDiagramEditor;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.helper.ReconcileHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
import org.eclipse.papyrus.infra.internationalization.InternationalizationPackage;
import org.eclipse.papyrus.infra.internationalization.common.editor.IInternationalizationEditor;
import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationUtils;
import org.eclipse.papyrus.infra.ui.lifecycleevents.ISaveAndDirtyService;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.contexts.IContextService;
/**
@@ -86,14 +82,6 @@ public class UmlGmfDiagramEditor extends SynchronizableGmfDiagramEditor implemen
saveAndDirtyService.registerIsaveablePart(this);
}
- @Override
- public void doSetInput(IEditorInput input, boolean releaseEditorContents) throws CoreException {
- super.doSetInput(input, releaseEditorContents);
- if (getDiagram() != null && !DiagramVersioningUtils.isOfCurrentPapyrusVersion(getDiagram())) {
- new ReconcileHelper(getEditingDomain()).reconcileDiagram(getDiagram());
- }
- }
-
/**
* Dispose services used in this part.
*
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
index e864690a591..fdfafff7e7e 100644
--- 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
@@ -34,7 +34,7 @@ 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.gmfdiag.representation.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;
@@ -204,7 +204,8 @@ public class FilteringPaletteProvider implements IPaletteProvider {
return true;
}
}
- return PolicyChecker.getCurrent().isInPalette(((DiagramEditor) editor).getDiagram(), entryID);
+ Diagram diagram = ((DiagramEditor) editor).getDiagram();
+ return PolicyChecker.getFor(diagram).isInPalette(diagram, entryID);
}
/**
@@ -230,7 +231,7 @@ public class FilteringPaletteProvider implements IPaletteProvider {
*/
private String getCustomPalette(Diagram diagram) {
ViewPrototype proto = ViewPrototype.get(diagram);
- PapyrusDiagram pd = (PapyrusDiagram) proto.getConfiguration();
+ PapyrusDiagram pd = (PapyrusDiagram) proto.getRepresentationKind();
if (pd == null) {
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalExtendedPaletteProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalExtendedPaletteProvider.java
index 95fb80987e9..d0dd6ff5721 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalExtendedPaletteProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalExtendedPaletteProvider.java
@@ -24,6 +24,8 @@ 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.diagram.ui.services.palette.IPaletteProvider;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
import org.eclipse.papyrus.infra.types.ElementTypeSetConfiguration;
import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry;
import org.eclipse.papyrus.uml.diagram.common.Messages;
@@ -120,13 +122,18 @@ public class LocalExtendedPaletteProvider extends ExtendedPluginPaletteProvider
if (!elementTypeUIResource.getContents().isEmpty() && !elementTypeSemResource.getContents().isEmpty()) {
// deploy element types configuration files
- String clientContext = "org.eclipse.papyrus.infra.services.edit.TypeContext";//$NON-NLS-1$
+ String clientContextId = "";
+ try {
+ clientContextId = TypeContext.getDefaultContext().getId();
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
- ElementTypeSetConfigurationRegistry.getInstance().unload(clientContext, ((ElementTypeSetConfiguration) elementTypeSemResource.getContents().get(0)).getIdentifier());
- ElementTypeSetConfigurationRegistry.getInstance().unload(clientContext, ((ElementTypeSetConfiguration) elementTypeUIResource.getContents().get(0)).getIdentifier());
+ ElementTypeSetConfigurationRegistry.getInstance().unload(clientContextId, ((ElementTypeSetConfiguration) elementTypeSemResource.getContents().get(0)).getIdentifier());
+ ElementTypeSetConfigurationRegistry.getInstance().unload(clientContextId, ((ElementTypeSetConfiguration) elementTypeUIResource.getContents().get(0)).getIdentifier());
- ElementTypeSetConfigurationRegistry.getInstance().loadElementTypeSetConfiguration(clientContext, ((ElementTypeSetConfiguration) elementTypeSemResource.getContents().get(0)));
- ElementTypeSetConfigurationRegistry.getInstance().loadElementTypeSetConfiguration(clientContext, ((ElementTypeSetConfiguration) elementTypeUIResource.getContents().get(0)));
+ ElementTypeSetConfigurationRegistry.getInstance().loadElementTypeSetConfiguration(clientContextId, ((ElementTypeSetConfiguration) elementTypeSemResource.getContents().get(0)));
+ ElementTypeSetConfigurationRegistry.getInstance().loadElementTypeSetConfiguration(clientContextId, ((ElementTypeSetConfiguration) elementTypeUIResource.getContents().get(0)));
}
}
}
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 ff93ae87e4a..8cc3f07db37 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
@@ -985,16 +985,17 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
}
Diagram diagram = ((DiagramEditor) editor).getDiagram();
+ PolicyChecker checker = PolicyChecker.getFor(diagram);
for (Object o : root.getChildren()) {
if (o instanceof PaletteDrawer) {
PaletteDrawer drawer = (PaletteDrawer) o;
- boolean isVisible = PolicyChecker.getCurrent().isInPalette(diagram, drawer.getId());
+ boolean isVisible = checker.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()));
+ entry.setVisible(checker.isInPalette(diagram, entry.getId()));
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteApplicator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteApplicator.java
index df003e3e789..dbe157cf5b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteApplicator.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteApplicator.java
@@ -155,7 +155,7 @@ public class XMLPaletteApplicator implements XMLPaletteDefinitionVisitor, IPapyr
public void onToolEntry(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteEntry entry = predefinedEntries.get(id);
- if (PolicyChecker.getCurrent().isInPalette(diagram, id)) {
+ if (PolicyChecker.getFor(diagram).isInPalette(diagram, id)) {
appendPaletteEntry(computePath(node), entry);
}
}
@@ -206,7 +206,7 @@ public class XMLPaletteApplicator implements XMLPaletteDefinitionVisitor, IPapyr
CombinedTemplateCreationEntry realEntry = new AspectCreationEntry(name, desc, id, iconDesc, entry, properties);
predefinedEntries.put(id, realEntry);
- if (PolicyChecker.getCurrent().isInPalette(diagram, id)) {
+ if (PolicyChecker.getFor(diagram).isInPalette(diagram, id)) {
appendPaletteEntry(computePath(node), realEntry);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/StereotypeDisplayDiagramReconciler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/StereotypeDisplayDiagramReconciler_1_2_0.java
index 07a4b0f863f..6fd156c4d51 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/StereotypeDisplayDiagramReconciler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/StereotypeDisplayDiagramReconciler_1_2_0.java
@@ -25,7 +25,7 @@ import org.eclipse.papyrus.uml.diagram.common.util.CommandUtil;
/**
*
*/
-public class StereotypeDisplayDiagramReconciler extends DiagramReconciler {
+public class StereotypeDisplayDiagramReconciler_1_2_0 extends DiagramReconciler {
/**
* {@inheritDoc}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationLabelMigrationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationLabelMigrationEditPolicy.java
index 5cc40882dee..dacf47eea10 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationLabelMigrationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationLabelMigrationEditPolicy.java
@@ -19,7 +19,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.commands.RemoveEAnnotationDetailCommand;
-import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler_1_2_0;
import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayMigrationConstant;
import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.commands.StereotypeLabelMigrationCommand;
import org.eclipse.papyrus.uml.diagram.common.util.CommandUtil;
@@ -30,7 +30,7 @@ import org.eclipse.papyrus.uml.diagram.common.util.CommandUtil;
*
* @author Céline JANSSENS
*
- * @deprecated Replaced by {@link StereotypeDisplayDiagramReconciler}
+ * @deprecated Replaced by {@link StereotypeDisplayDiagramReconciler_1_2_0}
*/
@Deprecated
public class StereotypeEAnnotationLabelMigrationEditPolicy extends StereotypeEAnnotationMigrationEditPolicy {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationMigrationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationMigrationEditPolicy.java
index 3f60438d974..7b3d05ed21b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationMigrationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationMigrationEditPolicy.java
@@ -32,7 +32,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.commands.RemoveEAnnotationCommand;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayUtil;
-import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler_1_2_0;
import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeMigrationHelper;
import org.eclipse.papyrus.uml.diagram.common.util.CommandUtil;
@@ -42,7 +42,7 @@ import org.eclipse.papyrus.uml.diagram.common.util.CommandUtil;
*
* @author Céline JANSSENS
*
- * @deprecated Replaced by {@link StereotypeDisplayDiagramReconciler}
+ * @deprecated Replaced by {@link StereotypeDisplayDiagramReconciler_1_2_0}
*/
@Deprecated
public abstract class StereotypeEAnnotationMigrationEditPolicy extends AbstractEditPolicy {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationNestedMigrationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationNestedMigrationEditPolicy.java
index adf3e0cafd7..0ee68ebade4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationNestedMigrationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationNestedMigrationEditPolicy.java
@@ -19,7 +19,7 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler_1_2_0;
import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.commands.StereotypeNestedPropertiesMigrationCommand;
/**
@@ -36,7 +36,7 @@ import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.commands.Ster
*
* @author Céline JANSSENS
*
- * @deprecated Replaced by {@link StereotypeDisplayDiagramReconciler}
+ * @deprecated Replaced by {@link StereotypeDisplayDiagramReconciler_1_2_0}
*/
@Deprecated
public class StereotypeEAnnotationNestedMigrationEditPolicy extends StereotypeEAnnotationPropertiesMigrationEditPolicy {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationPropertiesMigrationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationPropertiesMigrationEditPolicy.java
index 86fdc7c2c28..c0898263fae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationPropertiesMigrationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/migration/editpolicies/StereotypeEAnnotationPropertiesMigrationEditPolicy.java
@@ -20,7 +20,7 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.commands.RemoveEAnnotationDetailCommand;
import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayConstant;
-import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayDiagramReconciler_1_2_0;
import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.StereotypeDisplayMigrationConstant;
import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.commands.StereotypeCommentPropertiesMigrationCommand;
import org.eclipse.papyrus.uml.diagram.common.stereotype.migration.commands.StereotypePropertiesMigrationCommand;
@@ -32,7 +32,7 @@ import org.eclipse.papyrus.uml.diagram.common.util.CommandUtil;
*
* @author Céline JANSSENS
*
- * @deprecated Replaced by {@link StereotypeDisplayDiagramReconciler}
+ * @deprecated Replaced by {@link StereotypeDisplayDiagramReconciler_1_2_0}
*/
@Deprecated
public class StereotypeEAnnotationPropertiesMigrationEditPolicy extends StereotypeEAnnotationMigrationEditPolicy {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconcilerForCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconcilerForCompartment_1_2_0.java
index c8848da86ff..228d30ae7c9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconcilerForCompartment.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconcilerForCompartment_1_2_0.java
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.ReconcilerForCompartm
/**
* Diagram Reconciler for compartment from 1.1.0 to 1.2.0
*/
-public class CommunicationReconcilerForCompartment extends ReconcilerForCompartment {
+public class CommunicationReconcilerForCompartment_1_2_0 extends ReconcilerForCompartment {
private static final String InteractionCompartmentEditPart_VISUAL_ID = "7001";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler_1_1_0.java
index 77336af6620..ab9706e9c7d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler_1_1_0.java
@@ -1,58 +1,58 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2015 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.migration;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.gmfdiag.common.commands.InsertFloatingLabelFromMapCommand;
-import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
-
-/**
- * Communication Diagram Reconciler from 1.0.0 to 1.1.0
- */
-public class CommunicationReconciler extends DiagramReconciler {
-
- private static final String InteractionEditPart_VISUAL_ID = "8002";
- private static final String InteractionFloatingLabelEditPart_VISUAL_ID = "6013";
- private static final String LifelineEditPartCN_VISUAL_ID = "8001";
- private static final String LifelineFloatingLabelEditPartCN_VISUAL_ID = "6014";
-
- /**
- * Gets the reconcile command.
- *
- * @param diagram
- * the diagram
- * @return the reconcile command
- * @see org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler#getReconcileCommand(org.eclipse.gmf.runtime.notation.Diagram)
- */
- @Override
- public ICommand getReconcileCommand(Diagram diagram) {
- return new InsertFloatingLabelFromMapCommand(diagram, getFloatingLabelMap());
- }
-
- /**
- * Gets the floating label map to add.
- *
- * @return the floating label map
- */
- private Map<String, String> getFloatingLabelMap() {
- Map<String, String> map = new HashMap<String, String>();
- map.put(InteractionEditPart_VISUAL_ID, InteractionFloatingLabelEditPart_VISUAL_ID);
- map.put(LifelineEditPartCN_VISUAL_ID, LifelineFloatingLabelEditPartCN_VISUAL_ID);
-
- return map;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.migration;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.InsertFloatingLabelFromMapCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
+
+/**
+ * Communication Diagram Reconciler from 1.0.0 to 1.1.0
+ */
+public class CommunicationReconciler_1_1_0 extends DiagramReconciler {
+
+ private static final String InteractionEditPart_VISUAL_ID = "8002";
+ private static final String InteractionFloatingLabelEditPart_VISUAL_ID = "6013";
+ private static final String LifelineEditPartCN_VISUAL_ID = "8001";
+ private static final String LifelineFloatingLabelEditPartCN_VISUAL_ID = "6014";
+
+ /**
+ * Gets the reconcile command.
+ *
+ * @param diagram
+ * the diagram
+ * @return the reconcile command
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler#getReconcileCommand(org.eclipse.gmf.runtime.notation.Diagram)
+ */
+ @Override
+ public ICommand getReconcileCommand(Diagram diagram) {
+ return new InsertFloatingLabelFromMapCommand(diagram, getFloatingLabelMap());
+ }
+
+ /**
+ * Gets the floating label map to add.
+ *
+ * @return the floating label map
+ */
+ private Map<String, String> getFloatingLabelMap() {
+ Map<String, String> map = new HashMap<String, String>();
+ map.put(InteractionEditPart_VISUAL_ID, InteractionFloatingLabelEditPart_VISUAL_ID);
+ map.put(LifelineEditPartCN_VISUAL_ID, LifelineFloatingLabelEditPartCN_VISUAL_ID);
+
+ return map;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomLifelineItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomLifelineItemSemanticEditPolicyCN.java
index fb68d4e0f9f..0590a9f3f88 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomLifelineItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomLifelineItemSemanticEditPolicyCN.java
@@ -1,132 +1,146 @@
-/*****************************************************************************
- * 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
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic;
-
-import java.util.Iterator;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CustomMessagesReorientCommand;
-import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorTimeObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.communication.edit.policies.LifelineItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * this is a specialization to manage creation of Message,
- * CommentAnnotatedElement, ConstraintConstrainedElement,
- * DurationObservationEvent and TimeObservationEvent
- */
-public class CustomLifelineItemSemanticEditPolicyCN extends LifelineItemSemanticEditPolicyCN {
-
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
-
- if (UMLElementTypes.Path_Edge == req.getElementType()) {
-
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
-
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
-
- if (UMLElementTypes.DurationObservation_EventEdge == req.getElementType()) {
- return getGEFWrapper(new ConnectorDurationObservationCreateCommand(req, req.getSource(), req.getTarget()));
- }
-
- if (UMLElementTypes.TimeObservation_EventEdge == req.getElementType()) {
- return getGEFWrapper(new ConnectorTimeObservationCreateCommand(req, req.getSource(), req.getTarget()));
- }
-
- return null;
- }
-
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Path_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
-
- return null;
- }
-
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
-
- // System.err.println("getReorientRelationshipCommand VisualID of element to reorient :" + getVisualID(req));
- switch (getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
-
- // return getGEFWrapper(new CustomMessagesReorientCommand(req));
- View connector = (View) req.getParameter(UMLBaseItemSemanticEditPolicy.GRAPHICAL_RECONNECTED_EDGE);
- Object elementToedit = UMLPackage.eINSTANCE.getMessage();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToedit);
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- ICommand reorientCommand = null;
- // 1. add the reorient messages command
- reorientCommand = CompositeCommand.compose(reorientCommand, new CustomMessagesReorientCommand(req));
-
- Iterator<?> it = connector.getChildren().iterator();
- while (it.hasNext()) {
- Object object = it.next();
-
- if (object instanceof View) {
- View child = (View) object;
-
- if ((child.getElement() != null) && (child.getElement() instanceof Message)) {
-
- Message messageToReorient = (Message) child.getElement();
- ReorientRequest reorientMessageRequest = new ReorientRelationshipRequest(messageToReorient, req.getNewRelationshipEnd(), req.getOldRelationshipEnd(), req.getDirection());
- reorientMessageRequest.setParameter(UMLBaseItemSemanticEditPolicy.GRAPHICAL_RECONNECTED_EDGE, connector);
- ICommand reorientMessageCommand = provider.getEditCommand(reorientMessageRequest);
- reorientCommand = CompositeCommand.compose(reorientCommand, reorientMessageCommand);
- break;
- }
- }
-
- }
-
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- return super.getReorientRelationshipCommand(req);
- }
-
-
-}
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CustomMessageCreateCommand;
+import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CustomMessagesReorientCommand;
+import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorDurationObservationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConnectorTimeObservationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageEditPart;
+import org.eclipse.papyrus.uml.diagram.communication.edit.policies.LifelineItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * this is a specialization to manage creation of Message,
+ * CommentAnnotatedElement, ConstraintConstrainedElement,
+ * DurationObservationEvent and TimeObservationEvent
+ */
+public class CustomLifelineItemSemanticEditPolicyCN extends LifelineItemSemanticEditPolicyCN {
+
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+
+ if (UMLElementTypes.Path_Edge == req.getElementType()) {
+
+ return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+
+ if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+
+ if (UMLElementTypes.DurationObservation_EventEdge == req.getElementType()) {
+ return getGEFWrapper(new ConnectorDurationObservationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+
+ if (UMLElementTypes.TimeObservation_EventEdge == req.getElementType()) {
+ return getGEFWrapper(new ConnectorTimeObservationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+
+ return null;
+ }
+
+ @Override
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (UMLElementTypes.Path_Edge == req.getElementType()) {
+ return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+
+ return null;
+ }
+
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+
+ // System.err.println("getReorientRelationshipCommand VisualID of element to reorient :" + getVisualID(req));
+ switch (getVisualID(req)) {
+ case MessageEditPart.VISUAL_ID:
+
+ // return getGEFWrapper(new CustomMessagesReorientCommand(req));
+ View connector = (View) req.getParameter(UMLBaseItemSemanticEditPolicy.GRAPHICAL_RECONNECTED_EDGE);
+ EClass elementToedit = UMLPackage.eINSTANCE.getMessage();
+
+ IClientContext context;
+ try {
+ context = TypeContext.getContext(getEditingDomain());
+ } catch (ServiceException e) {
+ UMLDiagramEditorPlugin.getInstance().getLogHelper().error(e);
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToedit, context);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ ICommand reorientCommand = null;
+ // 1. add the reorient messages command
+ reorientCommand = CompositeCommand.compose(reorientCommand, new CustomMessagesReorientCommand(req));
+
+ Iterator<?> it = connector.getChildren().iterator();
+ while (it.hasNext()) {
+ Object object = it.next();
+
+ if (object instanceof View) {
+ View child = (View) object;
+
+ if ((child.getElement() != null) && (child.getElement() instanceof Message)) {
+
+ Message messageToReorient = (Message) child.getElement();
+ ReorientRequest reorientMessageRequest = new ReorientRelationshipRequest(messageToReorient, req.getNewRelationshipEnd(), req.getOldRelationshipEnd(), req.getDirection());
+ reorientMessageRequest.setParameter(UMLBaseItemSemanticEditPolicy.GRAPHICAL_RECONNECTED_EDGE, connector);
+ ICommand reorientMessageCommand = provider.getEditCommand(reorientMessageRequest);
+ reorientCommand = CompositeCommand.compose(reorientCommand, reorientMessageCommand);
+ break;
+ }
+ }
+
+ }
+
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.configuration
deleted file mode 100644
index d40dee1b1e2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.configuration
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
- <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_jRtroHDuEeWh-MssWmCB_A" implementationID="PapyrusUMLCommunicationDiagram">
- <modelRules xmi:id="_jRtroXDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
- </modelRules>
- <owningRules xmi:id="_jRtronDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
- </owningRules>
- <owningRules xmi:id="_jRtro3DuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/>
- <newModelPath xmi:id="_jRtrpHDuEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Interaction">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
- </newModelPath>
- </owningRules>
- <owningRules xmi:id="_jRtrpXDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/>
- <newModelPath xmi:id="_jRtrpnDuEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Interaction">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
- </newModelPath>
- </owningRules>
- <owningRules xmi:id="_jRtrp3DuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <newModelPath xmi:id="_jRtrqHDuEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Interaction">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
- </newModelPath>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_jRtrqXDuEeWh-MssWmCB_A"/>
- </modelKinds>
- </viewpoints>
- <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
- <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
-</configuration:PapyrusConfiguration>
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 4a57beb83a4..1b800d7b8d1 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
@@ -16,14 +16,6 @@
-->
<plugin>
<extension
- point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
- <contribution
- file="model/communicationdiagram.configuration"
- original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
- </contribution>
- </extension>
-
- <extension
point="org.eclipse.ui.commands">
<command
categoryId="org.eclipse.papyrus.editor.category"
@@ -540,21 +532,21 @@
point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
<diagramReconciler
diagramType="PapyrusUMLCommunicationDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.communication.custom.migration.CommunicationReconciler"
- source="undefined"
- target="1.1.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.communication.custom.migration.CommunicationReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLCommunicationDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.communication.custom.migration.CommunicationReconcilerForCompartment"
- source="undefined"
- target="1.2.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.communication.custom.migration.CommunicationReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLCommunicationDiagram"
reconcilerClass="org.eclipse.papyrus.uml.diagram.communication.custom.migration.CommunicationReconciler_1_2_0"
source="1.1.0"
- target="1.2.0">
+ target="1.3.0">
</diagramReconciler>
</extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
@@ -578,14 +570,4 @@
path="model/communicationdiagram-notation.elementtypesconfigurations">
</elementTypeSet>
</extension>
- <extension
- point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration">
- <elementTypeSet
- clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext"
- path="model/communicationdiagram-uml.elementtypesconfigurations">
- </elementTypeSet>
- </extension>
-
-
-
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java
index 2f6ed62de1c..6520e077b93 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class CommentCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Comment newElement = UMLFactory.eINSTANCE.createComment();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_Shape(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Comment 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class CommentCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Comment newElement = UMLFactory.eINSTANCE.createComment();
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Comment 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());
+ 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.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java
index 766d19c5178..b481bb9a180 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class ConstraintCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_Shape(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Constraint 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class ConstraintCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Constraint 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());
+ 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.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java
index 24f6b455f56..ada8432ae64 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class DurationObservationCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DurationObservationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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");
- }
-
-
- ElementInitializers.getInstance().init_DurationObservation_Shape(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class DurationObservationCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public DurationObservationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ 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());
+ 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.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java
index b22b3c41e45..a61802a6192 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java
@@ -1,131 +1,131 @@
-/**
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class InteractionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public InteractionCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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");
- }
-
- Component childHolder = (Component) getElementToEdit();
- childHolder.getPackagedElements()
- .add(newElement);
-
- ElementInitializers.getInstance().init_Interaction_Shape(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class InteractionCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public InteractionCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ 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());
+ 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.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java
index b1e4b9835ec..6e359c9d63d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class LifelineCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public LifelineCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLifeline());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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");
- }
-
-
- ElementInitializers.getInstance().init_Lifeline_Shape(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class LifelineCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public LifelineCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLifeline());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ 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());
+ 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.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java
index af9c4e68618..190a4e90dc1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class TimeObservationCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public TimeObservationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeObservation());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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");
- }
-
-
- ElementInitializers.getInstance().init_TimeObservation_Shape(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class TimeObservationCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public TimeObservationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeObservation());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ 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());
+ 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.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconcilerForCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconcilerForCompartment_1_2_0.java
index f9b4f52ee91..65ceca684d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconcilerForCompartment.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconcilerForCompartment_1_2_0.java
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.ReconcilerForCompartm
/**
* Diagram Reconciler for compartment from 1.1.0 to 1.2.0
*/
-public class ComponentReconcilerForCompartment extends ReconcilerForCompartment {
+public class ComponentReconcilerForCompartment_1_2_0 extends ReconcilerForCompartment {
private static final String ComponentCompositeCompartmentEditPart_VISUAL_ID = "7001"; //$NON-NLS-1$
private static final String ModelPackageableElementCompartmentEditPart_VISUAL_ID = "7006"; //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconciler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconciler_1_1_0.java
index 5d6f313ccc2..1c7e0829d31 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconciler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/migration/ComponentReconciler_1_1_0.java
@@ -1,76 +1,76 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2015 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.component.custom.migration;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.gmfdiag.common.commands.InsertFloatingLabelFromMapCommand;
-import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
-
-/**
- * Component Diagram Reconciler from 1.0.0 to 1.1.0
- */
-public class ComponentReconciler extends DiagramReconciler {
-
- private final static String ComponentEditPart_VISUAL_ID = "2002"; //$NON-NLS-1$
- private final static String ComponentFloatingLabelEditPart_VISUAL_ID = "6030"; //$NON-NLS-1$
- private final static String ComponentEditPartCN_VISUAL_ID = "3070"; //$NON-NLS-1$
- private final static String ComponentFloatingLabelEditPartCN_VISUAL_ID = "6026"; //$NON-NLS-1$
- private final static String ComponentEditPartPCN_VISUAL_ID = "3071"; //$NON-NLS-1$
- private final static String ComponentFloatingLabelEditPartPCN_VISUAL_ID = "6027"; //$NON-NLS-1$
- private final static String DependencyNodeEditPart_VISUAL_ID = "3203"; //$NON-NLS-1$
- private final static String DependencyNodeFloatingLabelEditPart_VISUAL_ID = "6029"; //$NON-NLS-1$
- private final static String InterfaceEditPart_VISUAL_ID = "2003"; //$NON-NLS-1$
- private final static String InterfaceFloatingLabelEditPart_VISUAL_ID = "6032"; //$NON-NLS-1$
- private final static String InterfaceEditPartPCN_VISUAL_ID = "3072"; //$NON-NLS-1$
- private final static String InterfaceFloatingLabelEditPartPCN_VISUAL_ID = "6028"; //$NON-NLS-1$
- private final static String RectangleInterfaceEditPart_VISUAL_ID = "3205"; //$NON-NLS-1$
- private final static String RectangleInterfaceFloatingLabelEditPart_VISUAL_ID = "6031"; //$NON-NLS-1$
- private final static String RectangleInterfaceEditPartCN_VISUAL_ID = "3078"; //$NON-NLS-1$
- private final static String RectangleInterfaceFloatingLabelEditPartCN_VISUAL_ID = "6033"; //$NON-NLS-1$
-
- /**
- * Gets the reconcile command.
- *
- * @param diagram
- * the diagram
- * @return the reconcile command
- * @see org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler#getReconcileCommand(org.eclipse.gmf.runtime.notation.Diagram)
- */
- @Override
- public ICommand getReconcileCommand(Diagram diagram) {
- return new InsertFloatingLabelFromMapCommand(diagram, getFloatingLabelMap());
- }
-
- /**
- * Gets the floating label map to add.
- *
- * @return the floating label map
- */
- private Map<String, String> getFloatingLabelMap() {
- Map<String, String> map = new HashMap<>();
- map.put(ComponentEditPart_VISUAL_ID, ComponentFloatingLabelEditPart_VISUAL_ID);
- map.put(ComponentEditPartCN_VISUAL_ID, ComponentFloatingLabelEditPartCN_VISUAL_ID);
- map.put(ComponentEditPartPCN_VISUAL_ID, ComponentFloatingLabelEditPartPCN_VISUAL_ID);
- map.put(DependencyNodeEditPart_VISUAL_ID, DependencyNodeFloatingLabelEditPart_VISUAL_ID);
- map.put(InterfaceEditPart_VISUAL_ID, InterfaceFloatingLabelEditPart_VISUAL_ID);
- map.put(InterfaceEditPartPCN_VISUAL_ID, InterfaceFloatingLabelEditPartPCN_VISUAL_ID);
- map.put(RectangleInterfaceEditPart_VISUAL_ID, RectangleInterfaceFloatingLabelEditPart_VISUAL_ID);
- map.put(RectangleInterfaceEditPartCN_VISUAL_ID, RectangleInterfaceFloatingLabelEditPartCN_VISUAL_ID);
-
- return map;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.component.custom.migration;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.InsertFloatingLabelFromMapCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
+
+/**
+ * Component Diagram Reconciler from 1.0.0 to 1.1.0
+ */
+public class ComponentReconciler_1_1_0 extends DiagramReconciler {
+
+ private final static String ComponentEditPart_VISUAL_ID = "2002"; //$NON-NLS-1$
+ private final static String ComponentFloatingLabelEditPart_VISUAL_ID = "6030"; //$NON-NLS-1$
+ private final static String ComponentEditPartCN_VISUAL_ID = "3070"; //$NON-NLS-1$
+ private final static String ComponentFloatingLabelEditPartCN_VISUAL_ID = "6026"; //$NON-NLS-1$
+ private final static String ComponentEditPartPCN_VISUAL_ID = "3071"; //$NON-NLS-1$
+ private final static String ComponentFloatingLabelEditPartPCN_VISUAL_ID = "6027"; //$NON-NLS-1$
+ private final static String DependencyNodeEditPart_VISUAL_ID = "3203"; //$NON-NLS-1$
+ private final static String DependencyNodeFloatingLabelEditPart_VISUAL_ID = "6029"; //$NON-NLS-1$
+ private final static String InterfaceEditPart_VISUAL_ID = "2003"; //$NON-NLS-1$
+ private final static String InterfaceFloatingLabelEditPart_VISUAL_ID = "6032"; //$NON-NLS-1$
+ private final static String InterfaceEditPartPCN_VISUAL_ID = "3072"; //$NON-NLS-1$
+ private final static String InterfaceFloatingLabelEditPartPCN_VISUAL_ID = "6028"; //$NON-NLS-1$
+ private final static String RectangleInterfaceEditPart_VISUAL_ID = "3205"; //$NON-NLS-1$
+ private final static String RectangleInterfaceFloatingLabelEditPart_VISUAL_ID = "6031"; //$NON-NLS-1$
+ private final static String RectangleInterfaceEditPartCN_VISUAL_ID = "3078"; //$NON-NLS-1$
+ private final static String RectangleInterfaceFloatingLabelEditPartCN_VISUAL_ID = "6033"; //$NON-NLS-1$
+
+ /**
+ * Gets the reconcile command.
+ *
+ * @param diagram
+ * the diagram
+ * @return the reconcile command
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler#getReconcileCommand(org.eclipse.gmf.runtime.notation.Diagram)
+ */
+ @Override
+ public ICommand getReconcileCommand(Diagram diagram) {
+ return new InsertFloatingLabelFromMapCommand(diagram, getFloatingLabelMap());
+ }
+
+ /**
+ * Gets the floating label map to add.
+ *
+ * @return the floating label map
+ */
+ private Map<String, String> getFloatingLabelMap() {
+ Map<String, String> map = new HashMap<>();
+ map.put(ComponentEditPart_VISUAL_ID, ComponentFloatingLabelEditPart_VISUAL_ID);
+ map.put(ComponentEditPartCN_VISUAL_ID, ComponentFloatingLabelEditPartCN_VISUAL_ID);
+ map.put(ComponentEditPartPCN_VISUAL_ID, ComponentFloatingLabelEditPartPCN_VISUAL_ID);
+ map.put(DependencyNodeEditPart_VISUAL_ID, DependencyNodeFloatingLabelEditPart_VISUAL_ID);
+ map.put(InterfaceEditPart_VISUAL_ID, InterfaceFloatingLabelEditPart_VISUAL_ID);
+ map.put(InterfaceEditPartPCN_VISUAL_ID, InterfaceFloatingLabelEditPartPCN_VISUAL_ID);
+ map.put(RectangleInterfaceEditPart_VISUAL_ID, RectangleInterfaceFloatingLabelEditPart_VISUAL_ID);
+ map.put(RectangleInterfaceEditPartCN_VISUAL_ID, RectangleInterfaceFloatingLabelEditPartCN_VISUAL_ID);
+
+ return map;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.configuration
deleted file mode 100644
index 49c8ae8a468..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.configuration
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
- <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_fa4kAHDuEeWh-MssWmCB_A" implementationID="PapyrusUMLComponentDiagram">
- <modelRules xmi:id="_fa4kAXDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </modelRules>
- <owningRules xmi:id="_fa4kAnDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_fa4kA3DuEeWh-MssWmCB_A"/>
- </modelKinds>
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_fa4kBHDuEeWh-MssWmCB_A" implementationID="PapyrusUMLComponentDiagram">
- <modelRules xmi:id="_fa4kBXDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Component"/>
- </modelRules>
- <owningRules xmi:id="_fa4kBnDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Component"/>
- </owningRules>
- <owningRules xmi:id="_fa4kB3DuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_fa4kCHDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier"/>
- <origin href="http://www.eclipse.org/uml2/5.0.0/UML#//Component"/>
- <insertionPath xmi:id="_fa4kCXDuEeWh-MssWmCB_A">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
- </insertionPath>
- </childRules>
- <childRules xmi:id="_fa4kCnDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Comment"/>
- <origin href="http://www.eclipse.org/uml2/5.0.0/UML#//Component"/>
- <insertionPath xmi:id="_fa4kC3DuEeWh-MssWmCB_A">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedComment"/>
- </insertionPath>
- </childRules>
- <childRules xmi:id="_fa4kDHDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Constraint"/>
- <origin href="http://www.eclipse.org/uml2/5.0.0/UML#//Component"/>
- <insertionPath xmi:id="_fa4kDXDuEeWh-MssWmCB_A">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/ownedRule"/>
- </insertionPath>
- </childRules>
- <childRules xmi:id="_fa4kDnDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Port"/>
- <origin href="http://www.eclipse.org/uml2/5.0.0/UML#//Component"/>
- <insertionPath xmi:id="_fa4kD3DuEeWh-MssWmCB_A">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
- </insertionPath>
- </childRules>
- <paletteRules xmi:id="_fa4kEHDuEeWh-MssWmCB_A" permit="false" element="component.tool.model"/>
- <paletteRules xmi:id="_fa4kEXDuEeWh-MssWmCB_A" permit="false" element="component.tool.package"/>
- </modelKinds>
- </viewpoints>
- <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
- <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
-</configuration:PapyrusConfiguration>
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 2075685f23b..5bf98565fa2 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml
@@ -15,14 +15,6 @@
-->
<plugin>
<extension
- point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
- <contribution
- file="model/ComponentDiagram.configuration"
- original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
- </contribution>
- </extension>
-
-<extension
point="org.eclipse.ui.commands">
<command
categoryId="org.eclipse.papyrus.editor.category"
@@ -965,21 +957,21 @@
point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
<diagramReconciler
diagramType="PapyrusUMLComponentDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.component.custom.migration.ComponentReconciler"
- source="undefined"
- target="1.1.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.component.custom.migration.ComponentReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLComponentDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.component.custom.migration.ComponentReconcilerForCompartment"
- source="undefined"
- target="1.2.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.component.custom.migration.ComponentReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLComponentDiagram"
reconcilerClass="org.eclipse.papyrus.uml.diagram.component.custom.migration.ComponentReconciler_1_2_0"
source="1.1.0"
- target="1.2.0">
+ target="1.3.0">
</diagramReconciler>
</extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java
index ae59beb70b9..5637da197e5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java
@@ -1,127 +1,127 @@
-/**
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.component.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class PortCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PortCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPort());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Port newElement = UMLFactory.eINSTANCE.createPort();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_Shape(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Port 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.component.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class PortCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public PortCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPort());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Port newElement = UMLFactory.eINSTANCE.createPort();
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Port 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());
+ 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.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 fa1851698af..b4f4b956fb2 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,7 +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.infra.gmfdiag.common.helper.DiagramPrototype;
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;
@@ -100,7 +100,7 @@ public class CreateCompositeDiagramCommand extends AbstractPapyrusGmfCreateDiagr
* {@inheritDoc}
*/
@Override
- protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, ViewPrototype prototype, String name) {
+ protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, DiagramPrototype prototype, String name) {
Diagram diagram = null;
if (element instanceof org.eclipse.uml2.uml.Class || (element instanceof Collaboration)) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconcilerForCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconcilerForCompartment_1_2_0.java
index de5f4495dde..6c3847e7852 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconcilerForCompartment.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconcilerForCompartment_1_2_0.java
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.ReconcilerForCompartm
/**
* Diagram Reconciler for compartment from 1.1.0 to 1.2.0
*/
-public class CompositeReconcilerForCompartment extends ReconcilerForCompartment {
+public class CompositeReconcilerForCompartment_1_2_0 extends ReconcilerForCompartment {
private static final String DataTypeAttributeCompartmentEditPart_VISUAL_ID = "7033"; //$NON-NLS-1$
private static final String DataTypeOperationCompartmentEditPart_VISUAL_ID = "7034"; //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconciler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconciler_1_1_0.java
index b72c6b599eb..d9b4e6e1bad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconciler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/migration/CompositeReconciler_1_1_0.java
@@ -24,7 +24,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
/**
* Composite Diagram Reconciler from 1.0.0 to 1.1.0
*/
-public class CompositeReconciler extends DiagramReconciler {
+public class CompositeReconciler_1_1_0 extends DiagramReconciler {
private final static String ActivityCompositeEditPart_VISUAL_ID = "2060"; //$NON-NLS-1$
private final static String ActivityCompositeFloatingLabelEditPart_VISUAL_ID = "6079"; //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/parsers/NamedElementLabelParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/parsers/NamedElementLabelParser.java
index bfc9de47a96..309c3202e97 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/parsers/NamedElementLabelParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/parsers/NamedElementLabelParser.java
@@ -28,11 +28,13 @@ import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
@@ -87,7 +89,8 @@ public class NamedElementLabelParser implements ISemanticParser {
final ModelSet modelSet = (ModelSet)objectToEdit.eResource().getResourceSet();
command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), (NamedElement)objectToEdit, newString, null));
}else{
- command = ElementEditServiceUtils.getEditServiceProvider().getEditService(objectToEdit).getEditCommand(new SetRequest(objectToEdit, UMLPackage.eINSTANCE.getNamedElement_Name(), newString));
+ IClientContext context = TypeContext.getContext(objectToEdit);
+ command = ElementEditServiceUtils.getEditServiceProvider(context).getEditService(objectToEdit).getEditCommand(new SetRequest(objectToEdit, UMLPackage.eINSTANCE.getNamedElement_Name(), newString));
}
} catch (ServiceException e) {
Activator.log.error(e);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.configuration
deleted file mode 100644
index c14ed30d72e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.configuration
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
- <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_bKiwMHDuEeWh-MssWmCB_A" implementationID="CompositeStructure">
- <modelRules xmi:id="_bKiwMXDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </modelRules>
- <owningRules xmi:id="_bKiwMnDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_bKiwM3DuEeWh-MssWmCB_A"/>
- </modelKinds>
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_bKiwNHDuEeWh-MssWmCB_A" implementationID="CompositeStructure">
- <modelRules xmi:id="_bKiwNXDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier"/>
- </modelRules>
- <owningRules xmi:id="_bKiwNnDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier"/>
- </owningRules>
- <owningRules xmi:id="_bKiwN3DuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_bKiwOHDuEeWh-MssWmCB_A"/>
- </modelKinds>
- </viewpoints>
- <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
- <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
-</configuration:PapyrusConfiguration>
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 f7c0dbbeff2..2ea2838337c 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
@@ -15,14 +15,6 @@
-->
<plugin>
- <extension
- point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
- <contribution
- file="model/compositediagram.configuration"
- original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
- </contribution>
- </extension>
-
<extension point="org.eclipse.ui.contexts" id="ui-context">
<?gmfgen generated="true"?>
<context
@@ -939,13 +931,6 @@
</enablement>
</semanticChildrenStrategy>
</extension>
-<extension
- point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration">
- <elementTypeSet
- clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext"
- path="model/compositediagram.elementtypesconfigurations">
- </elementTypeSet>
-</extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
<?gmfgen generated="true"?>
@@ -1513,21 +1498,21 @@
point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
<diagramReconciler
diagramType="CompositeStructure"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconciler"
- source="undefined"
- target="1.1.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="CompositeStructure"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconcilerForCompartment"
- source="undefined"
- target="1.2.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="CompositeStructure"
reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconciler_1_2_0"
source="1.1.0"
- target="1.2.0">
+ target="1.3.0">
</diagramReconciler>
</extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconcilerForCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconcilerForCompartment_1_2_0.java
index 56b218a0301..266390e3b41 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconcilerForCompartment.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconcilerForCompartment_1_2_0.java
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.ReconcilerForCompartm
/**
* Diagram Reconciler for compartment from 1.1.0 to 1.2.0
*/
-public class DeploymentReconcilerForCompartment extends ReconcilerForCompartment {
+public class DeploymentReconcilerForCompartment_1_2_0 extends ReconcilerForCompartment {
private static final String ModelPackageableElementCompartmentEditPart_VISUAL_ID = "51";
private static final String PackagePackageableElementCompartmentEditPart_VISUAL_ID = "38";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconciler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconciler_1_1_0.java
index 0b1b8e0051f..5fd3e472d72 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconciler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/migration/DeploymentReconciler_1_1_0.java
@@ -1,62 +1,62 @@
-/*****************************************************************************
- * Copyright (c) 2009-2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.deployment.custom.migration;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.gmfdiag.common.commands.InsertFloatingLabelFromMapCommand;
-import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
-
-/**
- * Deployment Diagram Reconciler from 1.0.0 to 1.1.0
- */
-public class DeploymentReconciler extends DiagramReconciler {
-
- private final static String ArtifactEditPart_VISUAL_ID = "2006";
- private final static String ArtifactFloatingLabelEditPart_VISUAL_ID = "61";
- private final static String ArtifactEditPartACN_VISUAL_ID = "28";
- private final static String ArtifactFloatingLabelEditPartACN_VISUAL_ID = "60";
- private final static String ArtifactEditPartCN_VISUAL_ID = "25";
- private final static String ArtifactFloatingLabelEditPartCN_VISUAL_ID = "59";
-
- /**
- * Gets the reconcile command.
- *
- * @param diagram
- * the diagram
- * @return the reconcile command
- * @see org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler#getReconcileCommand(org.eclipse.gmf.runtime.notation.Diagram)
- */
- @Override
- public ICommand getReconcileCommand(Diagram diagram) {
- return new InsertFloatingLabelFromMapCommand(diagram, getFloatingLabelMap());
- }
-
- /**
- * Gets the floating label map to add.
- *
- * @return the floating label map
- */
- private Map<String, String> getFloatingLabelMap() {
- Map<String, String> map = new HashMap<String, String>();
- map.put(ArtifactEditPart_VISUAL_ID, ArtifactFloatingLabelEditPart_VISUAL_ID);
- map.put(ArtifactEditPartACN_VISUAL_ID, ArtifactFloatingLabelEditPartACN_VISUAL_ID);
- map.put(ArtifactEditPartCN_VISUAL_ID, ArtifactFloatingLabelEditPartCN_VISUAL_ID);
-
- return map;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009-2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.deployment.custom.migration;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.InsertFloatingLabelFromMapCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
+
+/**
+ * Deployment Diagram Reconciler from 1.0.0 to 1.1.0
+ */
+public class DeploymentReconciler_1_1_0 extends DiagramReconciler {
+
+ private final static String ArtifactEditPart_VISUAL_ID = "2006";
+ private final static String ArtifactFloatingLabelEditPart_VISUAL_ID = "61";
+ private final static String ArtifactEditPartACN_VISUAL_ID = "28";
+ private final static String ArtifactFloatingLabelEditPartACN_VISUAL_ID = "60";
+ private final static String ArtifactEditPartCN_VISUAL_ID = "25";
+ private final static String ArtifactFloatingLabelEditPartCN_VISUAL_ID = "59";
+
+ /**
+ * Gets the reconcile command.
+ *
+ * @param diagram
+ * the diagram
+ * @return the reconcile command
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler#getReconcileCommand(org.eclipse.gmf.runtime.notation.Diagram)
+ */
+ @Override
+ public ICommand getReconcileCommand(Diagram diagram) {
+ return new InsertFloatingLabelFromMapCommand(diagram, getFloatingLabelMap());
+ }
+
+ /**
+ * Gets the floating label map to add.
+ *
+ * @return the floating label map
+ */
+ private Map<String, String> getFloatingLabelMap() {
+ Map<String, String> map = new HashMap<String, String>();
+ map.put(ArtifactEditPart_VISUAL_ID, ArtifactFloatingLabelEditPart_VISUAL_ID);
+ map.put(ArtifactEditPartACN_VISUAL_ID, ArtifactFloatingLabelEditPartACN_VISUAL_ID);
+ map.put(ArtifactEditPartCN_VISUAL_ID, ArtifactFloatingLabelEditPartCN_VISUAL_ID);
+
+ return map;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.configuration
deleted file mode 100644
index e12548d2e03..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.configuration
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
- <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_ARGokHDuEeWh-MssWmCB_A" implementationID="PapyrusUMLDeploymentDiagram">
- <modelRules xmi:id="_ARGokXDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </modelRules>
- <owningRules xmi:id="_ARGoknDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_ARGok3DuEeWh-MssWmCB_A"/>
- </modelKinds>
- </viewpoints>
- <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
- <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
-</configuration:PapyrusConfiguration>
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 9b4c8d055c9..90b4cd183fd 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
@@ -14,14 +14,6 @@
-->
<plugin>
- <extension
- point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
- <contribution
- file="model/DeploymentDiagram.configuration"
- original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
- </contribution>
- </extension>
-
<extension
point="org.eclipse.ui.commands">
<command
@@ -716,21 +708,21 @@
point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
<diagramReconciler
diagramType="PapyrusUMLDeploymentDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.deployment.custom.migration.DeploymentReconciler"
- source="undefined"
- target="1.1.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.deployment.custom.migration.DeploymentReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLDeploymentDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.deployment.custom.migration.DeploymentReconcilerForCompartment"
- source="undefined"
- target="1.2.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.deployment.custom.migration.DeploymentReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLDeploymentDiagram"
reconcilerClass="org.eclipse.papyrus.uml.diagram.deployment.custom.migration.DeploymentReconciler_1_2_0"
source="1.1.0"
- target="1.2.0">
+ target="1.3.0">
</diagramReconciler>
</extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/build.properties
index 218388d3d0b..d23d7a93367 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/build.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/build.properties
@@ -1,15 +1,14 @@
-source.. = src/,\
- src-gen/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- palettes/,\
- icons/,\
- about.html,\
- plugin.properties,\
- messages.properties,\
- model/interactionOverviewDiagram.elementtypesconfigurations,\
- model/InteractionOverviewDiagram.configuration
-
-src.includes = about.html
+source.. = src/,\
+ src-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ palettes/,\
+ icons/,\
+ about.html,\
+ plugin.properties,\
+ messages.properties,\
+ model/interactionOverviewDiagram.elementtypesconfigurations
+
+src.includes = about.html
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/model/InteractionOverviewDiagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/model/InteractionOverviewDiagram.configuration
deleted file mode 100755
index 02826b837d9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/model/InteractionOverviewDiagram.configuration
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/Activity_Shape/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
- <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_FuMjYHDuEeWh-MssWmCB_A" implementationID="PapyrusUMLInteractionOverviewDiagram">
- <modelRules xmi:id="_FuMjYXDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Activity"/>
- </modelRules>
- <owningRules xmi:id="_FuMjYnDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Activity"/>
- </owningRules>
- <owningRules xmi:id="_FuMjY3DuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/>
- <newModelPath xmi:id="_FuMjZHDuEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Activity">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
- </newModelPath>
- </owningRules>
- <owningRules xmi:id="_FuMjZXDuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/>
- <newModelPath xmi:id="_FuMjZnDuEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Activity">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
- </newModelPath>
- </owningRules>
- <owningRules xmi:id="_FuMjZ3DuEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <newModelPath xmi:id="_FuMjaHDuEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Activity">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
- </newModelPath>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_FuMjaXDuEeWh-MssWmCB_A"/>
- </modelKinds>
- </viewpoints>
- <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
- <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
-</configuration:PapyrusConfiguration>
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 ab5f80c2b92..f8b4282b4bb 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.xml
@@ -1,719 +1,704 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<!--
- Copyright (c) 2013, 2014 CEA and others.
-
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- CEA - Initial API and implementation
- Christian W. Damus (CEA) - bug 323802
-
--->
-<plugin>
- <extension
- point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
- <contribution
- file="model/InteractionOverviewDiagram.configuration"
- original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
- </contribution>
- </extension>
-
- <!-- Diagram declaration -->
- <extension point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.uml.diagram.interactionoverview.InteractionOverviewDiagramCreateCommand"
- creationCondition="org.eclipse.papyrus.uml.diagram.interactionoverview.InteractionOverviewDiagramCreationCondition"
- icon="icons/obj16/interactionOverviewDiagram.gif"
- id="org.eclipse.papyrus.uml.diagram.interactionoverview.CreateCommand"
- label="Interaction Overview Diagram"
- language="uml"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.uml.diagram.interactionoverview.InteractionOverviewDiagramEditorFactory"
- icon="icons/obj16/interactionOverviewDiagram.gif"/>
- </extension>
-
- <!-- Diagram creation command and handler -->
- <extension point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.papyrus.uml.diagram.interactionoverview.CreateCommand"
- name="Create a new Interaction Overview Diagram"
- description="Create a new Interaction Overview Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
- </extension>
-
-
- <!-- Diagram creation command registration in menu and toolbar -->
-
- <!-- Palette tool declaration (declares the real palette containment) -->
- <extension
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
- name="UML_InteractionOverviewDiagram">
-
- <paletteDefinition
- ID="UML_InteractionOverviewDiagram"
- class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
- name="UML_InteractionOverviewDiagram"
- icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/interactionoverviewdiagram.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor
- id="org.eclipse.papyrus.uml.diagram.interactionoverview"/>
- </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.interactionoverview.provider.InteractionOverviewDiagramViewProvider">
- <Priority name="Medium"/>
- <context
- viewClass="org.eclipse.gmf.runtime.notation.Diagram"
- semanticHints=""/>
-
-
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from ActivityDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.InheritedActivityDiagramViewProvider">
- <Priority name="Low"/>
-
- <context
- viewClass="org.eclipse.gmf.runtime.notation.Node"
- semanticHints="ActivityFinalNode_Shape, CallBehaviorAction_Shape, Comment_Shape, ConditionalNode_Shape, DecisionNode_Shape, FlowFinalNode_Shape, ForkNode_Shape, InitialNode_Shape, JoinNode_Shape, LoopNode_Shape, MergeNode_Shape, NamedElement_DefaultShape, Activity_Shape, SequenceNode_Shape, Constraint_Shape"/>
-
- <context
- viewClass="org.eclipse.gmf.runtime.notation.Node"
- semanticHints="Parameter_ParameterLabel, Constraint_PreconditionLabel, Constraint_PostconditionLabel"/>
-
- <context
- viewClass="org.eclipse.gmf.runtime.notation.Edge"
- semanticHints="Comment_AnnotatedElementEdge, ControlFlow_Edge"/>
-
- <object
- id="elementtype.node"
- class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
-
- <method
- name="getSemanticHint()"
- value="ActivityFinalNode_Shape, CallBehaviorAction_Shape, Comment_Shape, ConditionalNode_Shape, DecisionNode_Shape, FlowFinalNode_Shape, ForkNode_Shape, InitialNode_Shape, JoinNode_Shape, LoopNode_Shape, MergeNode_Shape, NamedElement_DefaultShape, Activity_Shape, SequenceNode_Shape, Constraint_Shape">
- </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="Comment_AnnotatedElementEdge, ControlFlow_Edge">
- </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.ActivityFinalNode" -->
- <object
- id="uml.ActivityFinalNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.ActivityFinalNode"/>
- </object>
-
- <!-- "uml.CallBehaviorAction" -->
- <object
- id="uml.CallBehaviorAction"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.CallBehaviorAction"/>
- </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.ConditionalNode" -->
- <object
- id="uml.ConditionalNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.ConditionalNode"/>
- </object>
-
- <!-- "uml.DecisionNode" -->
- <object
- id="uml.DecisionNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.DecisionNode"/>
- </object>
-
- <!-- "uml.FlowFinalNode" -->
- <object
- id="uml.FlowFinalNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.FlowFinalNode"/>
- </object>
-
- <!-- "uml.ForkNode" -->
- <object
- id="uml.ForkNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.ForkNode"/>
- </object>
-
- <!-- "uml.InitialNode" -->
- <object
- id="uml.InitialNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.InitialNode"/>
- </object>
-
- <!-- "uml.JoinNode" -->
- <object
- id="uml.JoinNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.JoinNode"/>
- </object>
-
- <!-- "uml.LoopNode" -->
- <object
- id="uml.LoopNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.LoopNode"/>
- </object>
-
- <!-- "uml.MergeNode" -->
- <object
- id="uml.MergeNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.MergeNode"/>
- </object>
-
- <!-- "uml.NamedElement" -->
- <object
- id="uml.NamedElement"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.NamedElement"/>
- </object>
-
- <!-- "uml.Activity" -->
- <object
- id="uml.Activity"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.Activity"/>
- </object>
-
- <!-- "uml.SequenceNode" -->
- <object
- id="uml.SequenceNode"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.SequenceNode"/>
- </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.Parameter" -->
- <object
- id="uml.Parameter"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.Parameter"/>
- </object>
-
- <!-- "uml.ControlFlow" -->
- <object
- id="uml.ControlFlow"
- class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method
- name="getProxyClassID()"
- value="uml.ControlFlow"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context
- viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.ActivityFinalNode, uml.CallBehaviorAction, uml.Comment, uml.ConditionalNode, uml.DecisionNode, uml.FlowFinalNode, uml.ForkNode, uml.InitialNode, uml.JoinNode, uml.LoopNode, uml.MergeNode, uml.NamedElement, uml.Activity, uml.SequenceNode, uml.Constraint, uml.Parameter"/>
-
- <!-- Additional activation contexts for edges semantic objects -->
- <context
- viewClass="org.eclipse.gmf.runtime.notation.Edge"
- elements="uml.ControlFlow"/>
-
- </viewProvider>
- <viewProvider
- class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.CustomViewProvider">
- <Priority
- name="High">
- </Priority>
- <context
- viewClass="org.eclipse.gmf.runtime.notation.Node"
- semanticHints="CallBehaviorAction_InteractionShape, CallBehaviorAction_InteractionUseShape"/>
-
- <object
- id="elementtype.node"
- class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
-
- <method
- name="getSemanticHint()"
- value="CallBehaviorAction_InteractionShape">
- </method>
- </object>
- <object
- id=""
- class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
-
- <method
- name="getSemanticHint()"
- value="CallBehaviorAction_InteractionUseShape">
- </method>
- </object>
- <context
- viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="elementtype.node"/>
-
- </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.interactionoverview.provider.InteractionOverviewDiagramEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.uml.diagram.interactionoverview.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method
- name="getType()"
- value="PapyrusUMLInteractionOverviewDiagram"/>
- </object>
- <context views="org.eclipse.papyrus.uml.diagram.interactionoverview.Diagram"/>
- </editpartProvider>
-
- <!-- EditPartProvider for inherited elements (from ActivityDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.InheritedActivityDiagramEditPartProvider">
- <Priority name="Low"/>
- <object
- id="ACTIVITY_FINAL_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="ActivityFinalNode_Shape, ActivityFinalNode_StereotypeLabel"/>
- </object>
- <object
- id="CALL_BEHAVIOR_ACTION_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="CallBehaviorAction_Shape, CallBehaviorAction_NameLabel"/>
- </object>
- <object
- id="COMMENT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="Comment_Shape, Comment_BodyLabel"/>
- </object>
- <object
- id="CONDITIONAL_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="ConditionalNode_Shape, ConditionalNode_KeywordLabel, ConditionalNode_ActivityNodeCompartment"/>
- </object>
- <object
- id="DECISION_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="DecisionNode_Shape, DecisionNode_DecisionInputLabel, DecisionNode_StereotypeLabel"/>
- </object>
- <object
- id="FLOW_FINAL_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="FlowFinalNode_Shape, FlowFinalNode_StereotypeLabel"/>
- </object>
- <object
- id="FORK_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="ForkNode_Shape, ForkNode_StereotypeLabel"/>
- </object>
- <object
- id="INITIAL_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="InitialNode_Shape, InitialNode_StereotypeLabel"/>
- </object>
- <object
- id="JOIN_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="JoinNode_Shape, JoinNode_JoinSpecLabel, JoinNode_StereotypeLabel"/>
- </object>
- <object
- id="LOOP_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="LoopNode_Shape, LoopNode_KeywordLabel, LoopNode_ActivityNodeCompartment"/>
- </object>
- <object
- id="MERGE_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="MergeNode_Shape, MergeNode_StereotypeLabel"/>
- </object>
- <object
- id="SHAPE_NAMED_ELEMENT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="NamedElement_DefaultShape, NamedElement_NameLabel"/>
- </object>
- <object
- id="ACTIVITY"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="Activity_NameLabel, Activity_KeywordLabel, Activity_ParameterCompartment, Activity_PreconditionCompartment, Activity_PostconditionCompartment, Activity_ActivityNodeCompartment"/>
- </object>
- <object
- id="SEQUENCE_NODE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="SequenceNode_Shape, SequenceNode_KeywordLabel, SequenceNode_ActivityNodeCompartment"/>
- </object>
- <object
- id="CONSTRAINT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="Constraint_Shape, Constraint_NameLabel, Constraint_BodyLabel"/>
- </object>
-
- <object
- id="ACTIVITY_PARAMETER_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="Parameter_ParameterLabel"/>
- </object>
- <object
- id="ACTIVITY_CONSTRAINT_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="Constraint_PreconditionLabel"/>
- </object>
- <object
- id="ACTIVITY_CONSTRAINT_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method
- name="getType()"
- value="Constraint_PostconditionLabel"/>
- </object>
-
- <object
- id="COMMENT_ANNOTATED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method
- name="getType()"
- value="Comment_AnnotatedElementEdge"/>
- </object>
- <object
- id="CONTROL_FLOW"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method
- name="getType()"
- value="ControlFlow_Edge, ControlFlow_NameLabel, ControlFlow_WeightLabel, ControlFlow_GuardLabel, ControlFlow_StereotypeLabel, ControlFlow_IconLabel"/>
- </object>
-
- <context
- views="ACTIVITY_FINAL_NODE_CN, CALL_BEHAVIOR_ACTION_CN, COMMENT_CN, CONDITIONAL_NODE_CN, DECISION_NODE_CN, FLOW_FINAL_NODE_CN, FORK_NODE_CN, INITIAL_NODE_CN, JOIN_NODE_CN, LOOP_NODE_CN, MERGE_NODE_CN, SHAPE_NAMED_ELEMENT_CN, SEQUENCE_NODE_CN, CONSTRAINT_CN"/>
- <context views="ACTIVITY_PARAMETER_CLN, ACTIVITY_CONSTRAINT_CLN, ACTIVITY_CONSTRAINT_CLN"/>
- <context views="COMMENT_ANNOTATED_ELEMENT, CONTROL_FLOW"/>
-
- </editpartProvider>
- </extension>
-
-<extension
- id="custom-ep-provider"
- point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
- <editpartProvider
- class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.CustomEditPartProvider">
- <Priority name="Medium"/>
- <object
- class="org.eclipse.gmf.runtime.notation.Node"
- id="ACTIVITY">
- <method name="getType()" value="Activity_Shape"/>
- </object>
- <context views="ACTIVITY"/>
- </editpartProvider>
- </extension>
-
- <!-- Diagram edit policy provider -->
- <extension point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider class="org.eclipse.papyrus.uml.diagram.interactionoverview.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.interactionoverview.preferences"
- name="InteractionOverviewDiagram Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.interactionoverview.preferences.InteractionOverviewDiagramGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- </extension>
-
- <!-- // Start of user code custom extensions -->
-
- <extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.CustomUMLParserProvider">
- <Priority name="Low"/>
- </ParserProvider>
- </extension>
- <extension
- id="org.eclipse.papyrus.uml.diagram.timing.palettedefinition"
- name="Papyrus Interaction Overview Diagram Predefined Entries"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
- <paletteProvider
- class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority
- name="Medium">
- </Priority>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.interactionoverview.part.CustomIODPaletteFactory">
- <entry
- defineOnly="false"
- description="Create a new Interaction with snapshot"
- id="createCallBehaviorActionAsInteractionCreationTool"
- kind="tool"
- label="Interaction"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif"
- path="/interactionoverview.drawer.nodes/"
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif">
- </entry>
- <entry
- defineOnly="false"
- description="Create a new InteractionUse"
- id="interactionoverview.drawer.nodes.interactionuse"
- kind="tool"
- label="Interaction Use"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
- path="/interactionoverview.drawer.nodes/"
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif">
- </entry>
- </contribution>
- <editor
- id="org.eclipse.papyrus.uml.diagram.interactionoverview">
- </editor>
- </paletteProvider>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- defaultHandler="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.commands.UpdateDiagramInSnapshotCommandHandler"
- description="Update Snapshot in Interaction"
- id="org.eclipse.papyrus.uml.diagram.interactionoverview.updateSnapshotCommand"
- name="Update Snapshot in Interaction">
- </command>
- <command
- defaultHandler="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.commands.SwitchInteractionFormCommandHandler"
- description="Switch Interaction &lt;-&gt; InteractionUse"
- id="org.eclipse.papyrus.uml.diagram.interactionoverview.switchInteraction"
- name="Switch Interaction &lt;-&gt; InteractionUse">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="true"
- locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?after=additions">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.interactionoverview.updateSnapshotCommand"
- label="Update Snapshot"
- style="push">
- <visibleWhen>
-
- <iterate
- ifEmpty="false"
- operator="or">
- <instanceof value="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.part.CallBehaviorActionAsInteractionEditPart">
- </instanceof>
- </iterate>
-
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.papyrus.uml.diagram.interactionoverview.switchInteraction"
- label="Switch Interaction &lt;-&gt;InteractionUse"
- style="push">
- <visibleWhen>
- <iterate
- ifEmpty="false"
- operator="or">
- <instanceof
- value="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.part.CallBehaviorActionAsInteractionEditPart">
- </instanceof>
- <instanceof
- value="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.part.CustomInteractionUseEditPartCN">
- </instanceof>
- </iterate>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.gmfdiag.dnd.dropStrategy">
- <strategy
- strategy="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.commands.CallBehaviorActionToInteractionDropStrategy">
- </strategy>
- </extension>
- <!-- Insert custom extensions here. -->
-
- <!-- // End of user code -->
-<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
- <diagramMappings diagramID="PapyrusUMLInteractionOverviewDiagram">
- <mapping type="PapyrusUMLInteractionOverviewDiagram" humanReadableType="InteractionOverviewDiagram"/>
- <!-- Compartments -->
-
- <!-- Link labels -->
- </diagramMappings>
-</extension>
-<extension
- point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration">
- <elementTypeSet
- clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext"
- path="model/interactionOverviewDiagram.elementtypesconfigurations">
- </elementTypeSet>
-</extension>
-
-<extension
- point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
- <diagramReconciler
- diagramType="PapyrusUMLInteractionOverviewDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.activity.migration.ActivityReconciler"
- source="undefined"
- target="1.1.0">
- </diagramReconciler>
- <diagramReconciler
- diagramType="PapyrusUMLInteractionOverviewDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.interactionoverview.migration.InteractionOverviewReconciler_1_2_0"
- source="1.1.0"
- target="1.2.0">
- </diagramReconciler>
-</extension>
-
- <extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
- <?gmfgen generated="true"?>
- <visualTypeProvider
- class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.UMLVisualTypeProvider"
- diagramType="PapyrusUMLInteractionOverviewDiagram">
- </visualTypeProvider>
- </extension>
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2013, 2014 CEA and others.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ CEA - Initial API and implementation
+ Christian W. Damus (CEA) - bug 323802
+
+-->
+<plugin>
+ <!-- Diagram declaration -->
+ <extension point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
+ <creationCommand
+ creationCommandClass="org.eclipse.papyrus.uml.diagram.interactionoverview.InteractionOverviewDiagramCreateCommand"
+ creationCondition="org.eclipse.papyrus.uml.diagram.interactionoverview.InteractionOverviewDiagramCreationCondition"
+ icon="icons/obj16/interactionOverviewDiagram.gif"
+ id="org.eclipse.papyrus.uml.diagram.interactionoverview.CreateCommand"
+ label="Interaction Overview Diagram"
+ language="uml"/>
+ <editorDiagram
+ actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
+ factoryClass="org.eclipse.papyrus.uml.diagram.interactionoverview.InteractionOverviewDiagramEditorFactory"
+ icon="icons/obj16/interactionOverviewDiagram.gif"/>
+ </extension>
+
+ <!-- Diagram creation command and handler -->
+ <extension point="org.eclipse.ui.commands">
+ <command
+ id="org.eclipse.papyrus.uml.diagram.interactionoverview.CreateCommand"
+ name="Create a new Interaction Overview Diagram"
+ description="Create a new Interaction Overview Diagram"
+ categoryId="org.eclipse.papyrus.editor.category"/>
+ </extension>
+
+
+ <!-- Diagram creation command registration in menu and toolbar -->
+
+ <!-- Palette tool declaration (declares the real palette containment) -->
+ <extension
+ point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+ name="UML_InteractionOverviewDiagram">
+
+ <paletteDefinition
+ ID="UML_InteractionOverviewDiagram"
+ class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
+ name="UML_InteractionOverviewDiagram"
+ icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="palettes/interactionoverviewdiagram.palette.xml"
+ provider="CEA LIST">
+ <Priority name="Low"/>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor
+ id="org.eclipse.papyrus.uml.diagram.interactionoverview"/>
+ </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.interactionoverview.provider.InteractionOverviewDiagramViewProvider">
+ <Priority name="Medium"/>
+ <context
+ viewClass="org.eclipse.gmf.runtime.notation.Diagram"
+ semanticHints=""/>
+
+
+ </viewProvider>
+
+ <!-- ViewProvider for inherited elements (from ActivityDiagram ViewProvider) -->
+ <viewProvider class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.InheritedActivityDiagramViewProvider">
+ <Priority name="Low"/>
+
+ <context
+ viewClass="org.eclipse.gmf.runtime.notation.Node"
+ semanticHints="ActivityFinalNode_Shape, CallBehaviorAction_Shape, Comment_Shape, ConditionalNode_Shape, DecisionNode_Shape, FlowFinalNode_Shape, ForkNode_Shape, InitialNode_Shape, JoinNode_Shape, LoopNode_Shape, MergeNode_Shape, NamedElement_DefaultShape, Activity_Shape, SequenceNode_Shape, Constraint_Shape"/>
+
+ <context
+ viewClass="org.eclipse.gmf.runtime.notation.Node"
+ semanticHints="Parameter_ParameterLabel, Constraint_PreconditionLabel, Constraint_PostconditionLabel"/>
+
+ <context
+ viewClass="org.eclipse.gmf.runtime.notation.Edge"
+ semanticHints="Comment_AnnotatedElementEdge, ControlFlow_Edge"/>
+
+ <object
+ id="elementtype.node"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+
+ <method
+ name="getSemanticHint()"
+ value="ActivityFinalNode_Shape, CallBehaviorAction_Shape, Comment_Shape, ConditionalNode_Shape, DecisionNode_Shape, FlowFinalNode_Shape, ForkNode_Shape, InitialNode_Shape, JoinNode_Shape, LoopNode_Shape, MergeNode_Shape, NamedElement_DefaultShape, Activity_Shape, SequenceNode_Shape, Constraint_Shape">
+ </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="Comment_AnnotatedElementEdge, ControlFlow_Edge">
+ </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.ActivityFinalNode" -->
+ <object
+ id="uml.ActivityFinalNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.ActivityFinalNode"/>
+ </object>
+
+ <!-- "uml.CallBehaviorAction" -->
+ <object
+ id="uml.CallBehaviorAction"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.CallBehaviorAction"/>
+ </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.ConditionalNode" -->
+ <object
+ id="uml.ConditionalNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.ConditionalNode"/>
+ </object>
+
+ <!-- "uml.DecisionNode" -->
+ <object
+ id="uml.DecisionNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.DecisionNode"/>
+ </object>
+
+ <!-- "uml.FlowFinalNode" -->
+ <object
+ id="uml.FlowFinalNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.FlowFinalNode"/>
+ </object>
+
+ <!-- "uml.ForkNode" -->
+ <object
+ id="uml.ForkNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.ForkNode"/>
+ </object>
+
+ <!-- "uml.InitialNode" -->
+ <object
+ id="uml.InitialNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.InitialNode"/>
+ </object>
+
+ <!-- "uml.JoinNode" -->
+ <object
+ id="uml.JoinNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.JoinNode"/>
+ </object>
+
+ <!-- "uml.LoopNode" -->
+ <object
+ id="uml.LoopNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.LoopNode"/>
+ </object>
+
+ <!-- "uml.MergeNode" -->
+ <object
+ id="uml.MergeNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.MergeNode"/>
+ </object>
+
+ <!-- "uml.NamedElement" -->
+ <object
+ id="uml.NamedElement"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.NamedElement"/>
+ </object>
+
+ <!-- "uml.Activity" -->
+ <object
+ id="uml.Activity"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.Activity"/>
+ </object>
+
+ <!-- "uml.SequenceNode" -->
+ <object
+ id="uml.SequenceNode"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.SequenceNode"/>
+ </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.Parameter" -->
+ <object
+ id="uml.Parameter"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.Parameter"/>
+ </object>
+
+ <!-- "uml.ControlFlow" -->
+ <object
+ id="uml.ControlFlow"
+ class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method
+ name="getProxyClassID()"
+ value="uml.ControlFlow"/>
+ </object>
+
+ <!-- Additional activation contexts for nodes semantic objects -->
+ <context
+ viewClass="org.eclipse.gmf.runtime.notation.Node"
+ elements="uml.ActivityFinalNode, uml.CallBehaviorAction, uml.Comment, uml.ConditionalNode, uml.DecisionNode, uml.FlowFinalNode, uml.ForkNode, uml.InitialNode, uml.JoinNode, uml.LoopNode, uml.MergeNode, uml.NamedElement, uml.Activity, uml.SequenceNode, uml.Constraint, uml.Parameter"/>
+
+ <!-- Additional activation contexts for edges semantic objects -->
+ <context
+ viewClass="org.eclipse.gmf.runtime.notation.Edge"
+ elements="uml.ControlFlow"/>
+
+ </viewProvider>
+ <viewProvider
+ class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.CustomViewProvider">
+ <Priority
+ name="High">
+ </Priority>
+ <context
+ viewClass="org.eclipse.gmf.runtime.notation.Node"
+ semanticHints="CallBehaviorAction_InteractionShape, CallBehaviorAction_InteractionUseShape"/>
+
+ <object
+ id="elementtype.node"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+
+ <method
+ name="getSemanticHint()"
+ value="CallBehaviorAction_InteractionShape">
+ </method>
+ </object>
+ <object
+ id=""
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+
+ <method
+ name="getSemanticHint()"
+ value="CallBehaviorAction_InteractionUseShape">
+ </method>
+ </object>
+ <context
+ viewClass="org.eclipse.gmf.runtime.notation.Node"
+ elements="elementtype.node"/>
+
+ </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.interactionoverview.provider.InteractionOverviewDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="org.eclipse.papyrus.uml.diagram.interactionoverview.Diagram"
+ class="org.eclipse.gmf.runtime.notation.Diagram">
+ <method
+ name="getType()"
+ value="PapyrusUMLInteractionOverviewDiagram"/>
+ </object>
+ <context views="org.eclipse.papyrus.uml.diagram.interactionoverview.Diagram"/>
+ </editpartProvider>
+
+ <!-- EditPartProvider for inherited elements (from ActivityDiagram) -->
+ <editpartProvider class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.InheritedActivityDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="ACTIVITY_FINAL_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="ActivityFinalNode_Shape, ActivityFinalNode_StereotypeLabel"/>
+ </object>
+ <object
+ id="CALL_BEHAVIOR_ACTION_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="CallBehaviorAction_Shape, CallBehaviorAction_NameLabel"/>
+ </object>
+ <object
+ id="COMMENT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="Comment_Shape, Comment_BodyLabel"/>
+ </object>
+ <object
+ id="CONDITIONAL_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="ConditionalNode_Shape, ConditionalNode_KeywordLabel, ConditionalNode_ActivityNodeCompartment"/>
+ </object>
+ <object
+ id="DECISION_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="DecisionNode_Shape, DecisionNode_DecisionInputLabel, DecisionNode_StereotypeLabel"/>
+ </object>
+ <object
+ id="FLOW_FINAL_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="FlowFinalNode_Shape, FlowFinalNode_StereotypeLabel"/>
+ </object>
+ <object
+ id="FORK_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="ForkNode_Shape, ForkNode_StereotypeLabel"/>
+ </object>
+ <object
+ id="INITIAL_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="InitialNode_Shape, InitialNode_StereotypeLabel"/>
+ </object>
+ <object
+ id="JOIN_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="JoinNode_Shape, JoinNode_JoinSpecLabel, JoinNode_StereotypeLabel"/>
+ </object>
+ <object
+ id="LOOP_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="LoopNode_Shape, LoopNode_KeywordLabel, LoopNode_ActivityNodeCompartment"/>
+ </object>
+ <object
+ id="MERGE_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="MergeNode_Shape, MergeNode_StereotypeLabel"/>
+ </object>
+ <object
+ id="SHAPE_NAMED_ELEMENT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="NamedElement_DefaultShape, NamedElement_NameLabel"/>
+ </object>
+ <object
+ id="ACTIVITY"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="Activity_NameLabel, Activity_KeywordLabel, Activity_ParameterCompartment, Activity_PreconditionCompartment, Activity_PostconditionCompartment, Activity_ActivityNodeCompartment"/>
+ </object>
+ <object
+ id="SEQUENCE_NODE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="SequenceNode_Shape, SequenceNode_KeywordLabel, SequenceNode_ActivityNodeCompartment"/>
+ </object>
+ <object
+ id="CONSTRAINT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="Constraint_Shape, Constraint_NameLabel, Constraint_BodyLabel"/>
+ </object>
+
+ <object
+ id="ACTIVITY_PARAMETER_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="Parameter_ParameterLabel"/>
+ </object>
+ <object
+ id="ACTIVITY_CONSTRAINT_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="Constraint_PreconditionLabel"/>
+ </object>
+ <object
+ id="ACTIVITY_CONSTRAINT_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method
+ name="getType()"
+ value="Constraint_PostconditionLabel"/>
+ </object>
+
+ <object
+ id="COMMENT_ANNOTATED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method
+ name="getType()"
+ value="Comment_AnnotatedElementEdge"/>
+ </object>
+ <object
+ id="CONTROL_FLOW"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method
+ name="getType()"
+ value="ControlFlow_Edge, ControlFlow_NameLabel, ControlFlow_WeightLabel, ControlFlow_GuardLabel, ControlFlow_StereotypeLabel, ControlFlow_IconLabel"/>
+ </object>
+
+ <context
+ views="ACTIVITY_FINAL_NODE_CN, CALL_BEHAVIOR_ACTION_CN, COMMENT_CN, CONDITIONAL_NODE_CN, DECISION_NODE_CN, FLOW_FINAL_NODE_CN, FORK_NODE_CN, INITIAL_NODE_CN, JOIN_NODE_CN, LOOP_NODE_CN, MERGE_NODE_CN, SHAPE_NAMED_ELEMENT_CN, SEQUENCE_NODE_CN, CONSTRAINT_CN"/>
+ <context views="ACTIVITY_PARAMETER_CLN, ACTIVITY_CONSTRAINT_CLN, ACTIVITY_CONSTRAINT_CLN"/>
+ <context views="COMMENT_ANNOTATED_ELEMENT, CONTROL_FLOW"/>
+
+ </editpartProvider>
+ </extension>
+
+<extension
+ id="custom-ep-provider"
+ point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <editpartProvider
+ class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.CustomEditPartProvider">
+ <Priority name="Medium"/>
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node"
+ id="ACTIVITY">
+ <method name="getType()" value="Activity_Shape"/>
+ </object>
+ <context views="ACTIVITY"/>
+ </editpartProvider>
+ </extension>
+
+ <!-- Diagram edit policy provider -->
+ <extension point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider class="org.eclipse.papyrus.uml.diagram.interactionoverview.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.interactionoverview.preferences"
+ name="InteractionOverviewDiagram Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.uml.diagram.interactionoverview.preferences.InteractionOverviewDiagramGeneralPreferencePage">
+ </page>
+
+ <!-- Element Preference pages declaration -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </extension>
+
+ <!-- // Start of user code custom extensions -->
+
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+ <?gmfgen generated="true"?>
+ <ParserProvider class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.CustomUMLParserProvider">
+ <Priority name="Low"/>
+ </ParserProvider>
+ </extension>
+ <extension
+ id="org.eclipse.papyrus.uml.diagram.timing.palettedefinition"
+ name="Papyrus Interaction Overview Diagram Predefined Entries"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+ <paletteProvider
+ class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority
+ name="Medium">
+ </Priority>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.interactionoverview.part.CustomIODPaletteFactory">
+ <entry
+ defineOnly="false"
+ description="Create a new Interaction with snapshot"
+ id="createCallBehaviorActionAsInteractionCreationTool"
+ kind="tool"
+ label="Interaction"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif"
+ path="/interactionoverview.drawer.nodes/"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interaction.gif">
+ </entry>
+ <entry
+ defineOnly="false"
+ description="Create a new InteractionUse"
+ id="interactionoverview.drawer.nodes.interactionuse"
+ kind="tool"
+ label="Interaction Use"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
+ path="/interactionoverview.drawer.nodes/"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif">
+ </entry>
+ </contribution>
+ <editor
+ id="org.eclipse.papyrus.uml.diagram.interactionoverview">
+ </editor>
+ </paletteProvider>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ defaultHandler="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.commands.UpdateDiagramInSnapshotCommandHandler"
+ description="Update Snapshot in Interaction"
+ id="org.eclipse.papyrus.uml.diagram.interactionoverview.updateSnapshotCommand"
+ name="Update Snapshot in Interaction">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.commands.SwitchInteractionFormCommandHandler"
+ description="Switch Interaction &lt;-&gt; InteractionUse"
+ id="org.eclipse.papyrus.uml.diagram.interactionoverview.switchInteraction"
+ name="Switch Interaction &lt;-&gt; InteractionUse">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?after=additions">
+ <command
+ commandId="org.eclipse.papyrus.uml.diagram.interactionoverview.updateSnapshotCommand"
+ label="Update Snapshot"
+ style="push">
+ <visibleWhen>
+
+ <iterate
+ ifEmpty="false"
+ operator="or">
+ <instanceof value="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.part.CallBehaviorActionAsInteractionEditPart">
+ </instanceof>
+ </iterate>
+
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.uml.diagram.interactionoverview.switchInteraction"
+ label="Switch Interaction &lt;-&gt;InteractionUse"
+ style="push">
+ <visibleWhen>
+ <iterate
+ ifEmpty="false"
+ operator="or">
+ <instanceof
+ value="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.part.CallBehaviorActionAsInteractionEditPart">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.part.CustomInteractionUseEditPartCN">
+ </instanceof>
+ </iterate>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.dnd.dropStrategy">
+ <strategy
+ strategy="org.eclipse.papyrus.uml.diagram.interactionoverview.edit.commands.CallBehaviorActionToInteractionDropStrategy">
+ </strategy>
+ </extension>
+ <!-- Insert custom extensions here. -->
+
+ <!-- // End of user code -->
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
+ <diagramMappings diagramID="PapyrusUMLInteractionOverviewDiagram">
+ <mapping type="PapyrusUMLInteractionOverviewDiagram" humanReadableType="InteractionOverviewDiagram"/>
+ <!-- Compartments -->
+
+ <!-- Link labels -->
+ </diagramMappings>
+</extension>
+
+<extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
+ <diagramReconciler
+ diagramType="PapyrusUMLInteractionOverviewDiagram"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.activity.migration.ActivityReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="PapyrusUMLInteractionOverviewDiagram"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.interactionoverview.migration.InteractionOverviewReconciler_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+</extension>
+
+ <extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
+ <?gmfgen generated="true"?>
+ <visualTypeProvider
+ class="org.eclipse.papyrus.uml.diagram.interactionoverview.provider.UMLVisualTypeProvider"
+ diagramType="PapyrusUMLInteractionOverviewDiagram">
+ </visualTypeProvider>
+ </extension>
+</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/policy/DiagramSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/policy/DiagramSemanticEditPolicy.java
index f412f123a9f..8d77aebb030 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/policy/DiagramSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/policy/DiagramSemanticEditPolicy.java
@@ -1,43 +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
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.interactionoverview.edit.policy;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.interactionoverview.provider.ElementTypes;
-// Start of user code custom imports
-// End of user code
-
-public class DiagramSemanticEditPolicy extends SemanticEditPolicy {
-
- protected Command getCreateCommand(final CreateElementRequest req) {
-
- final IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(UMLElementTypes.Package_ActivityDiagram);
- if (commandService == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- // Start of user code custom creation commands
- // End of user code
-
- if (ElementTypes.ACTIVITY == req.getElementType()) {
- final CreateElementRequest createRequest = new CreateElementRequest(req.getContainer(), UMLElementTypes.Activity_Shape);
- return new ICommandProxy(commandService.getEditCommand(createRequest));
- }
- return UnexecutableCommand.INSTANCE;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.interactionoverview.provider.ElementTypes;
+// Start of user code custom imports
+// End of user code
+
+public class DiagramSemanticEditPolicy extends SemanticEditPolicy {
+
+ protected Command getCreateCommand(final CreateElementRequest req) {
+
+ final IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(UMLElementTypes.Package_ActivityDiagram, req.getClientContext());
+ if (commandService == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Start of user code custom creation commands
+ // End of user code
+
+ if (ElementTypes.ACTIVITY == req.getElementType()) {
+ final CreateElementRequest createRequest = new CreateElementRequest(req.getContainer(), UMLElementTypes.Activity_Shape);
+ return new ICommandProxy(commandService.getEditCommand(createRequest));
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/CreateProfileModelCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/CreateProfileModelCommand.java
index 6ea452c1d7b..48de978b291 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/CreateProfileModelCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/CreateProfileModelCommand.java
@@ -1,59 +1,57 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.profile;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.uml.diagram.common.commands.ModelCreationCommandBase;
-import org.eclipse.uml2.uml.UMLFactory;
-
-
-/**
- * The Class CreateProfileModelCommand.
- */
-public class CreateProfileModelCommand extends ModelCreationCommandBase {
-
- public static final String COMMAND_ID = "profile";
-
- /**
- * @see org.eclipse.papyrus.infra.core.extension.commands.ModelCreationCommandBase#createRootElement()
- *
- * @return
- */
-
- @Override
- protected EObject createRootElement() {
- return UMLFactory.eINSTANCE.createProfile();
- }
-
- /**
- * @see org.eclipse.papyrus.infra.core.extension.commands.ModelCreationCommandBase#initializeModel(org.eclipse.emf.ecore.EObject)
- *
- * @param owner
- */
-
- @Override
- protected void initializeModel(EObject owner) {
- super.initializeModel(owner);
- ((org.eclipse.uml2.uml.Package) owner).setName(getModelName());
- }
-
- /**
- * Gets the model name.
- *
- * @return the model name
- */
- protected String getModelName() {
- return "profile"; //$NON-NLS-1$
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.uml.diagram.common.commands.ModelCreationCommandBase;
+import org.eclipse.uml2.uml.UMLFactory;
+
+
+/**
+ * The Class CreateProfileModelCommand.
+ */
+public class CreateProfileModelCommand extends ModelCreationCommandBase {
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.extension.commands.ModelCreationCommandBase#createRootElement()
+ *
+ * @return
+ */
+
+ @Override
+ protected EObject createRootElement() {
+ return UMLFactory.eINSTANCE.createProfile();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.extension.commands.ModelCreationCommandBase#initializeModel(org.eclipse.emf.ecore.EObject)
+ *
+ * @param owner
+ */
+
+ @Override
+ protected void initializeModel(EObject owner) {
+ super.initializeModel(owner);
+ ((org.eclipse.uml2.uml.Package) owner).setName(getModelName());
+ }
+
+ /**
+ * Gets the model name.
+ *
+ * @return the model name
+ */
+ protected String getModelName() {
+ return "profile"; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.configuration
deleted file mode 100644
index 154f3ca79de..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.configuration
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmi:id="_ko07IErbEeSdQKzSRatBjg">
- <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_UekVgHDwEeWh-MssWmCB_A" implementationID="PapyrusUMLProfileDiagram">
- <modelRules xmi:id="_UekVgXDwEeWh-MssWmCB_A">
- <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_UekVgnDwEeWh-MssWmCB_A" name="IsContainedByProfile">
- <constraintType href="platform:/plugin/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.4"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_UekVg3DwEeWh-MssWmCB_A" name="className" value="org.eclipse.papyrus.infra.viewpoints.policy.query.IsContainedByProfileQuery"/>
- </constraints>
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </modelRules>
- <owningRules xmi:id="_UekVhHDwEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </owningRules>
- <owningRules xmi:id="_UekVhXDwEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Profile"/>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb5NxhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_UekVhnDwEeWh-MssWmCB_A"/>
- </modelKinds>
- </viewpoints>
- <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
- <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
-</configuration:PapyrusConfiguration>
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 8a891dcfe9d..859b4a18895 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml
@@ -15,14 +15,6 @@
-->
<plugin>
- <extension
- point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
- <contribution
- file="model/profilediagram.configuration"
- original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
- </contribution>
- </extension>
-
<extension point="org.eclipse.ui.contexts" id="ui-context">
<?gmfgen generated="true"?>
<context
@@ -692,18 +684,6 @@
</command>
</extension>
-<extension
- point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
- <diagramCategory
- class="org.eclipse.papyrus.uml.diagram.profile.CreateProfileModelCommand"
- description="Profile diagram"
- extensionPrefix="profile"
- icon="icons/wizban/category_profile.gif"
- id="profile"
- label="Profile">
- </diagramCategory>
-</extension>
-
<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
<?gmfgen generated="true"?>
<ParserProvider class="org.eclipse.papyrus.uml.diagram.profile.providers.UMLParserProvider">
@@ -948,7 +928,7 @@
diagramType="PapyrusUMLProfileDiagram"
reconcilerClass="org.eclipse.papyrus.uml.diagram.profile.custom.migration.ProfileReconciler_1_2_0"
source="1.1.0"
- target="1.2.0">
+ target="1.3.0">
</diagramReconciler>
</extension>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src-gen/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src-gen/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
index aca088e7930..01042d3f895 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src-gen/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src-gen/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
@@ -1,127 +1,127 @@
-/**
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.profile.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class ClassPropertyCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ClassPropertyCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Property newElement = UMLFactory.eINSTANCE.createProperty();
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_ClassAttributeLabel(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Property 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class ClassPropertyCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ClassPropertyCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Property newElement = UMLFactory.eINSTANCE.createProperty();
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_ClassAttributeLabel(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Property 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());
+ 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.sequence/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/build.properties
index eaf6940f889..e20fc25145c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/build.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/build.properties
@@ -9,7 +9,6 @@ bin.includes = META-INF/,\
plugin.xml,\
about.html,\
custom-messages.properties,\
- model/sequenceDiagram.configuration,\
model/sequencediagram-uml.elementtypesconfigurations,\
model/sequencediagram.elementtypesconfigurations
output..=bin/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceReconcilerForCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceReconcilerForCompartment_1_2_0.java
index b392cc05ff2..043417932f5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceReconcilerForCompartment.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceReconcilerForCompartment_1_2_0.java
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.ReconcilerForCompartm
/**
* Diagram Reconciler for compartment from 1.1.0 to 1.2.0
*/
-public class SequenceReconcilerForCompartment extends ReconcilerForCompartment {
+public class SequenceReconcilerForCompartment_1_2_0 extends ReconcilerForCompartment {
private static final String InteractionInteractionCompartmentEditPart_VISUAL_ID = "7001";
private static final String CombinedFragmentCombinedFragmentCompartmentEditPart_VISUAL_ID = "7004";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.configuration
deleted file mode 100644
index 2322f2f4a16..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.configuration
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg">
- <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
- <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_TR15IHDvEeWh-MssWmCB_A" implementationID="PapyrusUMLSequenceDiagram">
- <modelRules xmi:id="_TR15IXDvEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
- </modelRules>
- <owningRules xmi:id="_TR15InDvEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
- </owningRules>
- <owningRules xmi:id="_TR15I3DvEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/>
- <newModelPath xmi:id="_TR15JHDvEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Interaction">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
- </newModelPath>
- </owningRules>
- <owningRules xmi:id="_TR15JXDvEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/>
- <newModelPath xmi:id="_TR15JnDvEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Interaction">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
- </newModelPath>
- </owningRules>
- <owningRules xmi:id="_TR15J3DvEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- <newModelPath xmi:id="_TR15KHDvEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Interaction">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
- </newModelPath>
- </owningRules>
- <owningRules xmi:id="_TR15KXDvEeWh-MssWmCB_A">
- <element href="http://www.eclipse.org/uml2/5.0.0/UML#//UseCase"/>
- <newModelPath xmi:id="_TR15KnDvEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.Interaction">
- <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
- </newModelPath>
- </owningRules>
- <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/>
- <childRules xmi:id="_TR15K3DvEeWh-MssWmCB_A"/>
- </modelKinds>
- </viewpoints>
- <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
- <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
-</configuration:PapyrusConfiguration>
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 b1c9e0a9ba7..1b1404602c0 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
@@ -14,15 +14,6 @@
-->
<plugin>
- <extension
- point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
- <contribution
- file="model/sequenceDiagram.configuration"
- original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
- </contribution>
- </extension>
-
-
<extension point="org.eclipse.ui.contexts" id="ui-context">
<?gmfgen generated="true"?>
<context
@@ -1436,21 +1427,21 @@
point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
<diagramReconciler
diagramType="PapyrusUMLSequenceDiagram"
- reconcilerClass="org.eclipse.papyrus.uml.diagram.sequence.migration.SequenceReconcilerForCompartment"
- source="undefined"
- target="1.2.0">
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.sequence.migration.SequenceReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLSequenceDiagram"
reconcilerClass="org.eclipse.papyrus.uml.diagram.sequence.migration.SequenceReconciler_1_2_0"
source="1.1.0"
- target="1.2.0">
+ target="1.3.0">
</diagramReconciler>
<diagramReconciler
diagramType="PapyrusUMLSequenceDiagram"
reconcilerClass="org.eclipse.papyrus.uml.diagram.sequence.migration.SequenceDiagramLunaToMarsReconciler"
source="1.0.0"
- target="1.2.0">
+ target="1.3.0">
</diagramReconciler>
</extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
@@ -1470,13 +1461,6 @@
path="model/sequencediagram.elementtypesconfigurations">
</elementTypeSet>
</extension>
-<extension
- point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration">
- <elementTypeSet
- clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext"
- path="model/sequencediagram-uml.elementtypesconfigurations">
- </elementTypeSet>
-</extension>
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
<?gmfgen generated="true"?>
<metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
index 6e3d7062210..be36f1672f2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
@@ -1,141 +1,141 @@
-/*****************************************************************************
- * 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:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.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
- */
-public class ActionExecutionSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static ActionExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new ActionExecutionSpecificationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionExecutionSpecification());
- return data.isPermitted();
- }
-
- /**
- * To add the lifeline to the attribute covered of the AES
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ActionExecutionSpecification newElement = UMLFactory.eINSTANCE.createActionExecutionSpecification();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ActionExecutionSpecification 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * 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:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.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
+ */
+public class ActionExecutionSpecificationCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public ActionExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static ActionExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionExecutionSpecificationCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public ActionExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionExecutionSpecification());
+ return data.isPermitted();
+ }
+
+ /**
+ * To add the lifeline to the attribute covered of the AES
+ *
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ ActionExecutionSpecification newElement = UMLFactory.eINSTANCE.createActionExecutionSpecification();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(ActionExecutionSpecification 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
index dd0fb407d06..ec0002963da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
@@ -1,141 +1,141 @@
-/*****************************************************************************
- * 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:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.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
- */
-public class BehaviorExecutionSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static BehaviorExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new BehaviorExecutionSpecificationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getBehaviorExecutionSpecification());
- return data.isPermitted();
- }
-
- /**
- * To add the lifeline to the attribute covered of the AES
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- BehaviorExecutionSpecification newElement = UMLFactory.eINSTANCE.createBehaviorExecutionSpecification();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(BehaviorExecutionSpecification 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * 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:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.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
+ */
+public class BehaviorExecutionSpecificationCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static BehaviorExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new BehaviorExecutionSpecificationCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getBehaviorExecutionSpecification());
+ return data.isPermitted();
+ }
+
+ /**
+ * To add the lifeline to the attribute covered of the AES
+ *
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ BehaviorExecutionSpecification newElement = UMLFactory.eINSTANCE.createBehaviorExecutionSpecification();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(BehaviorExecutionSpecification 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
index 0189cde6749..9bed99d049f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
@@ -1,145 +1,145 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class CombinedFragment2CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public CombinedFragment2CreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static CombinedFragment2CreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new CombinedFragment2CreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public CombinedFragment2CreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCombinedFragment());
- return data.isPermitted();
- }
-
- /**
- * Create a CoRegion :
- * - creates two operands
- * - set the Interaction Operator to parallel
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CombinedFragment newElement = UMLFactory.eINSTANCE.createCombinedFragment();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_CoRegionShape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(CombinedFragment 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class CombinedFragment2CreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public CombinedFragment2CreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static CombinedFragment2CreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CombinedFragment2CreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public CombinedFragment2CreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCombinedFragment());
+ return data.isPermitted();
+ }
+
+ /**
+ * Create a CoRegion :
+ * - creates two operands
+ * - set the Interaction Operator to parallel
+ *
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ CombinedFragment newElement = UMLFactory.eINSTANCE.createCombinedFragment();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_CoRegionShape(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(CombinedFragment 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
index 3bce792cf24..a41f8c5730f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
@@ -1,146 +1,146 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class CombinedFragmentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public CombinedFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static CombinedFragmentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new CombinedFragmentCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public CombinedFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCombinedFragment());
- return data.isPermitted();
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @generated
- */
- @Override
- @SuppressWarnings("unchecked")
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CombinedFragment newElement = UMLFactory.eINSTANCE.createCombinedFragment();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(CombinedFragment 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class CombinedFragmentCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public CombinedFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static CombinedFragmentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CombinedFragmentCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public CombinedFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
+ *
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCombinedFragment());
+ return data.isPermitted();
+ }
+
+ /**
+ * Handle creation on InteractionOperand
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ CombinedFragment newElement = UMLFactory.eINSTANCE.createCombinedFragment();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(CombinedFragment 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
index a8335a3a056..d994f4bf0cb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
@@ -1,141 +1,141 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class CommentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new CommentCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
- return data.isPermitted();
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Comment newElement = UMLFactory.eINSTANCE.createComment();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Comment 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class CommentCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Comment newElement = UMLFactory.eINSTANCE.createComment();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Comment 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
index c752d6b19f2..fb016e80183 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
@@ -1,146 +1,146 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class ConsiderIgnoreFragmentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static ConsiderIgnoreFragmentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new ConsiderIgnoreFragmentCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConsiderIgnoreFragment());
- return data.isPermitted();
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @generated
- */
- @Override
- @SuppressWarnings("unchecked")
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ConsiderIgnoreFragment newElement = UMLFactory.eINSTANCE.createConsiderIgnoreFragment();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ConsiderIgnoreFragment 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class ConsiderIgnoreFragmentCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static ConsiderIgnoreFragmentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConsiderIgnoreFragmentCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
+ *
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConsiderIgnoreFragment());
+ return data.isPermitted();
+ }
+
+ /**
+ * Handle creation on InteractionOperand
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ ConsiderIgnoreFragment newElement = UMLFactory.eINSTANCE.createConsiderIgnoreFragment();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(ConsiderIgnoreFragment 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
index 9d5bce04d81..cb5b3ee0c9e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
@@ -1,141 +1,141 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class ConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new ConstraintCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
- return data.isPermitted();
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Constraint 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class ConstraintCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Constraint 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
index 60cee3f4707..4053962cd72 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
@@ -1,143 +1,143 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class ContinuationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ContinuationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static ContinuationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new ContinuationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public ContinuationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getContinuation());
- return data.isPermitted();
- }
-
- /**
- * Generated not to handle the constraint on covered lifelines.
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Continuation newElement = UMLFactory.eINSTANCE.createContinuation();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
- if (data.isPermitted()) {
- if (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_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Continuation 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class ContinuationCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public ContinuationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static ContinuationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ContinuationCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public ContinuationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getContinuation());
+ return data.isPermitted();
+ }
+
+ /**
+ * Generated not to handle the constraint on covered lifelines.
+ *
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Continuation newElement = UMLFactory.eINSTANCE.createContinuation();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Continuation 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
index 6020044a1ba..1a4c9fbe0ff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
@@ -1,130 +1,130 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class DestructionOccurrenceSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static DestructionOccurrenceSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new DestructionOccurrenceSpecificationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * A DestructionEvent on a lifeline can only be created if it doesn't exist yet a destructionEvent on that lifeline.
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification());
- return data.isPermitted();
- }
-
- /**
- * @generated
- */
- @Override
- 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 {
- 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_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class DestructionOccurrenceSpecificationCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static DestructionOccurrenceSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DestructionOccurrenceSpecificationCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * A DestructionEvent on a lifeline can only be created if it doesn't exist yet a destructionEvent on that lifeline.
+ *
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DestructionOccurrenceSpecification newElement = UMLFactory.eINSTANCE.createDestructionOccurrenceSpecification();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
index a3f0eac504a..b390b7e9512 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
@@ -1,141 +1,141 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class DurationConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DurationConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static DurationConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new DurationConstraintCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public DurationConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
- return data.isPermitted();
- }
-
- /**
- * @generated
- */
- @Override
- 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");
- }
- ElementInitializers.getInstance().init_DurationConstraint_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class DurationConstraintCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public DurationConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static DurationConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationConstraintCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public DurationConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
index 2211e50d0c3..fe025f99ee7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
@@ -1,141 +1,141 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class DurationConstraintInMessageCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DurationConstraintInMessageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static DurationConstraintInMessageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new DurationConstraintInMessageCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public DurationConstraintInMessageCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
- return data.isPermitted();
- }
-
- /**
- * @generated
- */
- @Override
- 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");
- }
- ElementInitializers.getInstance().init_DurationConstraint_Shape_CN(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class DurationConstraintInMessageCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public DurationConstraintInMessageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static DurationConstraintInMessageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationConstraintInMessageCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public DurationConstraintInMessageCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape_CN(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
index 242cb05d010..57393a8f312 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
@@ -1,141 +1,141 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class DurationObservationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new DurationObservationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public DurationObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
- return data.isPermitted();
- }
-
- /**
- * @generated
- */
- @Override
- 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");
- }
- ElementInitializers.getInstance().init_DurationObservation_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.sequence.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.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
+ */
+public class DurationObservationCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationObservationCreateCommand(req, eObject, diagram);
+ }
+
+ /**
+ * @generated
+ */
+ public DurationObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target, newElement);
+ if (data.isPermitted()) {
+ if (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_Shape(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ 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());
+ 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
index 664aea72e32..2b4c7fa455b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
@@ -1,141 +1,141 @@
-/*****************************************************************************
- * 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:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.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.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.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
- */
-public class InteractionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public InteractionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static InteractionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new InteractionCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public InteractionCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
- return data.isPermitted();
- }
-
- /**
- * @generated
- */
- @Override
- 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");
- }
- ElementInitializers.getInstance().init_Interaction_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- 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());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
+/*****************************************************************************
+ * 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
+ *