Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature/feature.xml6
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml2
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature/feature.xml7
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java97
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionPrecommitExecutor.java148
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java53
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TreeIterators.java112
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java6
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java6
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java33
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java69
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/DiagramCSSEngine.java13
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ExtendedCSSEngineImpl.java25
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ModelCSSEngine.java13
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ProjectCSSEngine.java13
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.classpath (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.classpath)14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.project (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.project)2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/org.eclipse.jdt.core.prefs (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.settings/org.eclipse.jdt.core.prefs)6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/org.eclipse.jdt.ui.prefs (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/DeveloperDoc.html (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/DeveloperDoc.html)0
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/META-INF/MANIFEST.MF29
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/META-INF/p2.inf2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/about.html (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/about.html)0
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/build.properties (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/build.properties)0
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/default.css (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/default.css)0
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/docs/out.html (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/docs/out.html)0
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/imgDOC/ArchitectureOverview.png (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/imgDOC/ArchitectureOverview.png)bin14434 -> 14434 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/imgDOC/Structure.png (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/imgDOC/Structure.png)bin34647 -> 34647 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/imgDOC/UseCaseDiagram.png (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/imgDOC/UseCaseDiagram.png)bin18524 -> 18524 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/plugin.properties (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/plugin.properties)9
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/plugin.xml14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/pom.xml (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/pom.xml)2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/resource/model.di (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/resource/model.di)0
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/resource/model.notation (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/resource/model.notation)0
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/resource/model.uml (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/resource/model.uml)0
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/schema/strategies.exsd325
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/CanonicalStateListener.java308
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/PapyrusCanonicalEditPolicy.java790
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/internal/Activator.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/Activator.java)27
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/internal/provider/PapyrusCanonicalEditPolicyProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/provider/SynchronizeEditPolicyProvider.java)44
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/BasicSemanticChildrenStrategy.java82
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/CreationTargetStrategyRegistration.java28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/DefaultSemanticChildrenStrategyRegistration.java29
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/EditPartBasedRegistration.java78
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/ICreationTargetStrategy.java84
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/ISemanticChildrenStrategy.java62
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/IVisualChildrenStrategy.java54
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/Registration.java165
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/SemanticChildrenStrategyRegistration.java27
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/SemanticChildrenStrategyRegistry.java177
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/VisualChildrenStrategyRegistration.java26
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/CommandTreeIterator.java203
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GEFCommandWrapper.java117
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CommonDeferredCreateConnectionViewCommand.java5
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/SetCanonicalCommand.java110
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/requests/CanonicalDropObjectsRequest.java51
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusDiagramEditPart.java51
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/IPapyrusCanonicalEditPolicy.java41
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramHelper.java247
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java112
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/EditPartPropertyTester.java49
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/policy/CustomizableDropEditPolicy.java26
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml27
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/AbstractGraphicalCommandHandler.java3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/CanonicalState.java91
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/ToggleCanonicalHandler.java58
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF5
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/synchronization.ctx30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/MultipleCanonicalStyle.xwt17
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/SingleCanonicalStyle.xwt16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/plugin.xml3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/constraint/HasEditPolicy.java7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/CanonicalObservableValue.java125
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElement.java45
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElementFactory.java49
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/TypeUtils.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/canonical/ActivityCanonicalCreationTargetStrategy.java90
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/canonical/DefaultUMLSemanticChildrenStrategy.java167
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/DeferredCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/CommunicationCanonicalCreationTargetStrategy.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineSemanticChildrenStrategy.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineVisualChildrenStrategy.java77
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF162
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomDiagramDragDropEditPolicy.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/PropertyPartCompartmentSemanticChildrenStrategy.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF87
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/HandlerStateSourceProvider.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/canonical/StateMachineCanonicalCreationTargetStrategy.java67
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/preferences/CustomTransitionPreferencePage.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/META-INF/MANIFEST.MF29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/plugin.xml16
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/schema/org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild.exsd131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/ISynchroSemanticChild.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/SemanticChild.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/SynchroSemanticChildRegistry.java155
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/editpolicy/SynchronizeViewEditPolicy.java238
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/UMLUtil.java54
-rw-r--r--releng/top-pom-main-tests.xml735
-rw-r--r--releng/top-pom-main.xml1744
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.di (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInTheDiagram.di)4
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.notation66
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.uml9
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java46
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests.launch2
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus Core tests (no SysML).launch2
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java2
-rw-r--r--tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/Activator.java42
-rw-r--r--tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java6
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.classpath (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.classpath)14
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.project (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.project)2
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.settings/org.eclipse.jdt.core.prefs (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.settings/org.eclipse.jdt.core.prefs)6
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.settings/org.eclipse.jdt.ui.prefs (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/META-INF/MANIFEST.MF31
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/about.html (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/about.html)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/build.properties (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/build.properties)3
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram.css20
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.di (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInThemodel.di)4
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.notation227
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.uml43
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.di (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAPartIntoACompositeInTheDiagram.di)4
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.notation227
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.uml42
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.di2
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.notation113
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.uml42
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/composite.di2
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/composite.notation272
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/composite.uml54
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/compositediagram.css17
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/org.eclipse.papyrus.infra.gmfdiag.canonical.tests.launch43
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/plugin.properties (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/plugin.properties)5
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/pom.xml14
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AbstractCSSCanonicalTest.java183
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AbstractCanonicalTest.java708
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/AllTests.java40
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/BasicCanonicalClassDiagramTest.java136
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CSSCanonicalClassDiagramTest.java132
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CSSCanonicalCompositeDiagramTest.java133
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CSSCanonicalStateInClassDiagramTest.java233
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CSSExternalStylesheetInClassDiagramTest.java195
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CanonicalStateInClassDiagramTest.java193
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/CanonicalViewDeletionInClassDiagramTest.java185
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/EditingInClassDiagramRegressionTest.java269
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/EditingInModelInClassDiagramTest.java387
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/src/org/eclipse/papyrus/infra/gmfdiag/canonical/tests/internal/Activator.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/src/org/eclipse/papyrus/uml/diagram/synchronizeview/test/Activator.java)16
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands.tests/src/org/eclipse/papyrus/commands/util/CommandTreeIteratorTest.java194
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands.tests/src/org/eclipse/papyrus/infra/gmfdiag/commands/tests/AllTests.java6
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/Activator.java34
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/JUnitUtils.java12
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ActiveDiagram.java33
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PapyrusEditorFixture.java91
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java276
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/META-INF/MANIFEST.MF15
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInTheDiagram.notation19
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInTheDiagram.uml4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInThemodel.notation19
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInThemodel.uml4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAPartIntoACompositeInTheDiagram.notation24
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAPartIntoACompositeInTheDiagram.uml4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAPartIntoACompositeInThemodel.di2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAPartIntoACompositeInThemodel.notation24
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAPartIntoACompositeInThemodel.uml4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddANodeLabel/AddAPropertyIntoAClassInTheDiagram.di2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddANodeLabel/AddAPropertyIntoAClassInTheDiagram.notation36
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddANodeLabel/AddAPropertyIntoAClassInTheDiagram.uml4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddANodeLabel/AddAPropertyIntoAClassInTheModel.di2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddANodeLabel/AddAPropertyIntoAClassInTheModel.notation39
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddANodeLabel/AddAPropertyIntoAClassInTheModel.uml4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddATopNode/AddAClassIntoDiagram.di2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddATopNode/AddAClassIntoDiagram.notation9
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddATopNode/AddAClassIntoDiagram.uml2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddATopNode/AddAClassIntoModel.di2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddATopNode/AddAClassIntoModel.notation9
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddATopNode/AddAClassIntoModel.uml2
191 files changed, 11214 insertions, 2673 deletions
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature/feature.xml
index 3706b78341d..19715ba1e88 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature/feature.xml
@@ -162,4 +162,10 @@ http://www.eclipse.org/legal/epl-v10.html
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.papyrus.infra.gmfdiag.canonical"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml
index c24d2ffe2c6..ec77f7f4e32 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml
@@ -65,6 +65,4 @@ http://www.eclipse.org/legal/epl-v10.html
<plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.symbols.properties" install-size="0" unpack="false" version="0.0.0"/>
- <plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.synchronizeview" install-size="0" unpack="false" version="0.0.0"/>
-
</feature> \ No newline at end of file
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature/feature.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature/feature.xml
index 385260c6931..a45199b918d 100644
--- a/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature/feature.xml
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature/feature.xml
@@ -86,4 +86,11 @@ http://www.eclipse.org/legal/epl-v10.html
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.papyrus.infra.gmfdiag.canonical.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java
index 000ab1105ad..d2fdaaedb57 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java
@@ -13,6 +13,7 @@
* Christian W. Damus (CEA) - bug 433320
* Christian W. Damus - bug 451557
* Christian W. Damus - bug 457560
+ * Christian W. Damus - bug 461629
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.utils;
@@ -21,6 +22,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.Executor;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
@@ -50,6 +52,8 @@ public class TransactionHelper extends org.eclipse.papyrus.infra.core.sasheditor
public static final String TRANSACTION_OPTION_INTERACTIVE = "papyrus.interactive"; //$NON-NLS-1$
+ public static final String TRANSACTION_OPTION_MERGE_NESTED_READ = "papyrus.merge_nested_read"; //$NON-NLS-1$
+
/**
* Queries whether an editing {@code domain} has been disposed.
*
@@ -208,10 +212,65 @@ public class TransactionHelper extends org.eclipse.papyrus.infra.core.sasheditor
*
* @param transaction
* a transaction
- * @return {@code true} if the {@code transaction} has the {@linkplain #TRANSACTION_OPTION_INTERACTIVE interactive option} set {@code true}; {@code false}, otherwise (including the default case of no option set)
+ * @return {@code true} if the {@code transaction} has the {@linkplain #TRANSACTION_OPTION_NO_READ_ONLY_CACHE interactive option} set {@code true}; {@code false}, otherwise (including the default case of no option set)
*/
public static boolean isReadOnlyCacheDisabled(Transaction transaction) {
- Object value = transaction.getOptions().get(TRANSACTION_OPTION_INTERACTIVE);
+ Object value = transaction.getOptions().get(TRANSACTION_OPTION_NO_READ_ONLY_CACHE);
+ return (value instanceof Boolean) ? (Boolean) value : false;
+ }
+
+ /**
+ * Merges the option to merge nested read-only transactions with parent write transactions into an existing map of {@code options}.
+ * This option on a write transaction affects this behaviour of subsequent child read-only transactions.
+ *
+ * @param options
+ * an existing (non-{@code null}) options map
+ * @param mergeReadOnly
+ * whether to merge read-only transactions into parent write transactions
+ * @return the augmented {@code options}
+ */
+ public static Map<String, Object> mergeMergeReadOnlyOption(Map<String, Object> options, boolean mergeReadOnly) {
+ options.put(TRANSACTION_OPTION_MERGE_NESTED_READ, mergeReadOnly);
+ return options;
+ }
+
+ /**
+ * Adds the option to merge nested read-only transactions with parent write transactions to a transaction's {@code options}.
+ * This option on a write transaction affects this behaviour of subsequent child read-only transactions.
+ *
+ * @param options
+ * an options map, which may be {@code null} or immutable
+ * @param mergeReadOnly
+ * whether to merge read-only transactions into parent write transactions
+ * @return a new map based on the {@code options} and including the {@code mergeReadOnly} option
+ */
+ public static Map<String, Object> addMergeReadOnlyOption(Map<String, ?> options, boolean mergeReadOnly) {
+ Map<String, Object> result = (options == null) ? Maps.<String, Object> newHashMap() : Maps.newHashMap(options);
+ result.put(TRANSACTION_OPTION_MERGE_NESTED_READ, mergeReadOnly);
+ return result;
+ }
+
+ /**
+ * Creates a new mutable transaction options map with the option to merge nested read-only transactions with parent write transactions.
+ * This option on a write transaction affects this behaviour of subsequent child read-only transactions.
+ *
+ * @param mergeReadOnly
+ * whether to merge read-only transactions into parent write transactions
+ * @return a new mutable map including the {@code mergeReadOnly} option
+ */
+ public static Map<String, Object> mergeReadOnlyOption(boolean mergeReadOnly) {
+ return addMergeReadOnlyOption(null, mergeReadOnly);
+ }
+
+ /**
+ * Queries whether a {@code transaction} is running with merging of nested read-only transactions with parent write transactions enabled.
+ *
+ * @param transaction
+ * a transaction
+ * @return {@code true} if the {@code transaction} has the {@linkplain #TRANSACTION_OPTION_MERGE_NESTED_READ interactive option} set {@code true}; {@code false}, otherwise (including the default case of no option set)
+ */
+ public static boolean isMergeReadOnly(Transaction transaction) {
+ Object value = transaction.getOptions().get(TRANSACTION_OPTION_MERGE_NESTED_READ);
return (value instanceof Boolean) ? (Boolean) value : false;
}
@@ -319,4 +378,38 @@ public class TransactionHelper extends org.eclipse.papyrus.infra.core.sasheditor
}
};
}
+
+ /**
+ * Creates an {@link Executor} that executes {@link Runnable}s at the pre-commit phase of the active write
+ * transaction of the specified editing {@code domain} or at some other time if no write transaction is active.
+ *
+ * @param domain
+ * a transactional editing domain. May not be {@code null}
+ * @param fallback
+ * an executor to use for scheduling tasks when the {@code domain} does not have a
+ * write transaction open. May not be {@code null}
+ */
+ public static Executor createTransactionExecutor(TransactionalEditingDomain domain, Executor fallback) {
+ return createTransactionExecutor(domain, fallback, null);
+ }
+
+ /**
+ * Creates an {@link Executor} that executes {@link Runnable}s at the pre-commit phase of the active write
+ * transaction of the specified editing {@code domain} or at some other time if no write transaction is active.
+ *
+ * @param domain
+ * a transactional editing domain. May not be {@code null}
+ * @param fallback
+ * an executor to use for scheduling tasks when the {@code domain} does not have a
+ * write transaction open. May not be {@code null}
+ * @param options
+ * a map of options to apply to the nested transaction in which tasks are executed. May be {@code null} if not needed
+ */
+ public static Executor createTransactionExecutor(TransactionalEditingDomain domain, Executor fallback, Map<?, ?> options) {
+ if ((domain == null) || (fallback == null)) {
+ throw new NullPointerException();
+ }
+
+ return new TransactionPrecommitExecutor(domain, fallback, options);
+ }
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionPrecommitExecutor.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionPrecommitExecutor.java
new file mode 100644
index 00000000000..9c23451f9c5
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionPrecommitExecutor.java
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.utils;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Executor;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.Transaction;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomainEvent;
+import org.eclipse.emf.transaction.TransactionalEditingDomainListener;
+import org.eclipse.emf.transaction.impl.EMFCommandTransaction;
+import org.eclipse.emf.transaction.impl.InternalTransactionalCommandStack;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.papyrus.infra.core.Activator;
+
+import com.google.common.collect.Maps;
+
+/**
+ * An {@link Executor} that executes {@link Runnable}s at the pre-commit phase of the active
+ * write transaction of a {@link TransactionalEditingDomain} or at some other time if no
+ * write transaction is active.
+ */
+class TransactionPrecommitExecutor implements Executor, TransactionalEditingDomainListener {
+ private final Executor fallback;
+
+ private final AtomicBoolean writeActive = new AtomicBoolean();
+ private final BlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>();
+ private final Map<?, ?> options;
+
+ TransactionPrecommitExecutor(TransactionalEditingDomain domain, Executor fallback, Map<?, ?> options) {
+ super();
+
+ this.fallback = fallback;
+ this.options = ((options != null) && options.isEmpty()) ? null : options;
+
+ TransactionUtil.getAdapter(domain, TransactionalEditingDomain.Lifecycle.class).addTransactionalEditingDomainListener(this);
+ }
+
+ @Override
+ public void execute(Runnable command) {
+ if (writeActive.get()) {
+ queue.offer(command);
+ } else {
+ fallback.execute(command);
+ }
+ }
+
+ //
+ // Editing Domain Lifecycle handling
+ //
+
+ @Override
+ public void editingDomainDisposing(TransactionalEditingDomainEvent event) {
+ queue.clear();
+ }
+
+ //
+ // Transaction lifecycle handling
+ //
+
+ @Override
+ public void transactionStarted(TransactionalEditingDomainEvent event) {
+ writeActive.set(!event.getTransaction().isReadOnly());
+ }
+
+ @Override
+ public void transactionClosed(TransactionalEditingDomainEvent event) {
+ writeActive.set(false);
+
+ if (queue.peek() != null) {
+ // Punt the remaining tasks
+ for (Runnable next = queue.poll(); next != null; next = queue.poll()) {
+ fallback.execute(next);
+ }
+ }
+ }
+
+ @Override
+ public void transactionStarting(TransactionalEditingDomainEvent event) {
+ // Pass
+ }
+
+ @Override
+ public void transactionInterrupted(TransactionalEditingDomainEvent event) {
+ // Pass
+ }
+
+ @Override
+ public void transactionClosing(TransactionalEditingDomainEvent event) {
+ if (queue.peek() != null) {
+ // Inject tasks into the transaction as a trigger command
+ Command trigger = new RecordingCommand(event.getSource(), "Deferred Tasks") {
+
+ @Override
+ protected void doExecute() {
+ for (Runnable next = queue.poll(); next != null; next = queue.poll()) {
+ try {
+ next.run();
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in transaction pre-commit task.", e); //$NON-NLS-1$
+ }
+ }
+ }
+ };
+
+ final Transaction transaction = event.getTransaction();
+ final Command triggeringCommand;
+ if (transaction instanceof EMFCommandTransaction) {
+ triggeringCommand = ((EMFCommandTransaction) transaction).getCommand();
+ } else {
+ triggeringCommand = null;
+ }
+
+ final InternalTransactionalCommandStack stack = (InternalTransactionalCommandStack) event.getSource().getCommandStack();
+ try {
+ Map<?, ?> options = transaction.getOptions();
+ if (this.options != null) {
+ Map<Object, Object> mergedOptions = Maps.newHashMap(options);
+ mergedOptions.putAll(this.options);
+ options = mergedOptions;
+ }
+
+ stack.executeTriggers(triggeringCommand, Collections.singletonList(trigger), options);
+ } catch (Exception e) {
+ Activator.log.error("Failed to execute transaction pre-commit tasks.", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java
index 159ee2c3364..e7cb8a5fa6c 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011, 2014 Atos Origin, CEA, Christian W. Damus, and others.
+ * Copyright (c) 2011, 2015 Atos Origin, CEA, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -15,6 +15,7 @@
* Christian W. Damus (CEA) - bug 422257
* Christian W. Damus (CEA) - bug 415639
* Christian W. Damus - bug 399859
+ * Christian W. Damus - bug 461629
*
*****************************************************************************/
package org.eclipse.papyrus.infra.emf.readonly;
@@ -32,6 +33,7 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.AdapterFactory;
@@ -43,6 +45,8 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.transaction.NotificationFilter;
+import org.eclipse.emf.transaction.RollbackException;
+import org.eclipse.emf.transaction.RunnableWithResult;
import org.eclipse.emf.transaction.Transaction;
import org.eclipse.emf.transaction.TransactionalCommandStack;
import org.eclipse.emf.transaction.impl.InternalTransaction;
@@ -244,6 +248,53 @@ public class PapyrusROTransactionalEditingDomain extends TransactionalEditingDom
}
}
+ /**
+ * Overrides the inherited method to support an {@linkplain TransactionHelper#TRANSACTION_OPTION_MERGE_NESTED_READ option} to merge nested read-only transactions into parent write transactions.
+ */
+ @Override
+ public Object runExclusive(Runnable read) throws InterruptedException {
+
+ Transaction active = getActiveTransaction();
+ Transaction tx = null;
+
+ if ((active == null) || !(active.isActive() && isReadOnlyCompatible(active))) {
+ // only need to start a new transaction if we don't already have
+ // exclusive read-only access
+ tx = startTransaction(true, null);
+ }
+
+ final RunnableWithResult<?> rwr = (read instanceof RunnableWithResult) ?
+ (RunnableWithResult<?>) read : null;
+
+ try {
+ read.run();
+ } finally {
+ if ((tx != null) && (tx.isActive())) {
+ // commit the transaction now
+ try {
+ tx.commit();
+
+ if (rwr != null) {
+ rwr.setStatus(Status.OK_STATUS);
+ }
+ } catch (RollbackException e) {
+ Activator.log.error("Read-only transaction was rolled back.", e); //$NON-NLS-1$
+
+ if (rwr != null) {
+ rwr.setStatus(e.getStatus());
+ }
+ }
+ }
+ }
+
+ return (rwr != null) ? rwr.getResult() : null;
+ }
+
+ private boolean isReadOnlyCompatible(Transaction parentTransaction) {
+ return (parentTransaction.isReadOnly() || TransactionHelper.isMergeReadOnly(parentTransaction))
+ && (parentTransaction.getOwner() == Thread.currentThread());
+ }
+
protected Adapter createResourceUndoContextHandler() {
return new ResourceUndoContextHandler(getCommandStack());
}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TreeIterators.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TreeIterators.java
new file mode 100644
index 00000000000..80a7adbc0e4
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TreeIterators.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.common.util.TreeIterator;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.AbstractIterator;
+import com.google.common.collect.Iterators;
+
+/**
+ * EMF {@link TreeIterator} analogue of select utilities from Guava {@link Iterators}.
+ */
+public class TreeIterators {
+
+ /**
+ * Not instantiable by clients.
+ */
+ private TreeIterators() {
+ super();
+ }
+
+ /**
+ * Obtains a tree iterator that is filtered to provide only instances of the specified {@code type}.
+ *
+ * @param iterator
+ * a tree iterator
+ * @param type
+ * the type of elements to select
+ *
+ * @return the filtered iterator
+ */
+ public static <T> TreeIterator<T> filter(TreeIterator<?> iterator, final Class<T> type) {
+ return new DelegatingTreeIterator<Object, T>(iterator) {
+ @Override
+ protected T computeNext(Object input) {
+ return type.isInstance(input) ? type.cast(input) : null;
+ }
+ };
+ }
+
+ /**
+ * Obtains a tree iterator that is filtered to provide only objects that match a {@code predicate}.
+ *
+ * @param iterator
+ * a tree iterator
+ * @param predicate
+ * matches the elements to select
+ *
+ * @return the filtered iterator
+ */
+ public static <T> TreeIterator<T> filter(TreeIterator<T> iterator, final Predicate<? super T> predicate) {
+ return new DelegatingTreeIterator<T, T>(iterator) {
+ @Override
+ protected T computeNext(T input) {
+ return predicate.apply(input) ? input : null;
+ }
+ };
+ }
+
+ //
+ // Nested types
+ //
+
+ private static abstract class DelegatingTreeIterator<F, T> extends AbstractIterator<T> implements TreeIterator<T> {
+ private final TreeIterator<? extends F> delegate;
+ private boolean done;
+
+ DelegatingTreeIterator(TreeIterator<? extends F> delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ protected T computeNext() {
+ while (delegate.hasNext()) {
+ F next = delegate.next();
+ T result = computeNext(next);
+ if (result != null) {
+ return result;
+ } else if (done) {
+ break;
+ }
+ }
+
+ return endOfData();
+ }
+
+ protected abstract T computeNext(F input);
+
+ @SuppressWarnings("unused")
+ protected final T stop() {
+ done = true;
+ return null;
+ }
+
+ @Override
+ public void prune() {
+ delegate.prune();
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
index 5b1ae8f64d8..58248b4530f 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 461629
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler;
@@ -168,8 +169,7 @@ public abstract class AbstractStyleHandler extends AbstractHandler {
try {
resource.save(new HashMap<Object, Object>());
BaseCSSEngine.INSTANCE.reset();
- DiagramHelper.setNeedsRefresh();
- DiagramHelper.refreshDiagrams();
+ DiagramHelper.forceRefresh();
} catch (IOException ex) {
Activator.log.error(ex);
MessageDialog.open(MessageDialog.ERROR, parentShell, "Style error", "An unexpected error occured while trying to save the Stylesheet", SWT.NONE);
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java
index dbff70390b3..2e1beec4696 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
+ * Christian W. Damus - bug 461629
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.properties.preferences;
@@ -1073,8 +1074,7 @@ public class ThemePreferencesPage extends FieldEditorPreferencePage implements I
boolean result = super.performOk();
if (needsRefresh) {
WorkspaceCSSEngine.instance.reset();
- DiagramHelper.setNeedsRefresh();
- DiagramHelper.refreshDiagrams();
+ DiagramHelper.forceRefresh();
}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
index 9c7ae7bd4f2..8f3aa2771cd 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
@@ -39,7 +39,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.1.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0",
org.eclipse.papyrus.views.properties;bundle-version="1.1.0",
- org.eclipse.papyrus.views.properties.model;bundle-version="1.1.0"
+ org.eclipse.papyrus.views.properties.model;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.1.0.qualifier
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java
index ccf64115a6c..d04f674860a 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 461629
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.dom;
@@ -26,6 +27,7 @@ import java.util.Set;
import org.eclipse.core.databinding.observable.ChangeEvent;
import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.e4.ui.css.core.dom.ElementAdapter;
import org.eclipse.e4.ui.css.core.engine.CSSEngine;
import org.eclipse.emf.common.notify.Adapter;
@@ -59,7 +61,7 @@ import org.w3c.dom.NodeList;
* @author Camille Letavernier
*/
@SuppressWarnings("restriction")
-public class GMFElementAdapter extends ElementAdapter implements NodeList, IChangeListener, StatefulView {
+public class GMFElementAdapter extends ElementAdapter implements NodeList, IChangeListener, StatefulView, IAdaptable {
public static final String CSS_VALUES_SEPARATOR = " "; //$NON-NLS-1$
@@ -205,6 +207,21 @@ public class GMFElementAdapter extends ElementAdapter implements NodeList, IChan
}
/**
+ * I provide adapters for
+ *
+ * <ul>
+ * <li>{@link Diagram} - the diagram containing my {@linkplain #getNotationElement() notation element}</li>
+ * </ul>
+ */
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ if (adapter == Diagram.class) {
+ return getNotationElement().getDiagram();
+ }
+ return null;
+ }
+
+ /**
* Returns the semantic element associated to this adapter. In case of a diagram,
* the diagram is itself the semantic element.
*
@@ -517,20 +534,20 @@ public class GMFElementAdapter extends ElementAdapter implements NodeList, IChan
/*
* <--------------------
- *
+ *
* //Allows both notations Class > Property and Class > Compartment > Property
- *
+ *
* //FIXME: The Tree is computed through "getParentNode". "getChildren" is barely used. Moreover,
* //there is a mapping between Notation element and DOM element, which makes it impossible to associate the same
* //notation element to different DOM elements.
- *
+ *
* // for(EObject child : notationElement.eContents()) {
* // if(child instanceof BasicCompartment) {
* // //Add the Compartment's children to this' children
* // childList.addAll(Arrays.asList(computeChildren((View)child, engine)));
* // }
* // }
- *
+ *
* -------------------->
*/
@@ -693,7 +710,7 @@ public class GMFElementAdapter extends ElementAdapter implements NodeList, IChan
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.papyrus.infra.gmfdiag.css.notation.StatefulView#addStates(java.util.Set)
*/
@Override
@@ -706,7 +723,7 @@ public class GMFElementAdapter extends ElementAdapter implements NodeList, IChan
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.papyrus.infra.gmfdiag.css.notation.StatefulView#removeStates(java.util.Set)
*/
@Override
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java
index 40b527b746a..f6f7c0126d9 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/StyleListener.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,12 +8,16 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 461629
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.dom;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSAnnotations;
/**
* A Listener for notation and semantic properties changes
@@ -50,7 +54,9 @@ public class StyleListener extends AdapterImpl {
}
if (notification.getNotifier() == elementAdapter.getNotationElement()) {
- elementAdapter.notationPropertyChanged();
+ if (shouldPropagateNotationEvent(notification)) {
+ elementAdapter.notationPropertyChanged();
+ }
return;
}
@@ -59,4 +65,63 @@ public class StyleListener extends AdapterImpl {
return;
}
}
+
+ /**
+ * Queries whether a {@code notification} from the notation model should be propagated to my element adapter.
+ * The default implementation propagates all but
+ * <ul>
+ * <li>changes to the {@link NotationPackage.Literals#VIEW__MUTABLE View::mutable} attribute</li>
+ * <li>addition of or changes to the {@linkplain CSSAnnotations#CSS_FORCE_VALUE force-value} annotation</li>
+ * </ul>
+ *
+ * @param notification
+ * a notification from the notation model
+ * @return whether it should be propagated
+ */
+ protected boolean shouldPropagateNotationEvent(Notification notification) {
+ boolean result = notification.getFeature() != NotationPackage.Literals.VIEW__MUTABLE;
+
+ if (result) {
+ if (notification.getFeature() == EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS) {
+ // We never add/remove multiple annotations nor do we use SET to replace them.
+ // However, if we did, all that would happen is an unnecessary refresh
+ switch (notification.getEventType()) {
+ case Notification.ADD:
+ result = !CSSAnnotations.CSS_FORCE_VALUE.equals(((EAnnotation) notification.getNewValue()).getSource());
+ break;
+ case Notification.REMOVE:
+ result = !CSSAnnotations.CSS_FORCE_VALUE.equals(((EAnnotation) notification.getOldValue()).getSource());
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private String getEventType(Notification notification) {
+ switch (notification.getEventType())
+ {
+ case Notification.SET:
+ return ("SET");
+ case Notification.UNSET:
+ return ("UNSET");
+ case Notification.ADD:
+ return ("ADD");
+ case Notification.ADD_MANY:
+ return ("ADD_MANY");
+ case Notification.REMOVE:
+ return ("REMOVE");
+ case Notification.REMOVE_MANY:
+ return ("REMOVE_MANY");
+ case Notification.MOVE:
+ return ("MOVE");
+ case Notification.REMOVING_ADAPTER:
+ return ("REMOVING_ADAPTER");
+ case Notification.RESOLVE:
+ return ("RESOLVE");
+ default:
+ return Integer.toString(notification.getEventType());
+ }
+ }
}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/DiagramCSSEngine.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/DiagramCSSEngine.java
index f76ff086286..c92efa9bf3e 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/DiagramCSSEngine.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/DiagramCSSEngine.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 461629
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.engine;
@@ -18,7 +19,9 @@ import org.eclipse.core.databinding.observable.ChangeEvent;
import org.eclipse.core.databinding.observable.IChangeListener;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper;
import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSDOMSemanticElementHelper;
import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
@@ -110,8 +113,12 @@ public class DiagramCSSEngine extends ExtendedCSSEngineImpl implements IChangeLi
@Override
public void handleChange(ChangeEvent event) {
resetCache();
- DiagramHelper.setNeedsRefresh();
- DiagramHelper.refreshDiagrams(); // FIXME: Should be contextual. We should only refresh the editor(s) containing this Diagram
+
+ if (diagram != null) {
+ for (DiagramEditPart next : PapyrusDiagramEditPart.getDiagramEditPartsFor(diagram)) {
+ DiagramHelper.forceRefresh(next);
+ }
+ }
}
@Override
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ExtendedCSSEngineImpl.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ExtendedCSSEngineImpl.java
index f3be2cda0fb..e11c2c28e63 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ExtendedCSSEngineImpl.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ExtendedCSSEngineImpl.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 461629
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.engine;
@@ -32,6 +33,10 @@ import org.eclipse.e4.ui.css.core.impl.dom.CSSStyleDeclarationImpl;
import org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine;
import org.eclipse.e4.ui.css.core.impl.sac.CSSConditionFactoryImpl;
import org.eclipse.e4.ui.css.core.impl.sac.CSSSelectorFactoryImpl;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper;
import org.eclipse.papyrus.infra.gmfdiag.css.converters.BooleanConverter;
import org.eclipse.papyrus.infra.gmfdiag.css.converters.ColorToGMFConverter;
@@ -43,7 +48,6 @@ import org.eclipse.papyrus.infra.gmfdiag.css.lists.ExtendedStyleSheetList;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-import org.eclipse.swt.widgets.Display;
import org.w3c.css.sac.ConditionFactory;
import org.w3c.dom.Element;
import org.w3c.dom.css.CSSStyleDeclaration;
@@ -364,15 +368,16 @@ public abstract class ExtendedCSSEngineImpl extends AbstractCSSEngine implements
// FIXME: It seems the refresh can create a deadlock in some cases
- DiagramHelper.setNeedsRefresh();
- Display.getDefault().asyncExec(new Runnable() {
-
- @Override
- public void run() {
- DiagramHelper.refreshDiagrams(); // TODO: Contextual refresh
+ Diagram diagram = AdapterUtils.adapt(elementAdapter, Diagram.class, null);
+ Set<? extends DiagramEditPart> diagramEditParts = PapyrusDiagramEditPart.getDiagramEditPartsFor(diagram);
+ if (!diagramEditParts.isEmpty()) {
+ // TODO: Contextual refresh more specific than the diagram?
+ for (DiagramEditPart next : diagramEditParts) {
+ DiagramHelper.scheduleRefresh(next);
}
- });
-
+ } else {
+ DiagramHelper.scheduleRefresh();
+ }
}
/**
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ModelCSSEngine.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ModelCSSEngine.java
index 8736b596633..2958bd4cc07 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ModelCSSEngine.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ModelCSSEngine.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012, 2014 CEA LIST and others.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -10,6 +10,7 @@
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 429422
* Mickael ADAM (ALL4TEC) mickael.adam@ALL4TEC.net - bug 429642
+ * Christian W. Damus - bug 461629
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.engine;
@@ -30,7 +31,6 @@ import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-import org.eclipse.swt.widgets.Display;
import org.w3c.dom.Element;
/**
@@ -55,14 +55,7 @@ public class ModelCSSEngine extends ExtendedCSSEngineImpl {
public void notifyChanged(Notification notification) {
ModelCSSEngine.this.reset();
- DiagramHelper.setNeedsRefresh();
- Display.getDefault().asyncExec(new Runnable() {
-
- @Override
- public void run() {
- DiagramHelper.refreshDiagrams();
- }
- });
+ DiagramHelper.scheduleRefresh();
}
};
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ProjectCSSEngine.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ProjectCSSEngine.java
index d7012c80ee9..53fda111410 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ProjectCSSEngine.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/engine/ProjectCSSEngine.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST and others.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 429422
+ * Christian W. Damus - bug 461629
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.engine;
@@ -35,7 +36,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper;
import org.eclipse.papyrus.infra.gmfdiag.css.Activator;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
-import org.eclipse.swt.widgets.Display;
/**
* A CSS Engine for the current Eclipse Project
@@ -60,14 +60,7 @@ public class ProjectCSSEngine extends ExtendedCSSEngineImpl {
public boolean visit(IResourceDelta delta) throws CoreException {
if (delta.getResource().equals(stylesheetPreferences)) {
ProjectCSSEngine.this.reset();
- DiagramHelper.setNeedsRefresh();
- Display.getDefault().asyncExec(new Runnable() {
-
- @Override
- public void run() {
- DiagramHelper.refreshDiagrams();
- }
- });
+ DiagramHelper.scheduleRefresh();
return false;
}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java
index c6713fe8be4..08f6e200e59 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012, 2013 CEA LIST.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - support adapter instead of custom resource impl for CSS (CDO)
+ * Christian W. Damus - bug 461629
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.notation;
@@ -67,8 +68,10 @@ public class ForceValueHelper {
EAnnotation eAnnotation = view.getEAnnotation(CSSAnnotations.CSS_FORCE_VALUE);
if (eAnnotation == null) {
eAnnotation = EcorePackage.eINSTANCE.getEcoreFactory().createEAnnotation();
- eAnnotation.setEModelElement(view);
+
+ // Set the source first so that when we get the add notification we can see the source
eAnnotation.setSource(CSSAnnotations.CSS_FORCE_VALUE);
+ eAnnotation.setEModelElement(view);
}
EMap<String, String> details = eAnnotation.getDetails();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.classpath
index 8a8f1668cdc..098194ca4b7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.classpath
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.project b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.project
index ab5465b36f0..c42cca145e2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.project
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.papyrus.uml.diagram.synchronizeview</name>
+ <name>org.eclipse.papyrus.infra.gmfdiag.canonical</name>
<comment></comment>
<projects>
</projects>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/org.eclipse.jdt.core.prefs
index 410244d65a6..9ca8e68231b 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/org.eclipse.jdt.ui.prefs
index 954281dbc31..954281dbc31 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/org.eclipse.jdt.ui.prefs
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/DeveloperDoc.html b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/DeveloperDoc.html
index c2d6193d083..c2d6193d083 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/DeveloperDoc.html
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/DeveloperDoc.html
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..fa195895496
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.common,
+ org.eclipse.emf.ecore,
+ org.eclipse.gef,
+ org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.core.expressions;bundle-version="3.4.600",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.1.0"
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.canonical.editpolicy,
+ org.eclipse.papyrus.infra.gmfdiag.canonical.internal,
+ org.eclipse.papyrus.infra.gmfdiag.canonical.internal.provider,
+ org.eclipse.papyrus.infra.gmfdiag.canonical.strategy
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.1.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.canonical.internal.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.canonical;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-Description: %pluginDescription
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/META-INF/p2.inf b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/META-INF/p2.inf
new file mode 100644
index 00000000000..bb7c70ff4d3
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/META-INF/p2.inf
@@ -0,0 +1,2 @@
+update.id=org.eclipse.papyrus.uml.diagram.synchronizeview
+update.range=[1.0.0,1.1.0]
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/about.html b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/about.html
index 82d49bf5f81..82d49bf5f81 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/about.html
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/about.html
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/build.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/build.properties
index 8539c191e15..8539c191e15 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/build.properties
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/build.properties
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/default.css b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/default.css
index a52509fd64b..a52509fd64b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/default.css
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/default.css
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/docs/out.html b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/docs/out.html
index 73bdc51f3ed..73bdc51f3ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/docs/out.html
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/docs/out.html
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/imgDOC/ArchitectureOverview.png b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/imgDOC/ArchitectureOverview.png
index 318ac1506d7..318ac1506d7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/imgDOC/ArchitectureOverview.png
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/imgDOC/ArchitectureOverview.png
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/imgDOC/Structure.png b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/imgDOC/Structure.png
index 51fc9cff50f..51fc9cff50f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/imgDOC/Structure.png
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/imgDOC/Structure.png
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/imgDOC/UseCaseDiagram.png b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/imgDOC/UseCaseDiagram.png
index f6f8921945b..f6f8921945b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/imgDOC/UseCaseDiagram.png
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/imgDOC/UseCaseDiagram.png
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/plugin.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/plugin.properties
index f3ebaf007e9..025c6111645 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/plugin.properties
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/plugin.properties
@@ -1,5 +1,5 @@
#################################################################################
-# Copyright (c) 2008 CEA LIST.
+# Copyright (c) 2008, 2015 CEA LIST, Christian W. Damus, and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -7,8 +7,11 @@
#
# Contributors:
# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - initial API and implementation
+# Christian W. Damus - bug 433206
##################################################################################
-pluginName=org.eclipse.papyrus.uml.diagram.synchronizeview
+pluginName=Papyrus Canonical Diagram Infrastructure
providerName=Eclipse Modeling Project
-pluginDescription=The goal of this plugin is add the fucntionality to synchronize elements in diagram. More details (models and .html) has been store in the docs directory. \ No newline at end of file
+pluginDescription=An extensible implementation of the Canonical Edit Policy for Papyrus diagrams. More details (models and .html) are available in the docs/ directory.
+
+extpt.strategies.name = Canonical Children Strategies
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/plugin.xml
new file mode 100644
index 00000000000..4a94207f9f9
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="org.eclipse.papyrus.infra.gmfdiag.canonical.strategies" name="%extpt.strategies.name" schema="schema/strategies.exsd"/>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.infra.gmfdiag.canonical.internal.provider.PapyrusCanonicalEditPolicyProvider">
+ <Priority
+ name="Low">
+ </Priority>
+ </editpolicyProvider>
+ </extension>
+</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/pom.xml
index 64d0c520525..6141f5538b6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/pom.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/pom.xml
@@ -7,7 +7,7 @@
<version>1.1.0-SNAPSHOT</version>
<relativePath>../../../../releng/top-pom-main.xml</relativePath>
</parent>
- <artifactId>org.eclipse.papyrus.uml.diagram.synchronizeview</artifactId>
+ <artifactId>org.eclipse.papyrus.infra.gmfdiag.canonical</artifactId>
<groupId>org.eclipse.papyrus</groupId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/resource/model.di b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/resource/model.di
index 8634d4c00e0..8634d4c00e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/resource/model.di
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/resource/model.di
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/resource/model.notation b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/resource/model.notation
index 915e8f7b5b3..915e8f7b5b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/resource/model.notation
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/resource/model.notation
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/resource/model.uml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/resource/model.uml
index 57a5ae35815..57a5ae35815 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/resource/model.uml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/resource/model.uml
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/schema/strategies.exsd b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/schema/strategies.exsd
new file mode 100644
index 00000000000..7965c815fbd
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/schema/strategies.exsd
@@ -0,0 +1,325 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.canonical" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.canonical" id="org.eclipse.papyrus.infra.gmfdiag.canonical.strategies" name="Canonical Children Strategies"/>
+ </appinfo>
+ <documentation>
+ A registry of strategies for determining the semantic children of model elements that should canonically be represented as child views in the diagrams. In this context the term &quot;children&quot; is used loosely as pertaining to the model semantics, because elements visualized as child views in the diagram can have any kind of relationship to the element visualized in the parent view. For example, in composite structures, ports of the class that is the type of a part may be presented as child views on the border of the part&apos;s rectangle shape in the diagram, although they are in no way contained either directly or indirectly in the model.
+
+The semantic &quot;children&quot; also include relationships (generalizations, dependencies, associations, etc.) and relationship-like elements (connectors, state transitions, messages, etc.) that should visually connect to a &quot;parent&quot; view in the diagram.
+ </documentation>
+ </annotation>
+
+ <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="semanticChildrenStrategy"/>
+ <element ref="defaultSemanticChildrenStrategy"/>
+ <element ref="creationTargetStrategy"/>
+ <element ref="visualChildrenStrategy"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="semanticChildrenStrategy">
+ <annotation>
+ <documentation>
+ This is a pair (EditPart, ISemanticChildrenStrategy) used to describe the list of semantic elements that will represented as children of the current EditPart.
+&lt;p&gt;
+The nested &amp;lt;enablement&amp;gt; expression, if specified, is used to match edit parts that the strategy supports. The expression has three variables available to it:
+&lt;/p&gt;
+&lt;table border=&quot;1&quot; align=&quot;center&quot;&gt;
+&lt;tr&gt;&lt;th&gt;Variable&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;
+&lt;tr&gt;&lt;td&gt;editPart&lt;/td&gt;&lt;td&gt;the edit-part under consideration. This is also the default variable&lt;/td&gt;&lt;/tr&gt;
+ &lt;tr&gt;&lt;td&gt;view&lt;/td&gt;&lt;td&gt;the &lt;tt&gt;editPart&lt;/tt&gt;&apos;s notation view&lt;/th&gt;&lt;/tr&gt;
+ &lt;tr&gt;&lt;td&gt;element&lt;/td&gt;&lt;td&gt;the &lt;tt&gt;view&lt;/tt&gt;&apos;s semantic element&lt;/th&gt;&lt;/tr&gt;
+&lt;/table&gt;
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="enablement" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="editPart" type="string">
+ <annotation>
+ <documentation>
+ A class implementing the EditPart interface whose instances will be synchronized. If both this attribute and an &amp;lt;enablement&amp;gt; expression are supplied, then strategies will only be used that match both.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.gef.EditPart"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A strategy computing the list of semantic elements that will be represented as children of the referenced EditPart.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.ISemanticChildrenStrategy"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ Semantic children strategies are matched in priority order, from highest priority first to lowest priority last.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="defaultSemanticChildrenStrategy">
+ <annotation>
+ <documentation>
+ An extension that provides a generic default implementation of the semantic children for edit parts on semantic objects that it recognizes.
+&lt;p&gt;
+The nested &amp;lt;enablement&amp;gt; expression, if specified, is used to match edit parts that the strategy supports. The expression has three variables available to it:
+&lt;/p&gt;
+&lt;table border=&quot;1&quot; align=&quot;center&quot;&gt;
+&lt;tr&gt;&lt;th&gt;Variable&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;
+&lt;tr&gt;&lt;td&gt;editPart&lt;/td&gt;&lt;td&gt;the edit-part under consideration. This is also the default variable&lt;/td&gt;&lt;/tr&gt;
+ &lt;tr&gt;&lt;td&gt;view&lt;/td&gt;&lt;td&gt;the &lt;tt&gt;editPart&lt;/tt&gt;&apos;s notation view&lt;/th&gt;&lt;/tr&gt;
+ &lt;tr&gt;&lt;td&gt;element&lt;/td&gt;&lt;td&gt;the &lt;tt&gt;view&lt;/tt&gt;&apos;s semantic element&lt;/th&gt;&lt;/tr&gt;
+&lt;/table&gt;
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="enablement" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class implementing the default semantic children strategy
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.ISemanticChildrenStrategy"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ Default semantic children strategies are consulted only if a specific registered strategy is not matched. In this case, the first default that can provide any children is used, so the priority sorts defaults.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="creationTargetStrategy">
+ <annotation>
+ <documentation>
+ An extension that provides an alternative target edit part to which requests should be sent for canonical creation of child views.
+&lt;p&gt;
+The nested &amp;lt;enablement&amp;gt; expression, if specified, is used to match edit parts that the strategy supports. The expression has three variables available to it:
+&lt;/p&gt;
+&lt;table border=&quot;1&quot; align=&quot;center&quot;&gt;
+&lt;tr&gt;&lt;th&gt;Variable&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;
+&lt;tr&gt;&lt;td&gt;editPart&lt;/td&gt;&lt;td&gt;the edit-part under consideration. This is also the default variable&lt;/td&gt;&lt;/tr&gt;
+ &lt;tr&gt;&lt;td&gt;view&lt;/td&gt;&lt;td&gt;the &lt;tt&gt;editPart&lt;/tt&gt;&apos;s notation view&lt;/th&gt;&lt;/tr&gt;
+ &lt;tr&gt;&lt;td&gt;element&lt;/td&gt;&lt;td&gt;the &lt;tt&gt;view&lt;/tt&gt;&apos;s semantic element&lt;/th&gt;&lt;/tr&gt;
+&lt;/table&gt;
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="enablement" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class implementing the creation target edit-part strategy
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.ICreationTargetStrategy"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ Creation target edit-part strategies are matched in priority order, from highest priority first to lowest priority last.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="visualChildrenStrategy">
+ <annotation>
+ <documentation>
+ This is a pair (EditPart, IVisualChildrenStrategy) used to describe the list of visual notation elements that are canonical children and connections of the current EditPart.
+&lt;p&gt;
+The nested &amp;lt;enablement&amp;gt; expression, if specified, is used to match edit parts that the strategy supports. The expression has three variables available to it:
+&lt;/p&gt;
+&lt;table border=&quot;1&quot; align=&quot;center&quot;&gt;
+&lt;tr&gt;&lt;th&gt;Variable&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;
+&lt;tr&gt;&lt;td&gt;editPart&lt;/td&gt;&lt;td&gt;the edit-part under consideration. This is also the default variable&lt;/td&gt;&lt;/tr&gt;
+ &lt;tr&gt;&lt;td&gt;view&lt;/td&gt;&lt;td&gt;the &lt;tt&gt;editPart&lt;/tt&gt;&apos;s notation view&lt;/th&gt;&lt;/tr&gt;
+ &lt;tr&gt;&lt;td&gt;element&lt;/td&gt;&lt;td&gt;the &lt;tt&gt;view&lt;/tt&gt;&apos;s semantic element&lt;/th&gt;&lt;/tr&gt;
+&lt;/table&gt;
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="enablement" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="editPart" type="string">
+ <annotation>
+ <documentation>
+ A class implementing the EditPart interface whose instances will be synchronized. If both this attribute and an &amp;lt;enablement&amp;gt; expression are supplied, then strategies will only be used that match both.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.gef.EditPart"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A strategy computing the list of visual notation elements that are canonical children and connections of the referenced EditPart.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.IVisualChildrenStrategy"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string">
+ <annotation>
+ <documentation>
+ Visual children strategies are matched in priority order, from highest priority first to lowest priority last.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 1.1.0
+ </documentation>
+ </annotation>
+
+
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ The Composite Structure Diagram provided by Papyrus supports the presentation of nested composite structure in a part rectangle&apos;s structure compartment and ports around its border, according to the structure of the part&apos;s type (if any):
+
+&lt;pre&gt;
+ &lt;extension
+ point=&quot;org.eclipse.papyrus.infra.gmfdiag.canonical.strategies&quot;&gt;
+ &lt;semanticChildrenStrategy
+ editPart=&quot;org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartCompartmentEditPartCN&quot;
+ class=&quot;org.eclipse.papyrus.uml.diagram.composite.PropertyPartCompartmentSemanticChildrenStrategy&quot;&gt;
+ &lt;/semanticChildrenStrategy&gt;
+ &lt;semanticChildrenStrategy
+ editPart=&quot;org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartEditPartCN&quot;
+ class=&quot;org.eclipse.papyrus.uml.diagram.composite.PropertyPartCompartmentSemanticChildrenStrategy&quot;&gt;
+ &lt;/semanticChildrenStrategy&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+
+And for diagrams that do not need any more specific strategies, Papyrus provides defaults for owned elements and relationships to be presented as child views and edges, respectively:
+
+&lt;pre&gt;
+ &lt;extension
+ point=&quot;org.eclipse.papyrus.infra.gmfdiag.canonical.strategies&quot;&gt;
+ &lt;defaultSemanticChildrenStrategy
+ class=&quot;org.eclipse.papyrus.uml.diagram.common.canonical.DefaultUMLSemanticChildrenStrategy&quot;
+ priority=&quot;10&quot;&gt;
+ &lt;enablement&gt;
+ &lt;with
+ variable=&quot;element&quot;&gt;
+ &lt;instanceof
+ value=&quot;org.eclipse.uml2.uml.Element&quot;&gt;
+ &lt;/instanceof&gt;
+ &lt;/with&gt;
+ &lt;/enablement&gt;
+ &lt;/defaultSemanticChildrenStrategy&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+
+The Activity diagram cusomizes the edit part from which canonical creation of activity edges incoming and outgoing pins and groups is requested:
+
+&lt;pre&gt;
+ &lt;extension
+ point=&quot;org.eclipse.papyrus.infra.gmfdiag.canonical.strategies&quot;&gt;
+ &lt;creationTargetStrategy
+ class=&quot;org.eclipse.papyrus.uml.diagram.activity.canonical.ActivityCanonicalCreationTargetStrategy&quot;&gt;
+ &lt;enablement&gt;
+ &lt;with
+ variable=&quot;element&quot;&gt;
+ &lt;or&gt;
+ &lt;instanceof
+ value=&quot;org.eclipse.uml2.uml.Pin&quot;&gt;
+ &lt;/instanceof&gt;
+ &lt;instanceof
+ value=&quot;org.eclipse.uml2.uml.ActivityGroup&quot;&gt;
+ &lt;/instanceof&gt;
+ &lt;/or&gt;
+ &lt;/with&gt;
+ &lt;/enablement&gt;
+ &lt;/creationTargetStrategy&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/CanonicalStateListener.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/CanonicalStateListener.java
new file mode 100644
index 00000000000..ecb6081bafa
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/CanonicalStateListener.java
@@ -0,0 +1,308 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.canonical.editpolicy;
+
+import java.util.List;
+import java.util.concurrent.ConcurrentMap;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.util.EditPartUtil;
+import org.eclipse.gmf.runtime.notation.CanonicalStyle;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.tools.util.ReferenceCounted;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.MapMaker;
+
+/**
+ * A {@link DiagramEventBroker} listener that is notified when the {@link CanonicalStyle} of a view changes.
+ */
+public class CanonicalStateListener extends ReferenceCounted<CanonicalStateListener> implements NotificationListener {
+ private static final ConcurrentMap<IGraphicalEditPart, CanonicalStateListener> listeners = new MapMaker().weakKeys().weakValues().makeMap();
+
+ private final IGraphicalEditPart owner;
+
+ private List<Handler> handlers = Lists.newArrayListWithExpectedSize(2);
+
+ private CanonicalStateListener(IGraphicalEditPart owner) {
+ super();
+
+ this.owner = owner;
+
+ install();
+ }
+
+ @Override
+ protected void dispose() {
+ listeners.remove(owner, this);
+ uninstall();
+ }
+
+ /**
+ * <p>
+ * Obtains the shared canonical state listener for a given {@code editPart}.
+ * </p>
+ * <p>
+ * <b>Note</b> that the resulting listener is automatically {@linkplain ReferenceCounted#retain() retained} on the caller's behalf. The caller will have to {@linkplain ReferenceCounted#release() release} the listener when it is no longer needed.
+ * </p>
+ *
+ * @param editPart
+ * an edit part
+ * @return its shared canonical state listener. Do not {@linkplain ReferenceCounted#retain() retain} it, otherwise you will
+ * have doubly retained it
+ *
+ * @see ReferenceCounted#retain()
+ * @see ReferenceCounted#release()
+ */
+ public static CanonicalStateListener getInstance(IGraphicalEditPart editPart) {
+ CanonicalStateListener result = listeners.get(editPart);
+ if (result == null) {
+ result = new CanonicalStateListener(editPart);
+ CanonicalStateListener clash = listeners.putIfAbsent(editPart, result);
+ if (clash != null) {
+ result.dispose();
+ result = clash;
+ }
+ }
+ return result.retain();
+ }
+
+ public void addCanonicalRefreshHandler(Handler refreshHandler) {
+ handlers.add(refreshHandler);
+ }
+
+ public void removeCanonicalRefreshHandler(Handler refreshHandler) {
+ handlers.remove(refreshHandler);
+ }
+
+ private void install() {
+ View view = owner.getNotationView();
+
+ DiagramEventBroker broker = getDiagramEventBroker();
+ broker.addNotificationListener(view, NotationPackage.Literals.VIEW__STYLES, this);
+
+ // If provided by CSS, the style could be a transient floating object. In that case, don't listen to
+ // it (CSS cannot change its state). Or, if the view itself is a CanonicalStyle, then we're already
+ // listening to it
+ CanonicalStyle style = (CanonicalStyle) view.getStyle(NotationPackage.Literals.CANONICAL_STYLE);
+ if ((style != null) && (style.eContainer() == view)) {
+ install(style);
+ }
+ }
+
+ private IGraphicalEditPart getOwner() {
+ return owner;
+ }
+
+ private void install(CanonicalStyle style) {
+ DiagramEventBroker broker = getDiagramEventBroker();
+ broker.addNotificationListener(style, NotationPackage.Literals.CANONICAL_STYLE__CANONICAL, this);
+ }
+
+ private void uninstall() {
+ View view = getOwner().getNotationView();
+
+ CanonicalStyle style = (CanonicalStyle) view.getStyle(NotationPackage.Literals.CANONICAL_STYLE);
+ if ((style != null) && (style != view)) {
+ uninstall(style);
+ }
+
+ DiagramEventBroker broker = getDiagramEventBroker();
+ if (broker != null) {
+ broker.removeNotificationListener(view, NotationPackage.Literals.VIEW__STYLES, this);
+ }
+ }
+
+ private void uninstall(CanonicalStyle style) {
+ DiagramEventBroker broker = getDiagramEventBroker();
+ if (broker != null) {
+ broker.removeNotificationListener(style, NotationPackage.Literals.CANONICAL_STYLE__CANONICAL, this);
+ }
+ }
+
+ protected DiagramEventBroker getDiagramEventBroker() {
+ IGraphicalEditPart owner = getOwner();
+ TransactionalEditingDomain domain = (owner == null) ? null : owner.getEditingDomain();
+ return (domain == null) ? null : DiagramEventBroker.getInstance(domain);
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ Object notifier = notification.getNotifier();
+
+ if ((notifier instanceof CanonicalStyle) && (notification.getFeature() == NotationPackage.Literals.CANONICAL_STYLE__CANONICAL)) {
+ // Already listening to CanonicalStyle::canonical, so don't use internalHandleAdd
+ handleAdd((CanonicalStyle) notifier, null);
+ } else if (notification.getFeature() == NotationPackage.Literals.VIEW__STYLES) {
+ switch (notification.getEventType()) {
+ case Notification.ADD:
+ if (notification.getNewValue() instanceof CanonicalStyle) {
+ internalHandleAdd((CanonicalStyle) notification.getNewValue());
+ }
+ break;
+ case Notification.ADD_MANY:
+ for (Object next : (Iterable<?>) notification.getNewValue()) {
+ if (next instanceof CanonicalStyle) {
+ internalHandleAdd((CanonicalStyle) next);
+ break;
+ }
+ }
+ break;
+ case Notification.REMOVE:
+ if (notification.getOldValue() instanceof CanonicalStyle) {
+ internalHandleRemove((CanonicalStyle) notification.getOldValue());
+ }
+ break;
+ case Notification.REMOVE_MANY:
+ for (Object next : (Iterable<?>) notification.getOldValue()) {
+ if (next instanceof CanonicalStyle) {
+ internalHandleRemove((CanonicalStyle) next);
+ break;
+ }
+ }
+ break;
+ case Notification.SET:
+ case Notification.UNSET:
+ CanonicalStyle added = (notification.getNewValue() instanceof CanonicalStyle) ? (CanonicalStyle) notification.getNewValue() : null;
+ CanonicalStyle removed = (notification.getOldValue() instanceof CanonicalStyle) ? (CanonicalStyle) notification.getOldValue() : null;
+
+ if (added != null) {
+ if (removed != null) {
+ uninstall(removed);
+ }
+
+ // Doesn't matter whether the old style was a canonical. It matters that this one is
+ internalHandleAdd((CanonicalStyle) notification.getNewValue());
+ } else if (notification.getOldValue() instanceof CanonicalStyle) {
+ // Canonical style was replaced by a different kind
+ internalHandleRemove((CanonicalStyle) notification.getOldValue());
+ }
+ break;
+ }
+ }
+ }
+
+ private void internalHandleAdd(CanonicalStyle style) {
+ // If provided by CSS, the style could be a transient floating object. In that case, don't listen to
+ // it (CSS cannot change its state)
+ if (style.eContainer() == owner.getNotationView()) {
+ install(style);
+ }
+ handleAdd(style, null);
+ }
+
+ void handleAdd(CanonicalStyle style, Predicate<? super Handler> filter) {
+ if (!handlers.isEmpty()) {
+ Iterable<Handler> filtered = (filter == null) ? handlers : Iterables.filter(handlers, filter);
+ for (Handler next : filtered) {
+ Runnable update = next.handleAdd(style);
+ if (update != null) {
+ EditPartUtil.synchronizeRunnableToMainThread(getOwner(), update);
+ }
+ }
+ }
+ }
+
+ private void internalHandleRemove(CanonicalStyle style) {
+ uninstall(style);
+ handleRemove(style, null);
+ }
+
+ void handleRemove(CanonicalStyle style, Predicate<? super Handler> filter) {
+ if (!handlers.isEmpty()) {
+ Iterable<Handler> filtered = (filter == null) ? handlers : Iterables.filter(handlers, filter);
+ for (Handler next : filtered) {
+ Runnable update = next.handleRemove(style);
+ if (update != null) {
+ EditPartUtil.synchronizeRunnableToMainThread(getOwner(), update);
+ }
+ }
+ }
+ }
+
+ /**
+ * Handles a change in the implicit canonical style of a notation view (such as from changes in CSS stylesheets).
+ *
+ * @param requestor
+ * the handler of the entity making the poke request, which should be skipped in the poke
+ * (presumably because it already knows about the canonical state change)
+ * @param enabled
+ * whether the edit-policy has become enabled ({@code true}) or disabled ({@code false})
+ */
+ void pokeHandlers(Handler requestor, boolean enabled) {
+ View view = owner.getNotationView();
+ if (view != null) {
+ CanonicalStyle style = (CanonicalStyle) view.getStyle(NotationPackage.Literals.CANONICAL_STYLE);
+ if (style == null) {
+ // Only need to fake a removal if CSS told us that we're not enabled
+ if (!enabled) {
+ CanonicalStyle fakeStyle = NotationFactory.eINSTANCE.createCanonicalStyle();
+ handleRemove(fakeStyle, not(requestor));
+ }
+ } else if (style.eContainer() == null) {
+ // Only need to fake an addition if CSS told us that we're enabled
+ if (enabled) {
+ handleAdd(style, not(requestor));
+ }
+ }
+ }
+ }
+
+ private static Predicate<Object> not(final Object excluded) {
+ return (excluded == null) ? null : new Predicate<Object>() {
+ @Override
+ public boolean apply(Object input) {
+ return input != excluded;
+ }
+ };
+ }
+
+ //
+ // Nested types
+ //
+
+ public interface Handler {
+
+ /**
+ * Obtains a runnable that will be invoked on the display thread (for safe access to diagram edit parts)
+ * to handle the addition/update of the canonical {@code style}.
+ *
+ * @param style
+ * the added or changed canonical style
+ *
+ * @return a runnable to run in response, or {@code null} if no response is needed
+ */
+ Runnable handleAdd(CanonicalStyle style);
+
+ /**
+ * Obtains a runnable that will be invoked on the display thread (for safe access to diagram edit parts)
+ * to handle the removal of the canonical {@code style}.
+ *
+ * @param style
+ * the removed canonical style
+ *
+ * @return a runnable to run in response, or {@code null} if no response is needed
+ */
+ Runnable handleRemove(CanonicalStyle style);
+
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/PapyrusCanonicalEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/PapyrusCanonicalEditPolicy.java
new file mode 100644
index 00000000000..ab83e95bd7c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/editpolicy/PapyrusCanonicalEditPolicy.java
@@ -0,0 +1,790 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.editpolicy;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.WeakHashMap;
+import java.util.concurrent.Callable;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.TopGraphicEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.CanonicalStyle;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.util.CommandTreeIterator;
+import org.eclipse.papyrus.commands.wrappers.GEFCommandWrapper;
+import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.internal.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.ICreationTargetStrategy;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.ISemanticChildrenStrategy;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.IVisualChildrenStrategy;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.SemanticChildrenStrategyRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.requests.CanonicalDropObjectsRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IPapyrusCanonicalEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper;
+
+import com.google.common.base.Optional;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * A specialization of the GMF {@link CanonicalEditPolicy} that alters the standard behaviour in a few key ways:
+ * <ul>
+ * <li>rather than using the View Service to create child views, delegate to the core drag-and-drop implementation generated for each diagram (by-passing the Papyrus exensible/pluggable drop strategies). This avoids the problems of determining a priori the
+ * identifiers of child views to create in each compartment</li>
+ * <li>treat incoming and outgoing edges on a top shape as child views for canonical synchronization</li>
+ * <li>delegate determination of semantic children to pluggable strategies on an extension point</li>
+ * </ul>
+ */
+public class PapyrusCanonicalEditPolicy extends CanonicalEditPolicy implements IPapyrusCanonicalEditPolicy {
+
+ static final String FILTER_ID = "org.eclipse.papyrus.canonicalDependents"; //$NON-NLS-1$
+ static final String SEMI_ACTIVE_FILTER_ID = "org.eclipse.papyrus.semiCanonical"; //$NON-NLS-1$
+
+ private static final Set<View> createdByCanonical = Sets.newSetFromMap(new WeakHashMap<View, Boolean>());
+
+ private ISemanticChildrenStrategy semanticChildrenStrategy = null;
+ private ICreationTargetStrategy creationTargetStrategy;
+
+ private Collection<? extends EObject> dependents = null;
+
+ private CanonicalStateListener canonicalStateListener;
+ private CanonicalStateListener.Handler refreshHandler;
+
+ private State state = State.INACTIVE;
+
+ private boolean overrideEnabled;
+
+ @Override
+ public final void activate() {
+ if (host().getNotationView() != null) {
+ final SemanticChildrenStrategyRegistry reg = SemanticChildrenStrategyRegistry.getInstance();
+ semanticChildrenStrategy = reg.getSemanticChildrenStrategy(getHost());
+ creationTargetStrategy = ICreationTargetStrategy.Safe.safe(reg.getCreationTargetStrategy(getHost()));
+
+ hookCanonicalStateListener();
+ if (isEnabled()) {
+ doActivate();
+ } else {
+ transition(State.SEMIACTIVE);
+ }
+ }
+ }
+
+ protected final void basicActivate() {
+ transition(State.ACTIVE);
+ super.activate();
+ }
+
+ protected void doActivate() {
+ basicActivate();
+
+ if (semanticChildrenStrategy != null) {
+ dependents = semanticChildrenStrategy.getCanonicalDependents((getSemanticHost()));
+ hookDependentsListener(dependents);
+ }
+ }
+
+ @Override
+ public final void deactivate() {
+ if (host().getNotationView() != null) {
+ unhookCanonicalStateListener();
+ }
+
+ doDeactivate();
+
+ transition(State.INACTIVE);
+ }
+
+ protected final void basicDeactivate() {
+ super.deactivate();
+ transition(State.SEMIACTIVE);
+ }
+
+ protected void doDeactivate() {
+ basicDeactivate();
+ }
+
+ private State transition(State newState) {
+ final State result = state;
+
+ if (newState != state) {
+ if (!state.validateTransition(newState)) {
+ Activator.log.warn(String.format("PapyrusCanonicalEditPolicy forcing invalid transition %s => %s ", state, newState)); //$NON-NLS-1$
+ }
+
+ switch (newState) {
+ case INACTIVE:
+ removeListenerFilter(SEMI_ACTIVE_FILTER_ID);
+ break;
+ case SEMIACTIVE:
+ // Enter a semi-active state in which we only delete obsolete views that we had
+ // originally created canonically while we were active
+ EObject semanticHost = getSemanticHost();
+ if (semanticHost != null) {
+ addListenerFilter(SEMI_ACTIVE_FILTER_ID, this, semanticHost);
+ }
+ break;
+ case ACTIVE:
+ removeListenerFilter(SEMI_ACTIVE_FILTER_ID);
+ break;
+ }
+
+ state = newState;
+ }
+
+ return result;
+ }
+
+ protected final boolean isInState(State state) {
+ return this.state == state;
+ }
+
+ @Override
+ public void enableRefresh(boolean enable) {
+ // Only set ourselves 'enabled' when at least semi-active
+ if (!isInState(State.INACTIVE)) {
+ super.enableRefresh(enable);
+ }
+ }
+
+ @Override
+ public void refreshActive() {
+ if (canonicalStateListener != null) {
+ if (!isActive()) {
+ if (isCanonicalStyleEnabled()) {
+ doActivate();
+
+ // I will not get this poke
+ canonicalStateListener.pokeHandlers(refreshHandler, true);
+ }
+ } else {
+ if (!isCanonicalStyleEnabled()) {
+ doDeactivate();
+
+ // I will not get this poke
+ canonicalStateListener.pokeHandlers(refreshHandler, false);
+ }
+ }
+ }
+ }
+
+ /**
+ * For CSS support, the canonical style of a compartment is inherited from its parent shape.
+ */
+ @Override
+ protected CanonicalStyle getCanonicalStyle() {
+ return (CanonicalStyle) canonicalHost().getNotationView().getStyle(NotationPackage.eINSTANCE.getCanonicalStyle());
+ }
+
+ /**
+ * For CSS support, the canonical style of a compartment is inherited from its parent shape.
+ */
+ protected final IGraphicalEditPart canonicalHost() {
+ IGraphicalEditPart result = host();
+ if (result instanceof IResizableCompartmentEditPart) {
+ result = result.getTopGraphicEditPart();
+ }
+ return result;
+ }
+
+ private void hookCanonicalStateListener() {
+ class Activate implements Runnable {
+ @Override
+ public void run() {
+ doActivate();
+ }
+ }
+ class Deactivate implements Runnable {
+ @Override
+ public void run() {
+ doDeactivate();
+ }
+ }
+
+ refreshHandler = new CanonicalStateListener.Handler() {
+ @Override
+ public Runnable handleAdd(CanonicalStyle style) {
+ Runnable result = null;
+
+ if (style.isCanonical()) {
+ if (!isActive()) {
+ result = new Activate();
+ }
+ } else if (isActive()) {
+ result = new Deactivate();
+ }
+
+ return result;
+ }
+
+ @Override
+ public Runnable handleRemove(CanonicalStyle style) {
+ Runnable result = null;
+
+ if (isActive()) {
+ result = new Deactivate();
+ }
+
+ return result;
+ }
+ };
+
+ canonicalStateListener = CanonicalStateListener.getInstance(canonicalHost());
+ canonicalStateListener.addCanonicalRefreshHandler(refreshHandler);
+ }
+
+ private void unhookCanonicalStateListener() {
+ if (canonicalStateListener != null) {
+ canonicalStateListener.removeCanonicalRefreshHandler(refreshHandler);
+ canonicalStateListener.release();
+ canonicalStateListener = null;
+ }
+ }
+
+ protected void hookDependentsListener(Iterable<? extends EObject> dependents) {
+ if (dependents != null) {
+ for (EObject next : dependents) {
+ addListenerFilter(FILTER_ID, this, next);
+ }
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ if (overrideEnabled) {
+ return true;
+ }
+
+ // by default there is no synchronization
+ if (getCanonicalStyle() == null) {
+ return false;
+ }
+ return super.isEnabled();
+ }
+
+ /**
+ * Queries whether I have the {@linkplain CanonicalStyle canonical style} applied and that style
+ * is {@linkplain CanonicalStyle#isCanonical() enabled}.
+ */
+ protected boolean isCanonicalStyleEnabled() {
+ CanonicalStyle style = getCanonicalStyle();
+ return (style != null) && style.isCanonical();
+ }
+
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ List<EObject> result = getSemanticChildrenList(ChildrenKind.NODE);
+
+ if (isManageConnections()) {
+ result = concat(result, getSemanticChildrenList());
+ }
+
+ return result;
+ }
+
+ static <E> List<E> concat(Iterable<? extends E> list1, Iterable<? extends E> list2) {
+ List<E> result = null;
+
+ if (list1 != null) {
+ result = Lists.newArrayList(list1);
+ }
+
+ if (list2 != null) {
+ if (result != null) {
+ Iterables.addAll(result, list2);
+ } else {
+ result = Lists.newArrayList(list2);
+ }
+ }
+
+ return (result == null) ? Collections.<E> emptyList() : result;
+ }
+
+ protected List<EObject> getSemanticChildrenList(ChildrenKind kind) {
+ if (semanticChildrenStrategy != null) {
+ ArrayList<EObject> ancestor = getAllEObjectAncestor();
+
+ List<? extends EObject> children;
+ switch (kind) {
+ case NODE:
+ children = semanticChildrenStrategy.getCanonicalSemanticChildren(getSemanticHost(), host().getNotationView());
+ break;
+ case CONNECTION:
+ children = semanticChildrenStrategy.getCanonicalSemanticConnections(getSemanticHost(), host().getNotationView());
+ break;
+ default:
+ throw new IllegalArgumentException(kind.name());
+ }
+
+ if (children != null) {
+ for (EObject next : children) {
+ if (ancestor.contains(next)) {
+ return Collections.emptyList();
+ }
+ }
+ return Collections.unmodifiableList(children);
+ }
+ }
+
+ return Collections.emptyList();
+ }
+
+
+ /**
+ * This method is used to calculate if a semantic element has been already display in parent to avoid loop of display
+ *
+ * @return the list of all semantic element display by parents edipart.
+ */
+ protected ArrayList<EObject> getAllEObjectAncestor() {
+ ArrayList<EObject> ancestor = new ArrayList<EObject>();
+ EditPart currentEditPart = getHost();
+ if (currentEditPart.getModel() instanceof View) {
+ ancestor.add(((View) currentEditPart.getModel()).getElement());
+ }
+ while (currentEditPart.getParent() != null) {
+ currentEditPart = currentEditPart.getParent();
+ if (currentEditPart.getModel() instanceof View) {
+ ancestor.add(((View) currentEditPart.getModel()).getElement());
+ }
+ }
+ return ancestor;
+
+ }
+
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ // Override the enabled state to process deletions
+ final boolean oldOverride = overrideEnabled;
+ overrideEnabled = overrideEnabled || isInState(State.SEMIACTIVE);
+
+ try {
+ super.handleNotificationEvent(event);
+ if (semanticChildrenStrategy != null) {
+ if (dependents == null) {
+ dependents = semanticChildrenStrategy.getCanonicalDependents(getSemanticHost());
+ hookDependentsListener(dependents);
+ }
+ }
+ } finally {
+ overrideEnabled = oldOverride;
+ }
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy#refreshSemantic()
+ * In order to connect the drop mechanism this method has be overloaded
+ */
+ @Override
+ protected void refreshSemantic() {
+ // First, process all child nodes now
+ List<IAdaptable> createdViews = refreshSemanticChildren(ChildrenKind.NODE);
+ makeViewsImmutable(createdViews);
+
+ // Then, repeat later with connections included, if appropriate
+ if (isManageConnections()) {
+ ListenableFuture<List<IAdaptable>> createdConnections = DiagramHelper.submit(getHost(), new Callable<List<IAdaptable>>() {
+ @Override
+ public List<IAdaptable> call() throws Exception {
+ return refreshSemanticChildren(ChildrenKind.CONNECTION);
+ }
+ });
+ Futures.addCallback(createdConnections, new FutureCallback<List<IAdaptable>>() {
+ @Override
+ public void onSuccess(List<IAdaptable> result) {
+ makeViewsImmutable(result);
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ Activator.log.error(t);
+ }
+ });
+ }
+ }
+
+
+
+ /**
+ * this method is extracted from refreshSemanticChildren
+ * but instead of using the service view it uses the drop
+ *
+ * @return
+ */
+ protected List<IAdaptable> refreshSemanticChildren(ChildrenKind kind) {
+ // -------------- code from superClass----------------
+ // Don't try to refresh children if the semantic element
+ // cannot be resolved.
+ if (resolveSemanticElement() == null) {
+ return Collections.emptyList();
+ }
+
+ if (isInState(State.SEMIACTIVE) && createdByCanonical.isEmpty()) {
+ // No point in calculating anything because we have nothing to clean up
+ return Collections.emptyList();
+ }
+
+ // current views
+ List<View> viewChildren = getViewChildren(kind);
+ List<EObject> semanticChildren = new ArrayList<EObject>(getSemanticChildrenList(kind));
+
+ boolean changed = false;
+
+ if (!isInState(State.INACTIVE)) {
+ //
+ // delete all the remaining orphaned views
+ List<View> orphaned = cleanCanonicalSemanticChildren(viewChildren, semanticChildren);
+ if (!orphaned.isEmpty() && isInState(State.SEMIACTIVE)) {
+ // Furthermore, if we're only semiactive, then we should only delete views that we
+ // had created canonically while we were active
+ filterCanonicallyCreated(orphaned);
+ }
+ if (!orphaned.isEmpty()) {
+ // We may be asynchronously processing the deletion of a relationship that
+ // requires deletion of edges. If so, we may be only semi-active (the edge
+ // could have been created by the edit-part at the other end)
+ changed = deleteViews(orphaned);
+ }
+ }
+
+ //
+ // create a view for each remaining semantic element, if requested.
+ List<IAdaptable> createdViews = Collections.emptyList();
+ if (isInState(State.ACTIVE)) {
+ if (!semanticChildren.isEmpty()) {
+ createdViews = createViews(semanticChildren);
+ }
+ }
+
+ if (changed || !createdViews.isEmpty()) {
+ postProcessRefreshSemantic(createdViews);
+ }
+
+ return createdViews;
+ }
+
+ /**
+ * As {@link CanonicalEditPolicy#deleteViews(Iterator)}, deletes a list of views.
+ * The views will be deleted <tt>iff</tt> their semantic element has also been deleted.
+ *
+ * @param views
+ * an iterator on a list of views.
+ * @return <tt>true</tt> if the host editpart should be refreshed; either one one of the supplied
+ * views was deleted or has been reparented.
+ */
+ protected boolean deleteViews(Iterable<? extends View> views) {
+ // Copied from CanonicalEditPolicy::deleteViews because that method is final, and
+ // we need to be able to delete views even when we are only semi-active
+ if (!isEnabled() && isInState(State.INACTIVE)) {
+ return false;
+ }
+ final CompoundCommand cc = new CompoundCommand(DiagramUIMessages.DeleteCommand_Label);
+ for (View view : views) {
+ if (shouldDeleteView(view)) {
+ cc.add(getDeleteViewCommand(view));
+ }
+ }
+
+ boolean doDelete = !cc.isEmpty() && cc.canExecute();
+ if (doDelete) {
+ executeCommand(cc);
+ }
+ return doDelete;
+ }
+
+ @Override
+ protected Command getCreateViewCommand(CreateRequest request) {
+ Command result;
+
+ if (!(request instanceof CreateViewRequest)) {
+ result = super.getCreateViewCommand(request);
+ } else {
+ // Transform the request to a drop request serviced by the canonical drop policy
+ CreateViewRequest createViewRequest = (CreateViewRequest) request;
+ Iterable<? extends ViewDescriptor> descriptors = createViewRequest.getViewDescriptors();
+
+ CompoundCommand compoundCommand = new CompoundCommand();
+ for (ViewDescriptor viewDescriptor : descriptors) {
+ EObject element = (EObject) viewDescriptor.getElementAdapter().getAdapter(EObject.class);
+
+ if (element != null) {
+ List<EObject> elementToDrop = Collections.singletonList(element);
+ DropObjectsRequest dropRequest = new DropObjectsRequest();
+ dropRequest.setObjects(elementToDrop);
+ dropRequest.setLocation(createViewRequest.getLocation());
+ CanonicalDropObjectsRequest canonicalRequest = new CanonicalDropObjectsRequest(dropRequest);
+
+ Command cmd = creationTargetStrategy.getTargetEditPart(getHost(), element).getCommand(canonicalRequest);
+ if ((cmd != null) && cmd.canExecute()) {
+ compoundCommand.add(cmd);
+ }
+ }
+ }
+
+ result = compoundCommand.unwrap();
+ if (result.canExecute()) {
+ result = tagAndArrange(result);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ protected List<View> getViewChildren() {
+ List<View> result = getViewChildren(ChildrenKind.NODE);
+
+ if (isManageConnections()) {
+ result.addAll(getViewChildren(ChildrenKind.CONNECTION));
+ }
+
+ return result;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected List<View> getViewChildren(ChildrenKind kind) {
+ final IGraphicalEditPart host = host();
+ final View view = host.getNotationView();
+ final IVisualChildrenStrategy strategy = SemanticChildrenStrategyRegistry.getInstance().getVisualChildrenStrategy(host);
+
+ List<View> result;
+
+ if (strategy != null) {
+ List<? extends View> childViews;
+ switch (kind) {
+ case NODE:
+ childViews = strategy.getCanonicalChildren(host, view);
+ break;
+ case CONNECTION:
+ childViews = strategy.getCanonicalEdges(host, view);
+ break;
+ default:
+ throw new IllegalArgumentException(kind.name());
+ }
+ result = (childViews == null) ? Collections.<View> emptyList() : Lists.newArrayList(childViews);
+ } else {
+ // Default strategy
+ switch (kind) {
+ case NODE:
+ result = super.getViewChildren();
+
+ // Filter out child views that visualize the same element as my view (these
+ // should be compartments, decorations, labels)
+ final EObject semantic = getSemanticHost();
+ for (Iterator<? extends View> iter = result.iterator(); iter.hasNext();) {
+ if (iter.next().getElement() == semantic) {
+ iter.remove();
+ }
+ }
+ break;
+ case CONNECTION:
+ // Get distinct incoming and outgoing edges of top shapes and border items.
+ // Compartments of top shapes take care of their own contents
+ List<View> edges = Lists.newArrayList();
+ result = edges;
+ if (view.eIsSet(NotationPackage.Literals.VIEW__SOURCE_EDGES)) {
+ edges.addAll(view.getSourceEdges());
+ }
+ if (view.eIsSet(NotationPackage.Literals.VIEW__TARGET_EDGES)) {
+ for (Edge next : (Iterable<? extends Edge>) view.getTargetEdges()) {
+ if (next.getSource() != view) {
+ // Didn't already get a self-edge from the source edges
+ edges.add(next);
+ }
+ }
+ }
+ break;
+ default:
+ throw new IllegalArgumentException(kind.name());
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries whether I manage canonical connections. Edit parts such as top shapes and border items manage connections;
+ * other edit parts such as compartments manage contained views only.
+ *
+ * @return whether I manage canonical connections
+ */
+ protected boolean isManageConnections() {
+ final EditPart host = host();
+ return (host instanceof TopGraphicEditPart) || (host instanceof IBorderItemEditPart);
+ }
+
+ private Command tagAndArrange(Command creationCommand) {
+ return new PostCreationWrapperCommand<List<IAdaptable>>(creationCommand) {
+
+ @Override
+ protected List<IAdaptable> createAccumulator() {
+ return Lists.newArrayList();
+ }
+
+ @Override
+ protected void postProcessView(Object viewish, List<IAdaptable> accumulator) {
+ if (viewish instanceof IAdaptable) {
+ View view = (View) ((IAdaptable) viewish).getAdapter(View.class);
+ if (view != null) {
+ // Arrange the parent of a label, not the label
+ if (view instanceof DecorationNode) {
+ view = (View) view.eContainer();
+ viewish = new EObjectAdapter(view);
+ }
+
+ }
+ accumulator.add((IAdaptable) viewish);
+ }
+ super.postProcessView(viewish, accumulator);
+ }
+
+ @Override
+ protected void postProcessView(View view, List<IAdaptable> accumulator) {
+ createdByCanonical.add(view);
+ }
+
+ @Override
+ protected void complete(List<IAdaptable> accumulator) {
+ if (!accumulator.isEmpty()) {
+ final DeferredLayoutCommand layout = new DeferredLayoutCommand(host().getEditingDomain(), accumulator, host());
+ if (layout.canExecute()) {
+ DiagramHelper.asyncExec(getHost(), new Runnable() {
+
+ @Override
+ public void run() {
+ executeCommand(new ICommandProxy(layout));
+ }
+ });
+ }
+ }
+ }
+ };
+ }
+
+ private <C extends Collection<? extends View>> C filterCanonicallyCreated(C views) {
+ for (Iterator<? extends View> iter = views.iterator(); iter.hasNext();) {
+ if (!createdByCanonical.contains(iter.next())) {
+ iter.remove();
+ }
+ }
+
+ return views;
+ }
+
+ //
+ // Nested types
+ //
+
+ protected enum State {
+ INACTIVE,
+ SEMIACTIVE,
+ ACTIVE;
+
+ boolean validateTransition(State next) {
+ switch (this) {
+ case INACTIVE:
+ case SEMIACTIVE:
+ return next != this;
+ case ACTIVE:
+ return next == SEMIACTIVE;
+ default:
+ throw new IllegalStateException("No such state: " + this); //$NON-NLS-1$
+ }
+ }
+ }
+
+ protected enum ChildrenKind {
+ NODE, CONNECTION;
+ }
+
+ protected static abstract class PostCreationWrapperCommand<A> extends GEFCommandWrapper {
+ public PostCreationWrapperCommand(Command command) {
+ super(command);
+ }
+
+ @Override
+ public void execute() {
+ super.execute();
+
+ A accumulator = createAccumulator();
+ postProcessViews(getCommand(), accumulator);
+ complete(accumulator);
+ }
+
+ protected A createAccumulator() {
+ return null;
+ }
+
+ protected void complete(A accumulator) {
+ // Pass
+ }
+
+ private void postProcessViews(Command command, A accumulator) {
+ for (Iterator<ICommand> iter = CommandTreeIterator.iterateGMF(command); iter.hasNext();) {
+ CommandResult result = iter.next().getCommandResult();
+ if ((result != null) && ((result.getStatus() == null) || result.getStatus().isOK())) {
+ Object returnValue = result.getReturnValue();
+ if (returnValue instanceof Iterable<?>) {
+ for (Object next : (Iterable<?>) returnValue) {
+ postProcessView(next, accumulator);
+ }
+ } else if (returnValue != null) {
+ postProcessView(returnValue, accumulator);
+ }
+ }
+ }
+ }
+
+ protected void postProcessView(Object viewish, A accumulator) {
+ Optional<View> view = AdapterUtils.adapt(viewish, View.class);
+ if (view.isPresent()) {
+ postProcessView(view.get(), accumulator);
+ }
+ }
+
+ protected void postProcessView(View view, A accumulator) {
+ // Pass
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/internal/Activator.java
index 3d89c9ee80c..1be3b2c8644 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/Activator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/internal/Activator.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,10 +8,12 @@
*
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.synchronizeview;
+package org.eclipse.papyrus.infra.gmfdiag.canonical.internal;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -22,35 +23,33 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.synchronizeview"; //$NON-NLS-1$
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.canonical"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
+ /** Logging helper */
+ public static LogHelper log;
+
/**
* The constructor
*/
public Activator() {
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
+
plugin = this;
+
+ // register the login helper
+ log = new LogHelper(this);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
@Override
public void stop(BundleContext context) throws Exception {
+ log = null;
plugin = null;
super.stop(context);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/provider/SynchronizeEditPolicyProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/internal/provider/PapyrusCanonicalEditPolicyProvider.java
index b38f67692ba..895cd804954 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/provider/SynchronizeEditPolicyProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/internal/provider/PapyrusCanonicalEditPolicyProvider.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,9 +8,10 @@
*
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.synchronizeview.provider;
+package org.eclipse.papyrus.infra.gmfdiag.canonical.internal.provider;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
@@ -23,34 +23,35 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.editpolicy.PapyrusCanonicalEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart;
-import org.eclipse.papyrus.uml.diagram.synchronizeview.editpolicy.SynchronizeViewEditPolicy;
/**
* this is an editpolicy provider in charge to install a canonical edit policy on papyrus editpart
*/
-public class SynchronizeEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
+public class PapyrusCanonicalEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
- /**
- *
- * {@inheritDoc}
- */
@Override
public void createEditPolicies(EditPart editPart) {
-
- if (!(editPart instanceof ITextAwareEditPart)) {
+ if (supportsCanonical(editPart)) {
if (editPart instanceof DiagramEditPart || editPart instanceof CompartmentEditPart || editPart instanceof IBorderedShapeEditPart) {
- editPart.installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new SynchronizeViewEditPolicy());
+ editPart.installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new PapyrusCanonicalEditPolicy());
}
}
}
+ protected boolean supportsCanonical(EditPart editPart) {
+ boolean result = false;
+ if (!(editPart instanceof ITextAwareEditPart)) {
+ result = (editPart instanceof DiagramEditPart)
+ || (editPart instanceof CompartmentEditPart)
+ || (editPart instanceof IBorderedShapeEditPart);
+ }
+
+ return result;
+ }
- /**
- *
- * {@inheritDoc}
- */
@Override
public boolean provides(IOperation operation) {
CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
@@ -66,16 +67,9 @@ public class SynchronizeEditPolicyProvider extends AbstractProvider implements I
} catch (ServiceException e) {
return false;
}
- // we are sure that this is a papyrus editpart
- if (!(gep instanceof ITextAwareEditPart)) {
- if (gep instanceof DiagramEditPart || gep instanceof CompartmentEditPart || gep instanceof IBorderedShapeEditPart) {
- return true;
- }
- }
-
-
- return false;
+ // we are sure that this is a papyrus editpart
+ return supportsCanonical(gep);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/BasicSemanticChildrenStrategy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/BasicSemanticChildrenStrategy.java
new file mode 100644
index 00000000000..28f48594476
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/BasicSemanticChildrenStrategy.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.util.ECollections;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.util.EContentsEList;
+import org.eclipse.gmf.runtime.notation.View;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * A default implementation of the semantic children strategy that is parameterized
+ * by features providing children and
+ */
+public class BasicSemanticChildrenStrategy implements ISemanticChildrenStrategy {
+
+ private EReference[] childReferences;
+ private EReference[] connectionReferences;
+ private EReference[] dependentReferences;
+
+ public BasicSemanticChildrenStrategy(EReference[] childReferences, EReference[] connectionReferences, EReference[] dependentReferences) {
+ super();
+
+ this.childReferences = (childReferences == null) || (childReferences.length == 0) ? null
+ : Arrays.copyOf(childReferences, childReferences.length);
+ this.connectionReferences = (connectionReferences == null) || (connectionReferences.length == 0) ? null
+ : Arrays.copyOf(connectionReferences, connectionReferences.length);
+ this.dependentReferences = (dependentReferences == null) || (dependentReferences.length == 0) ? null
+ : Arrays.copyOf(dependentReferences, dependentReferences.length);
+ }
+
+ public BasicSemanticChildrenStrategy(Iterable<? extends EReference> childReferences, Iterable<? extends EReference> connectionReferences, Iterable<? extends EReference> dependentReferences) {
+ super();
+
+ this.childReferences = (childReferences == null) || Iterables.isEmpty(childReferences) ? null
+ : Iterables.toArray(childReferences, EReference.class);
+ this.connectionReferences = (connectionReferences == null) || Iterables.isEmpty(connectionReferences) ? null
+ : Iterables.toArray(connectionReferences, EReference.class);
+ this.dependentReferences = (dependentReferences == null) || Iterables.isEmpty(dependentReferences) ? null
+ : Iterables.toArray(dependentReferences, EReference.class);
+ }
+
+ @Override
+ public List<? extends EObject> getCanonicalSemanticChildren(EObject semanticFromEditPart, View viewFromEditPart) {
+ return (childReferences == null)
+ ? ECollections.<EObject> emptyEList()
+ : new EContentsEList<EObject>(semanticFromEditPart, childReferences);
+ }
+
+ @Override
+ public List<? extends EObject> getCanonicalSemanticConnections(EObject semanticFromEditPart, View viewFromEditPart) {
+ return (connectionReferences == null)
+ ? ECollections.<EObject> emptyEList()
+ : new EContentsEList<EObject>(semanticFromEditPart, connectionReferences);
+ }
+
+ @Override
+ public Collection<? extends EObject> getCanonicalDependents(EObject semanticFromEditPart) {
+ return (dependentReferences == null)
+ ? ECollections.<EObject> emptyEList()
+ : new EContentsEList<EObject>(semanticFromEditPart, dependentReferences);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/CreationTargetStrategyRegistration.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/CreationTargetStrategyRegistration.java
new file mode 100644
index 00000000000..0688a69c684
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/CreationTargetStrategyRegistration.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+
+
+/**
+ * The registration of a creation target strategy.
+ */
+class CreationTargetStrategyRegistration extends Registration<ICreationTargetStrategy, CreationTargetStrategyRegistration> {
+
+ CreationTargetStrategyRegistration(IConfigurationElement config) throws CoreException {
+ super(config, ICreationTargetStrategy.class);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/DefaultSemanticChildrenStrategyRegistration.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/DefaultSemanticChildrenStrategyRegistration.java
new file mode 100644
index 00000000000..dc2e31e3d73
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/DefaultSemanticChildrenStrategyRegistration.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+
+
+/**
+ * The registration of a default semantic children strategy.
+ */
+class DefaultSemanticChildrenStrategyRegistration extends Registration<ISemanticChildrenStrategy, DefaultSemanticChildrenStrategyRegistration> {
+
+ DefaultSemanticChildrenStrategyRegistration(IConfigurationElement config) throws CoreException {
+ super(config, ISemanticChildrenStrategy.class);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/EditPartBasedRegistration.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/EditPartBasedRegistration.java
new file mode 100644
index 00000000000..50123913ff6
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/EditPartBasedRegistration.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.gef.EditPart;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.internal.Activator;
+import org.osgi.framework.Bundle;
+
+import com.google.common.base.Strings;
+
+/**
+ * Abstraction of an {@link EditPart}-based registration on the extension point.
+ */
+abstract class EditPartBasedRegistration<T, R extends EditPartBasedRegistration<? extends T, R>> extends Registration<T, R> {
+
+ private static final String EDITPART = "editPart"; //$NON-NLS-1$
+
+ private final String editPartClassName;
+
+ private Class<?> editPartType;
+
+ private IStatus editPartTypeFailure;
+
+ public EditPartBasedRegistration(IConfigurationElement config, Class<T> extensionType) throws CoreException {
+ super(config, extensionType);
+
+ this.editPartClassName = Strings.emptyToNull(config.getAttribute(EDITPART));
+ }
+
+ private Class<?> getEditPartType() {
+ if ((editPartType == null) && (editPartTypeFailure == null) && (editPartClassName != null)) {
+ IConfigurationElement config = getConfigurationElement();
+ Bundle bundle = Platform.getBundle(config.getContributor().getName());
+ if ((bundle != null) && (bundle.getState() == Bundle.ACTIVE)) {
+ try {
+ editPartType = bundle.loadClass(editPartClassName).asSubclass(EditPart.class);
+ } catch (Exception e) {
+ editPartType = Void.class; // Forget matching anything, ever
+ Activator.log.error("Failed to load edit-part type " + editPartClassName, e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ return editPartType;
+ }
+
+ boolean matchesEditPartType(Class<?> editPartType) {
+ boolean result = (editPartClassName == null);
+
+ if (!result) {
+ // The declaring bundle may not be loaded, in which case we don't want its strategy
+ Class<?> myEditPartType = getEditPartType();
+ result = (myEditPartType != null) && myEditPartType.isAssignableFrom(editPartType);
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isApplicableTo(EditPart editPart) {
+ return matchesEditPartType(editPart.getClass()) && super.isApplicableTo(editPart);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/ICreationTargetStrategy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/ICreationTargetStrategy.java
new file mode 100644
index 00000000000..9a663619aa1
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/ICreationTargetStrategy.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+
+/**
+ * A pluggable strategy for determining which edit part should be requested to create
+ * canonical views on behalf of a requesting edit part.
+ */
+public interface ICreationTargetStrategy {
+ /**
+ * A creation-target strategy that always returns the requesting host edit-part as the creation target.
+ */
+ ICreationTargetStrategy IDENTITY = new ICreationTargetStrategy() {
+
+ @Override
+ public EditPart getTargetEditPart(EditPart host, EObject element) {
+ return host;
+ }
+ };
+
+ /**
+ * Obtains the edit part to which the view creation request should be sent
+ * for the given model {@code element}, which was provided as a {@linkplain ISemanticChildrenStrategy semantic child} of the specified {@code host} edit-part.
+ *
+ * @param host
+ * the host edit-part of the {@link CanonicalEditPolicy} requesting creation of a view of an {@code element}
+ * @param element
+ * the element for which a view is required
+ *
+ * @return the target edit part, which may just be the {@code host} as is, or {@code null} if this strategy does not
+ * provide a target
+ */
+ EditPart getTargetEditPart(EditPart host, EObject element);
+
+ //
+ // Nested types
+ //
+
+ /**
+ * A factory for null-safe creation-target strategies.
+ */
+ class Safe implements ICreationTargetStrategy {
+ private final ICreationTargetStrategy delegate;
+
+ private Safe(ICreationTargetStrategy delegate) {
+ super();
+
+ this.delegate = delegate;
+ }
+
+ /**
+ * Obtains a creation-target strategy that is ensured never to return a {@code null} target edit part.
+ *
+ * @param strategy
+ * a strategy to wrap. May be {@code null} if no actual strategy is applicable
+ *
+ * @return a strategy, perhaps a wrapper or perhaps the original {@code strategy}, that is guaranteed always to provide a creation target
+ */
+ public static ICreationTargetStrategy safe(ICreationTargetStrategy strategy) {
+ return (strategy == null) ? IDENTITY : (strategy instanceof Safe) ? strategy : new Safe(strategy);
+ }
+
+ @Override
+ public EditPart getTargetEditPart(EditPart host, EObject element) {
+ EditPart specific = delegate.getTargetEditPart(host, element);
+ return (specific == null) ? host : specific;
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/ISemanticChildrenStrategy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/ISemanticChildrenStrategy.java
new file mode 100644
index 00000000000..7e48536ee74
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/ISemanticChildrenStrategy.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * A pluggable strategy for determination of semantic "children" of an element, those being
+ * either contained elements, relationships of the element, or other related elements.
+ */
+public interface ISemanticChildrenStrategy {
+ /**
+ * Queries the semantic elements that should be presented visually as children of the specified element.
+ *
+ * @param semanticFromEditPart
+ * the semantic model element represented by a canonical edit-part in the diagram
+ * @param viewFromEditPart
+ * the visual (notational) representation of the semantic element, to provide diagram context if required (such as
+ * for determining the appropriate part-with-port match of a connector end)
+ * @return list of semantic elements, or {@code null} to indicate that the strategy does not support the given element.
+ * <b>Note</b> that the result is specifically a {@link List} type because the GMF {@link CanonicalEditPolicy} expects lists of children, not other kinds of collections
+ */
+ public List<? extends EObject> getCanonicalSemanticChildren(EObject semanticFromEditPart, View viewFromEditPart);
+
+ /**
+ * Queries the semantic elements that should be presented visually as connections attached to the specified element.
+ *
+ * @param semanticFromEditPart
+ * the semantic model element represented by a canonical edit-part in the diagram
+ * @param viewFromEditPart
+ * the visual (notational) representation of the semantic element, to provide diagram context if required (such as
+ * for determining the appropriate part-with-port match of a connector end)
+ * @return list of semantic connection elements, or {@code null} to indicate that the strategy does not support the given element.
+ * <b>Note</b> that the result is specifically a {@link List} type because the GMF {@link CanonicalEditPolicy} expects lists of children, not other kinds of collections
+ */
+ public List<? extends EObject> getCanonicalSemanticConnections(EObject semanticFromEditPart, View viewFromEditPart);
+
+ /**
+ * Retrieves objects, if any, related to the element behind a canonical edit-part
+ * on which the that element depends for canonical refresh updates.
+ *
+ * @return dependents of the semantic element, or {@code null} to indicate that it does not support dependents
+ */
+ public Collection<? extends EObject> getCanonicalDependents(EObject semanticFromEditPart);
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/IVisualChildrenStrategy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/IVisualChildrenStrategy.java
new file mode 100644
index 00000000000..a23a05a67ce
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/IVisualChildrenStrategy.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * A pluggable strategy for determination of visual "children" of an element, those being
+ * either child nodes or connected edges.
+ */
+public interface IVisualChildrenStrategy {
+ /**
+ * Queries the visual elements that are children a view that should be synchronized
+ * with the represented element's semantic "children".
+ *
+ * @param editPart
+ * the edit-part being synchronized
+ * @param view
+ * the edit-part's notation view
+ * @return a list of child views, or {@code null} to indicate that the strategy does not support the given edit-part.
+ * <b>Note</b> that the result is specifically a {@link List} type because the GMF {@link CanonicalEditPolicy} expects lists of views, not other kinds of collections
+ */
+ public List<? extends View> getCanonicalChildren(EditPart editPart, View view);
+
+ /**
+ * Queries the visual elements that are edges connected to a view that should be synchronized
+ * with the represented element's semantic "children" or "connections". The returned views may
+ * alternatively or also include child views of connected edges, in the case that those children
+ * (e.g., labels) are the significant representative views.
+ *
+ * @param editPart
+ * the edit-part being synchronized
+ * @param view
+ * the edit-part's notation view
+ * @return a list of connected edges (or some child views of connected edges), or {@code null} to indicate that the strategy does not support the given edit-part.
+ * <b>Note</b> that the result is specifically a {@link List} type because the GMF {@link CanonicalEditPolicy} expects lists of views, not other kinds of collections
+ */
+ public List<? extends View> getCanonicalEdges(EditPart editPart, View view);
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/Registration.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/Registration.java
new file mode 100644
index 00000000000..8c257ebb672
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/Registration.java
@@ -0,0 +1,165 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionConverter;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.internal.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+
+import com.google.common.base.Strings;
+
+/**
+ * Abstract implementation of an optionally filtered lazy-loading extension-point registration with priority ordering.
+ * Extensions compare in priority order (least priority is last).
+ */
+abstract class Registration<T, R extends Registration<? extends T, R>> implements Comparable<R> {
+
+ private static final String ENABLEMENT = "enablement"; //$NON-NLS-1$
+
+ private static final String CLASS = "class"; //$NON-NLS-1$
+
+ private static final String PRIORITY = "priority"; //$NON-NLS-1$
+
+ private final IConfigurationElement config;
+
+ private final Class<? extends T> extensionType;
+
+ private final int priority;
+
+ private final Expression filterExpression;
+
+ private T extension;
+
+ private IStatus extensionFailure;
+
+ protected Registration(IConfigurationElement config, Class<? extends T> extensionType) throws CoreException {
+ super();
+
+ this.config = config;
+ this.extensionType = extensionType;
+ this.filterExpression = parseExpression(config, ENABLEMENT);
+ this.priority = parseInt(config, PRIORITY);
+ }
+
+ /**
+ * Obtains the extension's priority relative to others that match the same filter criteria (if any).
+ */
+ public int getPriority() {
+ return priority;
+ }
+
+ @Override
+ public int compareTo(R o) {
+ return this.getPriority() - o.getPriority();
+ }
+
+ public boolean isApplicableTo(EditPart editPart) {
+ boolean result = !hasFilterExpression(); // In case there's no filter
+
+ if (!result) {
+ try {
+ IEvaluationContext context = new EvaluationContext(null, editPart);
+ View view = NotationHelper.findView(editPart);
+ if (view != null) {
+ EObject element = view.getElement();
+ if (element != null) {
+ context.addVariable("editPart", editPart); //$NON-NLS-1$
+ context.addVariable("view", view); //$NON-NLS-1$
+ context.addVariable("element", element); //$NON-NLS-1$
+ result = EvaluationResult.TRUE.equals(filterExpression.evaluate(context));
+ }
+ }
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ }
+ }
+
+ return result;
+ }
+
+ protected boolean hasFilterExpression() {
+ return filterExpression != null;
+ }
+
+ protected final IConfigurationElement getConfigurationElement() {
+ return config;
+ }
+
+ /**
+ * Obtains the extension instance, creating it if necessary.
+ *
+ * @return the extension instance
+ */
+ public T getExtension() {
+ T result = extension;
+
+ if ((result == null) && (extensionFailure == null)) {
+ synchronized (this) {
+ try {
+ Object instance = config.createExecutableExtension(CLASS);
+ if (!extensionType.isInstance(instance)) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Extension is not an instance of " + extensionType.getClass().getName())); //$NON-NLS-1$
+ }
+ if (extension == null) {
+ extension = extensionType.cast(instance);
+ }
+ } catch (CoreException e) {
+ extensionFailure = e.getStatus();
+ Activator.log.error("Failed to instantiate extension.", e); //$NON-NLS-1$
+ }
+
+ result = extension;
+ }
+ }
+
+ return result;
+ }
+
+ static int parseInt(IConfigurationElement config, String attribute) {
+ int result = 0;
+
+ String attrValue = config.getAttribute(attribute);
+ if (!Strings.isNullOrEmpty(attrValue)) {
+ try {
+ result = Integer.parseInt(attrValue);
+ } catch (Exception e) {
+ Activator.log.warn(String.format("Not an integer value in '%s' attribute of '%s' element from plug-in '%s': %s", //$NON-NLS-1$
+ attribute, config.getName(), config.getContributor().getName(), attrValue));
+ }
+ }
+
+ return result;
+ }
+
+ static Expression parseExpression(IConfigurationElement config, String elementName) throws CoreException {
+ Expression result = null;
+
+ IConfigurationElement[] enablement = config.getChildren(elementName);
+ if (enablement.length > 0) {
+ result = ExpressionConverter.getDefault().perform(enablement[0]);
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/SemanticChildrenStrategyRegistration.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/SemanticChildrenStrategyRegistration.java
new file mode 100644
index 00000000000..67e9af2b8b0
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/SemanticChildrenStrategyRegistration.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+
+/**
+ * Registration of an {@link ISemanticChildrenStrategy} on the extension point.
+ */
+class SemanticChildrenStrategyRegistration extends EditPartBasedRegistration<ISemanticChildrenStrategy, SemanticChildrenStrategyRegistration> {
+
+ public SemanticChildrenStrategyRegistration(IConfigurationElement config) throws CoreException {
+ super(config, ISemanticChildrenStrategy.class);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/SemanticChildrenStrategyRegistry.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/SemanticChildrenStrategyRegistry.java
new file mode 100644
index 00000000000..d694c066b5b
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/SemanticChildrenStrategyRegistry.java
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.gef.EditPart;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.internal.Activator;
+
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Ordering;
+
+/**
+ * This the registry of to get the class that can give info about childreen of an editpart. this is a singleton.
+ */
+public class SemanticChildrenStrategyRegistry {
+
+ private final List<SemanticChildrenStrategyRegistration> strategies;
+ private final Multimap<Class<?>, SemanticChildrenStrategyRegistration> strategiesByEditPart = ArrayListMultimap.create();
+ private final List<DefaultSemanticChildrenStrategyRegistration> defaultStrategies;
+ private final List<VisualChildrenStrategyRegistration> visualChildrenStrategies;
+ private final Multimap<Class<?>, VisualChildrenStrategyRegistration> visualChildrenStrategiesByEditPart = ArrayListMultimap.create();
+ private final List<CreationTargetStrategyRegistration> creationTargetStrategies;
+
+ private static SemanticChildrenStrategyRegistry INSTANCE = new SemanticChildrenStrategyRegistry();
+
+ public static SemanticChildrenStrategyRegistry getInstance() {
+ return INSTANCE;
+ }
+
+ private SemanticChildrenStrategyRegistry() {
+ super();
+
+ List<SemanticChildrenStrategyRegistration> strategies = Lists.newArrayList();
+ List<DefaultSemanticChildrenStrategyRegistration> defaultStrategies = Lists.newArrayListWithExpectedSize(1);
+ List<CreationTargetStrategyRegistration> creationTargetStrategies = Lists.newArrayList();
+ List<VisualChildrenStrategyRegistration> visualChildrenStrategies = Lists.newArrayList();
+
+ // Reading data from plugins
+ IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(Activator.PLUGIN_ID + ".strategies"); //$NON-NLS-1$
+ for (int i = 0; i < configElements.length; i++) {
+ IConfigurationElement config = configElements[i];
+
+ try {
+ switch (config.getName()) {
+ case "semanticChildrenStrategy": //$NON-NLS-1$
+ strategies.add(new SemanticChildrenStrategyRegistration(config));
+ break;
+ case "defaultSemanticChildrenStrategy": //$NON-NLS-1$
+ defaultStrategies.add(new DefaultSemanticChildrenStrategyRegistration(config));
+ break;
+ case "creationTargetStrategy": //$NON-NLS-1$
+ creationTargetStrategies.add(new CreationTargetStrategyRegistration(config));
+ break;
+ case "visualChildrenStrategy": //$NON-NLS-1$
+ visualChildrenStrategies.add(new VisualChildrenStrategyRegistration(config));
+ break;
+ default:
+ Activator.log.warn(String.format("Unrecognized configuration element <%s> from plug-in %s", config.getName(), config.getContributor().getName())); //$NON-NLS-1$
+ break;
+ }
+ } catch (Exception e) {
+ Activator.log.error("Error loading extension from plug-in " + config.getContributor().getName(), e); //$NON-NLS-1$
+ }
+ }
+
+ // Sort from highest to lowest priority
+ this.strategies = Ordering.natural().reverse().immutableSortedCopy(strategies);
+ this.defaultStrategies = Ordering.natural().reverse().immutableSortedCopy(defaultStrategies);
+ this.creationTargetStrategies = Ordering.natural().reverse().immutableSortedCopy(creationTargetStrategies);
+ this.visualChildrenStrategies = Ordering.natural().reverse().immutableSortedCopy(visualChildrenStrategies);
+ }
+
+ /**
+ * Queries the best semantic children strategy matching an {@code editPart}.
+ *
+ * @param editPart
+ * an edit part in a diagram
+ *
+ * @return the {@link ISemanticChildrenStrategy} or {@code null} if no applicable strategy is registered
+ */
+ public ISemanticChildrenStrategy getSemanticChildrenStrategy(EditPart editPart) {
+ ISemanticChildrenStrategy result = getStrategy(editPart, strategiesByEditPart, strategies);
+
+ if (result == null) {
+ // Look for a default.
+ for (DefaultSemanticChildrenStrategyRegistration next : defaultStrategies) {
+ if (next.isApplicableTo(editPart) && (next.getExtension() != null)) {
+ result = next.getExtension();
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private static <T, R extends EditPartBasedRegistration<T, R>> T getStrategy(EditPart editPart, Multimap<Class<?>, R> byEditPart, List<R> registrations) {
+ Class<?> key = editPart.getClass();
+ R reg = null;
+
+ if (!byEditPart.containsKey(key)) {
+ for (R next : registrations) {
+ if (next.matchesEditPartType(key)) {
+ // Add all of these
+ byEditPart.put(key, next);
+
+ // But only take the first matching
+ if ((reg == null) && next.isApplicableTo(editPart) && (next.getExtension() != null)) {
+ reg = next;
+ }
+ }
+ }
+ } else {
+ for (R next : byEditPart.get(key)) {
+ if (next.isApplicableTo(editPart) && (next.getExtension() != null)) {
+ reg = next;
+ break;
+ }
+ }
+ }
+
+ return (reg == null) ? null : reg.getExtension();
+ }
+
+ private static <T, R extends Registration<T, R>> T getStrategy(EditPart editPart, List<R> registrations) {
+ R reg = null;
+
+ for (R next : registrations) {
+ if (next.isApplicableTo(editPart)) {
+ reg = next;
+ break;
+ }
+ }
+
+ return (reg == null) ? null : reg.getExtension();
+ }
+
+ /**
+ * Queries the best creation target strategy matching an {@code editPart}.
+ *
+ * @param editPart
+ * an edit part in a diagram
+ *
+ * @return the {@link ICreationTargetStrategy} or {@code null} if no applicable strategy is registered
+ */
+ public ICreationTargetStrategy getCreationTargetStrategy(EditPart editPart) {
+ return getStrategy(editPart, creationTargetStrategies);
+ }
+
+ /**
+ * Queries the best visual children strategy matching an {@code editPart}.
+ *
+ * @param editPart
+ * an edit part in a diagram
+ *
+ * @return the {@link IVisualChildrenStrategy} or {@code null} if no applicable strategy is registered
+ */
+ public IVisualChildrenStrategy getVisualChildrenStrategy(EditPart editPart) {
+ return getStrategy(editPart, visualChildrenStrategiesByEditPart, visualChildrenStrategies);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/VisualChildrenStrategyRegistration.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/VisualChildrenStrategyRegistration.java
new file mode 100644
index 00000000000..bd162a6e989
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/src/org/eclipse/papyrus/infra/gmfdiag/canonical/strategy/VisualChildrenStrategyRegistration.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.canonical.strategy;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+
+/**
+ * Registration of an {@link IVisualChildrenStrategy} on the extension point.
+ */
+class VisualChildrenStrategyRegistration extends EditPartBasedRegistration<IVisualChildrenStrategy, VisualChildrenStrategyRegistration> {
+
+ public VisualChildrenStrategyRegistration(IConfigurationElement config) throws CoreException {
+ super(config, IVisualChildrenStrategy.class);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/CommandTreeIterator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/CommandTreeIterator.java
new file mode 100644
index 00000000000..3e2637de3bd
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/util/CommandTreeIterator.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.commands.util;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.commands.wrappers.GMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.commands.wrappers.OperationToGEFCommandWrapper;
+
+/**
+ * An iterator over the tree structure of EMF, GEF, and GMF commands that returns leaf commands of one or all of these kinds,
+ * with accounting for the various kinds of wrappers employed to intermix them. This iterator does not support the
+ * optional {@link Iterator#remove()} operation.
+ */
+public class CommandTreeIterator<C> implements Iterator<C> {
+ private final Class<C> type;
+
+ private Iterator<?> current;
+ private List<Iterator<?>> iterators = new ArrayList<Iterator<?>>();
+
+ private C preparedNext;
+ private boolean done;
+
+ private CommandTreeIterator(Object root, Class<C> type) {
+ super();
+
+ this.type = type;
+
+ root = unwrap(root);
+
+ if (isCompound(root)) {
+ pushIterator(root);
+ } else {
+ done = !prepareNext(root);
+ }
+ }
+
+ public static CommandTreeIterator<Command> iterateEMF(Object command) {
+ return iterate(command, Command.class);
+ }
+
+ public static CommandTreeIterator<org.eclipse.gef.commands.Command> iterateGEF(Object command) {
+ return iterate(command, org.eclipse.gef.commands.Command.class);
+ }
+
+ public static CommandTreeIterator<ICommand> iterateGMF(Object command) {
+ return iterate(command, ICommand.class);
+ }
+
+ public static CommandTreeIterator<?> iterate(Object command) {
+ return iterate(command, Object.class);
+ }
+
+ public static <C> CommandTreeIterator<C> iterate(Object command, Class<C> leafCommandType) {
+ return new CommandTreeIterator<C>(command, leafCommandType);
+ }
+
+ private boolean prepareNext(Object command) {
+ if (type.isInstance(command)) {
+ preparedNext = type.cast(command);
+ }
+
+ return preparedNext != null;
+ }
+
+ private Iterator<?> pushIterator(Object compoundCommand) {
+ if (current != null) {
+ iterators.add(current);
+ }
+ current = iterator(compoundCommand);
+ return current;
+ }
+
+ private Iterator<?> popIterator() {
+ if (iterators.isEmpty()) {
+ current = null;
+ done = true;
+ } else {
+ current = iterators.remove(iterators.size() - 1);
+ }
+
+ return current;
+ }
+
+ private Object internalNext() {
+ Object result = null;
+
+ while ((result == null) && (current != null)) {
+ if (current.hasNext()) {
+ Object next = unwrap(current.next());
+ if (isCompound(next)) {
+ // Dive into it
+ pushIterator(next);
+ } else {
+ // We have the next leaf
+ result = next;
+ }
+ } else {
+ popIterator();
+ }
+ }
+
+ return result;
+ }
+
+ public boolean hasNext() {
+ while (!done && (preparedNext == null)) {
+ Object next = internalNext();
+ if (type.isInstance(next)) {
+ preparedNext = type.cast(next);
+ }
+ }
+
+ return preparedNext != null;
+ }
+
+ public C next() {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+
+ C result = preparedNext;
+ preparedNext = null;
+ return result;
+ }
+
+ /**
+ * Remove is not supported.
+ */
+ public void remove() {
+ throw new UnsupportedOperationException("remove"); //$NON-NLS-1$
+ }
+
+ private Object unwrap(Object command) {
+ Object result = command;
+
+ if (command instanceof ICommandProxy) {
+ result = ((ICommandProxy) command).getICommand();
+ } else if (command instanceof CommandProxy) {
+ result = ((CommandProxy) command).getCommand();
+ } else if (result instanceof EMFtoGEFCommandWrapper) {
+ result = ((EMFtoGEFCommandWrapper) result).getEMFCommand();
+ } else if (result instanceof EMFtoGMFCommandWrapper) {
+ result = ((EMFtoGMFCommandWrapper) command).getEMFCommand();
+ } else if (result instanceof GEFtoEMFCommandWrapper) {
+ result = ((GEFtoEMFCommandWrapper) command).getGEFCommand();
+ } else if (result instanceof GMFtoEMFCommandWrapper) {
+ result = ((GMFtoEMFCommandWrapper) command).getGMFCommand();
+ } else if (result instanceof GMFtoGEFCommandWrapper) {
+ result = ((GMFtoGEFCommandWrapper) command).getGMFCommand();
+ } else if (result instanceof OperationToGEFCommandWrapper) {
+ result = ((OperationToGEFCommandWrapper) command).getOperation();
+ }
+
+ if (result != command) {
+ // Could be turtles all the way down
+ result = unwrap(result);
+ }
+
+ return result;
+ }
+
+ private boolean isCompound(Object command) {
+ return ((command instanceof CompoundCommand) || (command instanceof org.eclipse.gef.commands.CompoundCommand) || (command instanceof ICompositeCommand));
+ }
+
+ private Iterator<?> iterator(Object compoundCommand) {
+ if (compoundCommand instanceof CompoundCommand) {
+ return ((CompoundCommand) compoundCommand).getCommandList().iterator();
+ } else if (compoundCommand instanceof org.eclipse.gef.commands.CompoundCommand) {
+ return ((org.eclipse.gef.commands.CompoundCommand) compoundCommand).getCommands().iterator();
+ } else if (compoundCommand instanceof ICompositeCommand) {
+ return ((ICompositeCommand) compoundCommand).iterator();
+ } else {
+ return Collections.emptyList().iterator();
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GEFCommandWrapper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GEFCommandWrapper.java
new file mode 100644
index 00000000000..43bc2f3f0cc
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/wrappers/GEFCommandWrapper.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.commands.wrappers;
+
+import org.eclipse.gef.commands.Command;
+
+/**
+ * A general-purpose wrapper for GEF {@link Command}s.
+ */
+public class GEFCommandWrapper extends Command {
+ private Command wrapped;
+
+ /**
+ * Initializes me with my wrapped command.
+ *
+ * @param wrapped
+ * the command to wrap. I will {@linkplain Command#dispose() dispose} it when I am {@linkplain #dispose() disposed}
+ */
+ public GEFCommandWrapper(Command wrapped) {
+ super(wrapped.getLabel());
+ this.wrapped = wrapped;
+ }
+
+ /**
+ * Initializes me without a wrapped command, which {@linkplain #createCommand() creation} is deferred until later.
+ *
+ * @param label
+ * a label to present in the edit menu
+ */
+ public GEFCommandWrapper(String label) {
+ super(label);
+ }
+
+ /**
+ * Initializes me without a wrapped command, which {@linkplain #createCommand() creation} is deferred until later.
+ */
+ public GEFCommandWrapper() {
+ super();
+ }
+
+ @Override
+ public void dispose() {
+ if (wrapped != null) {
+ wrapped.dispose();
+ }
+ }
+
+ /**
+ * Obtains the wrapped command. If necessary, it will be {@linkplain #createCommand() created} on the fly.
+ *
+ * @return the wrapped command (not {@code null})
+ */
+ protected Command getCommand() {
+ if (wrapped == null) {
+ wrapped = createCommand();
+ }
+
+ return wrapped;
+ }
+
+ /**
+ * Must be overridden by subclasses that do not provide the wrapped command in the constructor, to create or
+ * otherwise obtain the wrapped command.
+ *
+ * @return the wrapped command (not {@code null})
+ */
+ protected Command createCommand() {
+ throw new UnsupportedOperationException("createCommand"); //$NON-NLS-1$
+ }
+
+ @Override
+ public boolean canExecute() {
+ return getCommand().canExecute();
+ }
+
+ @Override
+ public boolean canUndo() {
+ return getCommand().canUndo();
+ }
+
+ @Override
+ public boolean canRedo() {
+ return getCommand().canRedo();
+ }
+
+ @Override
+ public void execute() {
+ getCommand().execute();
+ }
+
+ @Override
+ public void undo() {
+ getCommand().undo();
+ }
+
+ @Override
+ public void redo() {
+ getCommand().redo();
+ }
+
+ @Override
+ public String toString() {
+ return String.format("Wrapped %s", wrapped);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
index 7594aa3a2ae..b5dddc1ef67 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
@@ -186,6 +186,13 @@
properties="isTextZone"
type="org.eclipse.swt.widgets.Shell">
</propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.infra.gmfdiag.common.utils.EditPartPropertyTester"
+ id="org.eclipse.papyrus.infra.gmfdiag.common.editPartProperties"
+ namespace="org.eclipse.papyrus.infra.gmfdiag"
+ properties="hasEditPolicy"
+ type="org.eclipse.gef.EditPart">
+ </propertyTester>
</extension>
<extension
point="org.eclipse.ui.menus">
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CommonDeferredCreateConnectionViewCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CommonDeferredCreateConnectionViewCommand.java
index 213a83e292d..dc38627a7a0 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CommonDeferredCreateConnectionViewCommand.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CommonDeferredCreateConnectionViewCommand.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
+ * Copyright (c) 2008, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -10,6 +10,7 @@
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr
+ * Christian W. Damus - bug 433206
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.commands;
@@ -180,7 +181,7 @@ public class CommonDeferredCreateConnectionViewCommand extends DeferredCreateCon
((View) (createRequest.getConnectionViewDescriptor().getAdapter(View.class))).setElement(element);
}
viewer = null;// for garbage collection
- return CommandResult.newOKCommandResult();
+ return CommandResult.newOKCommandResult(viewDescriptor);
}
public void setElement(EObject element) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/SetCanonicalCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/SetCanonicalCommand.java
new file mode 100644
index 00000000000..ff66058f890
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/SetCanonicalCommand.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.commands;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.CanonicalStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IPapyrusCanonicalEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * A command that sets the canonical synchronization state of an {@link EditPart}.
+ */
+public class SetCanonicalCommand extends AbstractTransactionalCommand {
+ private View view;
+ private boolean canonical;
+
+ public SetCanonicalCommand(TransactionalEditingDomain domain, View view, boolean canonical) {
+ super(domain, "Set Canonical", getWorkspaceFiles(view));
+
+ this.view = view;
+ this.canonical = canonical;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ CommandResult result = null;
+
+ Iterable<EditPart> editParts = DiagramEditPartsUtil.findEditParts(view);
+ if (Iterables.isEmpty(editParts)) {
+ result = CommandResult.newErrorCommandResult("Notation view has no EditParts");
+ } else {
+ setCanonical(view, canonical);
+ refreshCanonical(editParts);
+ result = CommandResult.newOKCommandResult(canonical);
+ }
+
+ return result;
+ }
+
+ protected void setCanonical(View view, boolean canonical) {
+ CanonicalStyle style = (CanonicalStyle) view.getStyle(NotationPackage.Literals.CANONICAL_STYLE);
+ if (style == null) {
+ style = (CanonicalStyle) view.createStyle(NotationPackage.Literals.CANONICAL_STYLE);
+ }
+ style.setCanonical(canonical);
+ if (style.eContainer() == null) {
+ // It's a CSS-inferred style. Persist it
+ @SuppressWarnings("unchecked")
+ List<Style> styles = view.getStyles();
+ styles.add(style);
+ }
+ }
+
+ protected void refreshCanonical(Iterable<? extends EditPart> editParts) {
+ for (Iterator<? extends EditPart> all = DiagramEditPartsUtil.getAllContents(editParts); all.hasNext();) {
+ // Make sure that we record the creation of new views now for potential undo/redo
+ EditPolicy editPolicy = all.next().getEditPolicy(EditPolicyRoles.CANONICAL_ROLE);
+ if (editPolicy instanceof IPapyrusCanonicalEditPolicy) {
+ // Now it should be able to activate or deactivate
+ ((IPapyrusCanonicalEditPolicy) editPolicy).refreshActive();
+ }
+ }
+ }
+
+ @Override
+ protected IStatus doUndo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IStatus result = super.doUndo(monitor, info);
+
+ refreshCanonical(DiagramEditPartsUtil.findEditParts(view));
+
+ return result;
+ }
+
+ @Override
+ protected IStatus doRedo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IStatus result = super.doRedo(monitor, info);
+
+ refreshCanonical(DiagramEditPartsUtil.findEditParts(view));
+
+ return result;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/requests/CanonicalDropObjectsRequest.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/requests/CanonicalDropObjectsRequest.java
new file mode 100644
index 00000000000..577576cbd57
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/requests/CanonicalDropObjectsRequest.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.commands.requests;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+
+/**
+ * A request to drop objects into an {@link EditPart} as canonical children,
+ * which is a "canonical drop".
+ */
+public class CanonicalDropObjectsRequest extends Request {
+ /** The request type for the "canonical drop" command. */
+ public static final String REQ_CANONICAL_DROP_OBJECTS = "org.eclipse.papyrus.CANONICAL_DROP_OBJECTS";
+
+ private final DropObjectsRequest dropRequest;
+
+ /**
+ * Initializes me with a {@code dropRequest} that I encapsulate as a "canonical drop".
+ *
+ * @param dropRequest
+ * the drop request to encapsulate
+ */
+ public CanonicalDropObjectsRequest(DropObjectsRequest dropRequest) {
+ super(REQ_CANONICAL_DROP_OBJECTS);
+
+ this.dropRequest = dropRequest;
+ }
+
+ /**
+ * Obtains the request that provides details of the "canonical drop".
+ * Edit policies may choose to forward this to other edit policies if they need to.
+ *
+ * @return the drop request
+ */
+ public final DropObjectsRequest getDropObjectsRequest() {
+ return dropRequest;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusDiagramEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusDiagramEditPart.java
index 3e40deb3f32..653dab6f261 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusDiagramEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusDiagramEditPart.java
@@ -11,10 +11,16 @@
* Christian W. Damus (CEA) - support pluggable edit-part conflict detection (CDO)
* C�line Janssens (ALL4TEC) - Override getDragTracker with the PapyrusRubberbandDragTracker
* Christian W. Damus - bug 451230
+ * Christian W. Damus - bug 461629
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.editpart;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+import java.util.WeakHashMap;
+
import org.eclipse.gef.DragTracker;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
@@ -23,12 +29,17 @@ import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gef.tools.DeselectAllTracker;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusPopupBarEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.XYLayoutWithConstrainedResizedEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.selection.PapyrusRubberbandDragTracker;
+import com.google.common.collect.Sets;
+
public class PapyrusDiagramEditPart extends DiagramEditPart {
+ // We store weak-referencing sets in the values
+ private static final Map<Diagram, Set<PapyrusDiagramEditPart>> diagrams = new WeakHashMap<Diagram, Set<PapyrusDiagramEditPart>>();
private IConflictingEditPartFilter conflictFilter = IConflictingEditPartFilter.DEFAULT;
@@ -39,6 +50,46 @@ public class PapyrusDiagramEditPart extends DiagramEditPart {
public PapyrusDiagramEditPart(View diagramView) {
super(diagramView);
+
+ register(diagramView, this);
+ }
+
+ private static void register(View diagramView, PapyrusDiagramEditPart editPart) {
+ if (diagramView instanceof Diagram) {
+ Diagram diagram = (Diagram) diagramView;
+
+ synchronized (diagrams) {
+ Set<PapyrusDiagramEditPart> diagramEditParts = diagrams.get(diagram);
+ if (diagramEditParts == null) {
+ // A weak-referencing set
+ diagramEditParts = Sets.newSetFromMap(new WeakHashMap<PapyrusDiagramEditPart, Boolean>());
+ diagrams.put(diagram, diagramEditParts);
+ }
+ diagramEditParts.add(editPart);
+ }
+ }
+ }
+
+ /**
+ * Obtains the edit-parts currently managing the specified {@code diagram} in editors.
+ *
+ * @param diagram
+ * a diagram (may be {@code null})
+ *
+ * @return the set of edit-parts for the diagram, or an empty set if none (such as when the {@code diagram} is {@code null})
+ */
+ public static Set<? extends DiagramEditPart> getDiagramEditPartsFor(Diagram diagram) {
+ Set<? extends PapyrusDiagramEditPart> result;
+
+ synchronized (diagrams) {
+ result = diagrams.get(diagram);
+ }
+
+ if (result == null) {
+ result = Collections.emptySet();
+ }
+
+ return result;
}
@Override
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/IPapyrusCanonicalEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/IPapyrusCanonicalEditPolicy.java
new file mode 100644
index 00000000000..7aef2a23687
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/IPapyrusCanonicalEditPolicy.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.editpolicies;
+
+import org.eclipse.gef.EditPolicy;
+
+/**
+ * A mix-in interface for Papyrus implementations of the canonical edit policy that support conditional activation.
+ */
+public interface IPapyrusCanonicalEditPolicy {
+
+ /**
+ * Queries whether I am currently active.
+ *
+ * @return whether I am active
+ *
+ * @see EditPolicy#activate()
+ */
+ boolean isActive();
+
+ /**
+ * Refreshes my activation state, checking perhaps whether I need to be activated or deactivated according to
+ * my activation condition.
+ *
+ * @see #isActive()
+ * @see EditPolicy#activate()
+ * @see EditPolicy#deactivate()
+ */
+ void refreshActive();
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramHelper.java
index 67d36dab551..aa04586a4be 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramHelper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramHelper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,15 +8,23 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ * Christian W. Damus - bug 461629
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.helper;
import java.util.Collections;
-import java.util.LinkedList;
import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.Executor;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
@@ -24,29 +32,75 @@ import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.EditorUtils;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.core.utils.TransactionHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IPapyrusCanonicalEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.infra.tools.util.UIUtil;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.MapMaker;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.ListenableFutureTask;
+
public class DiagramHelper {
+ private static final AtomicBoolean refreshPending = new AtomicBoolean();
+
+ private static final ConcurrentMap<DiagramEditPart, Boolean> pendingDiagramRefresh = new MapMaker().concurrencyLevel(4).weakKeys().makeMap();
+
+ private static final Executor uiExecutor = UIUtil.createUIExecutor(Display.getDefault());
+
+ // Don't need weak values because the executor doesn't retain a reference to the domain
+ private static final LoadingCache<TransactionalEditingDomain, Executor> domainExecutors = CacheBuilder.newBuilder().weakKeys().build(new CacheLoader<TransactionalEditingDomain, Executor>() {
+ @Override
+ public Executor load(TransactionalEditingDomain domain) {
+ // Edit-parts will be asked to refresh, and they would do this in read-only transaction, which subsequently
+ // requires canonical edit policies invoked recursively to run unprotected transactions, breaking undo/redo
+ return TransactionHelper.createTransactionExecutor(domain, uiExecutor, TransactionHelper.mergeReadOnlyOption(true));
+ }
+ });
public static void refresh(EditPart editPart, boolean recursive) {
editPart.refresh();
+
+ // CSS styles may have altered canonical synchronization properties
+ refreshCanonical(editPart);
+
if (recursive) {
- for (EditPart childEditPart : (List<EditPart>) editPart.getChildren()) {
+ @SuppressWarnings("unchecked")
+ List<? extends EditPart> children = editPart.getChildren();
+ for (EditPart childEditPart : children) {
refresh(childEditPart, true);
}
}
}
+ private static void refreshCanonical(EditPart editPart) {
+ EditPolicy editPolicy = editPart.getEditPolicy(EditPolicyRoles.CANONICAL_ROLE);
+ if (editPolicy instanceof IPapyrusCanonicalEditPolicy) {
+ ((IPapyrusCanonicalEditPolicy) editPolicy).refreshActive();
+ }
+ }
+
public static void refresh(DiagramEditPart diagramEditPart, boolean recursive) {
+ setNeedsRefresh(diagramEditPart, false);
diagramEditPart.refresh();
if (recursive) {
- List<EditPart> childrenToRefresh = new LinkedList<EditPart>(diagramEditPart.getChildren());
+ // Defensive copy
+ @SuppressWarnings("unchecked")
+ List<EditPart> childrenToRefresh = ImmutableList.copyOf((List<? extends EditPart>) diagramEditPart.getChildren());
for (EditPart childEditPart : childrenToRefresh) {
refresh(childEditPart, true);
}
- List<EditPart> connectionsToRefresh = new LinkedList<EditPart>(diagramEditPart.getConnections());
+ // Defensive copy
+ @SuppressWarnings("unchecked")
+ List<EditPart> connectionsToRefresh = ImmutableList.copyOf((List<? extends EditPart>) diagramEditPart.getConnections());
for (EditPart childEditPart : connectionsToRefresh) {
refresh(childEditPart, true);
}
@@ -87,29 +141,188 @@ public class DiagramHelper {
}
}
- private static boolean needsRefresh = false;
+ /**
+ * Posts an asynchronous refresh that will aggregate all subsequent refresh requests until the
+ * refresh is actually performed.
+ *
+ * @see #forceRefresh(DiagramEditPart)
+ * @see #scheduleRefresh()
+ *
+ * @since 1.1
+ */
+ public static void scheduleRefresh(final DiagramEditPart diagram) {
+ if (setNeedsRefresh(diagram, true)) {
+ asyncExec(diagram, new Runnable() {
+
+ @Override
+ public void run() {
+ if (setNeedsRefresh(diagram, false) && diagram.isActive() && (diagram.getViewer() != null)) {
+ refresh(diagram, true);
+ }
+ }
+ });
+ }
+ }
+
+ private static boolean setNeedsRefresh(DiagramEditPart diagram, boolean refresh) {
+ if (refresh) {
+ return pendingDiagramRefresh.putIfAbsent(diagram, Boolean.TRUE) == null;
+ } else {
+ return pendingDiagramRefresh.remove(diagram, Boolean.TRUE);
+ }
+ }
+
+ private static Executor getExecutor(DiagramEditPart diagram) {
+ TransactionalEditingDomain domain = diagram.getEditingDomain();
+ return (domain != null) ? domainExecutors.getUnchecked(domain) : uiExecutor;
+ }
/**
- * Refreshes all opened diagrams
+ * Forces a asynchronous refresh of a {@code diagram}. Generally, an {@linkplain #scheduleRefresh(DiagramEditPart) asynchronous refresh} is preferred.
+ *
+ * @see #scheduleRefresh(DiagramEditPart)
+ *
+ * @since 1.1
*/
+ public static void forceRefresh(DiagramEditPart diagram) {
+ setNeedsRefresh(diagram, true);
+ refresh(diagram, true);
+ }
+
+ /**
+ * Refreshes all opened diagrams, if we currently {@link #setNeedsRefresh() need to}.
+ *
+ * @deprecated Use the {@link #scheduleRefresh()} or {@link #forceRefresh()} API, instead
+ *
+ * @see #setNeedsRefresh()
+ * @see #scheduleRefresh()
+ */
+ @Deprecated
public static void refreshDiagrams() {
- synchronized (DiagramHelper.class) {
- if (!needsRefresh) {
+ if (refreshPending.compareAndSet(true, false)) {
+ IMultiDiagramEditor[] editors = EditorUtils.getMultiDiagramEditors();
+ if (editors == null || editors.length < 1) {
return;
}
- needsRefresh = false;
+ for (IMultiDiagramEditor activeMultiEditor : editors) {
+ refresh(activeMultiEditor);
+ }
}
+ }
+
+ /**
+ * Indicates that diagrams are in need of refresh, to be performed later (perhaps asynchronously).
+ * Has no effect if the needs-refresh state is already set.
+ *
+ * @return whether the refresh state of the diagrams was changed by this call. A {@code false} result
+ * indicates that refresh was already pending
+ *
+ * @deprecated Use the {@link #scheduleRefresh()} or {@link #forceRefresh()} API, instead
+ *
+ * @see #scheduleRefresh()
+ * @see #refreshDiagrams()
+ */
+ @Deprecated
+ public static boolean setNeedsRefresh() {
+ return refreshPending.compareAndSet(false, true);
+ }
+
+ /**
+ * Posts an asynchronous refresh that will aggregate all subsequent refresh requests until the
+ * refresh is actually performed.
+ *
+ * @see #setNeedsRefresh()
+ * @see #refreshDiagrams()
+ *
+ * @since 1.1
+ */
+ public static void scheduleRefresh() {
+ if (setNeedsRefresh()) {
+ Display.getDefault().asyncExec(new Runnable() {
- IMultiDiagramEditor[] editors = EditorUtils.getMultiDiagramEditors();
- if (editors == null || editors.length < 1) {
- return;
+ @Override
+ public void run() {
+ refreshDiagrams();
+ }
+ });
}
- for (IMultiDiagramEditor activeMultiEditor : editors) {
- refresh(activeMultiEditor);
+ }
+
+ /**
+ * Forces a asynchronous refresh of all open diagrams. Generally, an {@linkplain #scheduleRefresh() asynchronous refresh} is preferred.
+ *
+ * @see #scheduleRefresh()
+ *
+ * @since 1.1
+ */
+ public static void forceRefresh() {
+ setNeedsRefresh();
+ refreshDiagrams();
+ }
+
+ /**
+ * Schedules a {@code task} for asynchronous execution in the {@code context} of a particular diagram.
+ *
+ * @param context
+ * the diagram context. Must not be {@code null}
+ * @param task
+ * the task to execute asynchronously
+ */
+ public static void asyncExec(DiagramEditPart context, Runnable task) {
+ getExecutor(context).execute(task);
+ }
+
+ /**
+ * Schedules a {@code task} for asynchronous execution in the {@code context} of an edit-part in a diagram.
+ *
+ * @param context
+ * the edit-part context. Must not be {@code null}
+ * @param task
+ * the task to execute asynchronously
+ */
+ public static void asyncExec(EditPart context, Runnable task) {
+ DiagramEditPart diagram = DiagramEditPartsUtil.getDiagramEditPart(context);
+ if (diagram != null) {
+ asyncExec(diagram, task);
+ } else {
+ uiExecutor.execute(task);
}
}
- public synchronized static void setNeedsRefresh() {
- needsRefresh = true;
+ /**
+ * Schedules a {@code task} for asynchronous execution in the {@code context} of a particular diagram.
+ *
+ * @param context
+ * the diagram context. Must not be {@code null}
+ * @param task
+ * the task to execute asynchronously
+ */
+ public static <V> ListenableFuture<V> submit(DiagramEditPart context, Callable<V> task) {
+ ListenableFutureTask<V> result = ListenableFutureTask.create(task);
+ getExecutor(context).execute(result);
+ return result;
+ }
+
+ /**
+ * Schedules a {@code task} for asynchronous execution in the {@code context} of an edit-part in a diagram.
+ *
+ * @param context
+ * the edit-part context. Must not be {@code null}
+ * @param task
+ * the task to execute asynchronously
+ */
+ public static <V> ListenableFuture<V> submit(EditPart context, Callable<V> task) {
+ ListenableFuture<V> result;
+ DiagramEditPart diagram = DiagramEditPartsUtil.getDiagramEditPart(context);
+
+ if (diagram != null) {
+ result = submit(diagram, task);
+ } else {
+ ListenableFutureTask<V> runnable = ListenableFutureTask.create(task);
+ uiExecutor.execute(runnable);
+ result = runnable;
+ }
+
+ return result;
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java
index 8dcd08b33d0..eaa4756b8b7 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.utils;
@@ -22,6 +23,8 @@ import java.util.List;
import java.util.NoSuchElementException;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.AbstractTreeIterator;
+import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
@@ -44,12 +47,14 @@ import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer;
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.CanonicalStyle;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.infra.tools.util.EditorHelper;
import org.eclipse.ui.IEditorPart;
@@ -58,16 +63,18 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
/**
* Different utility methods to manage and manipulate edit parts in diagrams.
*/
public class DiagramEditPartsUtil {
- protected DiagramEditPartsUtil() { // FIXME : protected instate of private for non regression purposes
- // should be removed as soon as org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil
- // is removed
+ protected DiagramEditPartsUtil() { // FIXME : protected instate of private for non regression purposes
+ // should be removed as soon as org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil
+ // is removed
// to prevent instanciation
}
@@ -297,7 +304,7 @@ public class DiagramEditPartsUtil {
}
return 1.0;
}
-
+
/** The Constant BelongToDiagramSource. */
// @unused
public static final String BelongToDiagramSource = "es.cv.gvcase.mdt.uml2.diagram.common.Belongs_To_This_Diagram";
@@ -596,6 +603,32 @@ public class DiagramEditPartsUtil {
}
/**
+ * Finds all of the {@link EditPart}s in currently open editors that present a given notation {@code view}.
+ *
+ * @param view
+ * a view that may be presented by zero or more open diagram editors
+ * @return all edit parts in all diagrams that currently present the {@code view} (so could be empty)
+ */
+ public static Iterable<EditPart> findEditParts(View view) {
+ List<EditPart> result;
+
+ Diagram diagram = view.getDiagram();
+ if (diagram == null) {
+ result = Collections.emptyList();
+ } else {
+ result = Lists.newArrayListWithExpectedSize(1);
+ for (Iterator<EditPart> iter = getAllContents(PapyrusDiagramEditPart.getDiagramEditPartsFor(diagram)); iter.hasNext();) {
+ EditPart next = iter.next();
+ if (next.getModel() == view) {
+ result.add(next);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
* Finds the <EditPart>s for the <EObject>s in the selection.
*
* @param selection
@@ -801,5 +834,72 @@ public class DiagramEditPartsUtil {
}
return Collections.EMPTY_LIST;
}
-
+
+ public static TreeIterator<EditPart> getAllContents(EditPart editPart, boolean includeRoot) {
+ return internalGetAllContents(editPart, includeRoot);
+ }
+
+ public static TreeIterator<EditPart> getAllContents(Iterable<? extends EditPart> editParts) {
+ return internalGetAllContents(editParts, false);
+ }
+
+ private static final TreeIterator<EditPart> internalGetAllContents(final Object root, boolean includeRoot) {
+ return new AbstractTreeIterator<EditPart>(root, includeRoot) {
+ private static final long serialVersionUID = 1L;
+
+ // Let's do this instanceof check only once. And take a defensive copy, of course
+ @SuppressWarnings("unchecked")
+ private final Iterable<EditPart> rootCollection = root instanceof Iterable<?> ? (Iterable<EditPart>) root : null;
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected Iterator<? extends EditPart> getChildren(Object object) {
+ Iterator<? extends EditPart> result;
+
+ if (object == rootCollection) {
+ // Defensive copy
+ result = ImmutableList.copyOf(rootCollection).iterator();
+ } else {
+ // Defensive copy
+ ImmutableList.Builder<EditPart> copy = ImmutableList.builder();
+ EditPart editPart = (EditPart) object;
+ copy.addAll(editPart.getChildren());
+ if (editPart instanceof DiagramEditPart) {
+ // The view's edit-part registry is required to get connections
+ if (editPart.getViewer() != null) {
+ copy.addAll(((DiagramEditPart) editPart).getConnections());
+ }
+ }
+ result = copy.build().iterator();
+ }
+
+ return result;
+ }
+ };
+ }
+
+
+ /**
+ * Queries whether an {@code editPart} has canonical synchronization enabled.
+ *
+ * @param editPart
+ * an edit part
+ * @return whether it has canonical synchronization enabled
+ */
+ public static boolean isCanonical(EditPart editPart) {
+ boolean result = false;
+
+ if (editPart instanceof IGraphicalEditPart) {
+ View view = ((IGraphicalEditPart) editPart).getNotationView();
+ if (view != null) {
+ CanonicalStyle style = (CanonicalStyle) view.getStyle(NotationPackage.Literals.CANONICAL_STYLE);
+ if (style != null) {
+ result = style.isCanonical();
+ }
+ }
+ }
+
+ return result;
+ }
+
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/EditPartPropertyTester.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/EditPartPropertyTester.java
new file mode 100644
index 00000000000..ec462be563f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/EditPartPropertyTester.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.utils;
+
+import static org.eclipse.papyrus.infra.tools.util.TypeUtils.as;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.gef.EditPart;
+
+/**
+ * A tester for core-expressions {@link EditPart} properties.
+ */
+public class EditPartPropertyTester extends PropertyTester {
+ public static final String PROPERTY_HAS_EDIT_POLICY = "hasEditPolicy"; //$NON-NLS-1$
+
+ public EditPartPropertyTester() {
+ super();
+ }
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ boolean result = false;
+
+ if (PROPERTY_HAS_EDIT_POLICY.equals(property)) {
+ result = hasEditPolicy(as(receiver, EditPart.class), as(args, 0, String.class)) == defaultTrue(expectedValue);
+ }
+
+ return result;
+ }
+
+ private static boolean defaultTrue(Object value) {
+ return as(value, true);
+ }
+
+ static boolean hasEditPolicy(EditPart editPart, String role) {
+ return (editPart != null) && (role != null) && (editPart.getEditPolicy(role) != null);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/policy/CustomizableDropEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/policy/CustomizableDropEditPolicy.java
index a937f01ccd1..77d12badcf8 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/policy/CustomizableDropEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/policy/CustomizableDropEditPolicy.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.dnd.policy;
@@ -39,6 +40,7 @@ import org.eclipse.gmf.runtime.notation.Shape;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.commands.DefaultActionHandler;
import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.requests.CanonicalDropObjectsRequest;
import org.eclipse.papyrus.infra.gmfdiag.dnd.Activator;
import org.eclipse.papyrus.infra.gmfdiag.dnd.strategy.DefaultDropStrategy;
import org.eclipse.papyrus.infra.gmfdiag.dnd.strategy.DropStrategy;
@@ -97,8 +99,13 @@ public class CustomizableDropEditPolicy extends DragDropEditPolicy {
command = getCustomCommand(request);
}
} else if (this.understands(request)) {
- // Add request
- command = getCreationCommand(request);
+ if (CanonicalDropObjectsRequest.REQ_CANONICAL_DROP_OBJECTS.equals(request.getType())) {
+ // Forward canonical drop to the default drop policy
+ command = getCanonicalDropObjectsCommand(request);
+ } else {
+ // Add request
+ command = getCreationCommand(request);
+ }
} else if (defaultCreationEditPolicy != null) {
// Creation request
if (defaultCreationEditPolicy.understandsRequest(request)) {
@@ -129,7 +136,8 @@ public class CustomizableDropEditPolicy extends DragDropEditPolicy {
}
protected boolean understands(Request request) {
- return org.eclipse.gef.RequestConstants.REQ_ADD.equals(request.getType());
+ return org.eclipse.gef.RequestConstants.REQ_ADD.equals(request.getType())
+ || CanonicalDropObjectsRequest.REQ_CANONICAL_DROP_OBJECTS.equals(request.getType());
}
protected boolean isCustomRequest(Request request) {
@@ -140,6 +148,16 @@ public class CustomizableDropEditPolicy extends DragDropEditPolicy {
return getCustomCommand(request);
}
+ protected Command getCanonicalDropObjectsCommand(Request request) {
+ Command result = null;
+
+ if ((defaultDropEditPolicy != null) && (request instanceof CanonicalDropObjectsRequest)) {
+ result = defaultDropEditPolicy.getCommand(((CanonicalDropObjectsRequest) request).getDropObjectsRequest());
+ }
+
+ return result;
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml
index 242db91c3c6..bf9cec982ff 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml
@@ -374,6 +374,23 @@
</and>
</activeWhen>
</handler>
+ <handler
+ commandId="org.eclipse.papyrus.infra.gmfdiag.menu.toggleCanonical">
+ <activeWhen>
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.gef.EditPart">
+ <test
+ property="org.eclipse.papyrus.infra.gmfdiag.hasEditPolicy"
+ args="Canonical">
+ </test>
+ </adapt>
+ </iterate>
+ </activeWhen>
+ <class
+ class="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.ToggleCanonicalHandler">
+ </class>
+ </handler>
</extension>
<extension
point="org.eclipse.ui.commands">
@@ -411,6 +428,16 @@
id="org.eclipse.papyrus.uml.diagram.common.commands.DeleteFromDiagram"
name="Delete From Diagram Command">
</command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Automatically synchronize contents with the underlying model elements"
+ id="org.eclipse.papyrus.infra.gmfdiag.menu.toggleCanonical"
+ name="Synchronized with Model">
+ <state
+ class="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.CanonicalState"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command>
</extension>
<extension
point="org.eclipse.ui.bindings">
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/AbstractGraphicalCommandHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/AbstractGraphicalCommandHandler.java
index e302579468d..4bb2e32b307 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/AbstractGraphicalCommandHandler.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/AbstractGraphicalCommandHandler.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -12,6 +12,7 @@
* Christian W. Damus (CEA) - bug 430701
* Christian W. Damus (CEA) - bug 433320
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Bug 454891
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.menu.handlers;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/CanonicalState.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/CanonicalState.java
new file mode 100644
index 00000000000..0efd3fa6e0a
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/CanonicalState.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.menu.handlers;
+
+import java.lang.ref.Reference;
+import java.lang.ref.WeakReference;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.jface.commands.ToggleState;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The canonical state of a command's selection.
+ */
+public class CanonicalState extends ToggleState implements ISelectionListener {
+
+ private ISelectionService selectionService = null;
+
+ private Reference<IGraphicalEditPart> selectedEditPart;
+
+ public CanonicalState() {
+ super();
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window != null) {
+ selectionService = window.getSelectionService();
+ if (selectionService != null) {
+ selectionService.addSelectionListener(this);
+ update(selectionService.getSelection());
+ }
+ }
+ }
+
+ @Override
+ public void dispose() {
+ if (selectionService != null) {
+ selectionService.removeSelectionListener(this);
+ }
+
+ super.dispose();
+ }
+
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+ update(selection);
+ }
+
+ private void update(ISelection selection) {
+ // Default state is not canonical
+ boolean state = false;
+
+ selectedEditPart = null;
+
+ if (selection instanceof IStructuredSelection) {
+ IGraphicalEditPart editPart = AdapterUtils.adapt(((IStructuredSelection) selection).getFirstElement(), IGraphicalEditPart.class, null);
+ if (editPart != null) {
+ selectedEditPart = new WeakReference<IGraphicalEditPart>(editPart);
+ state = DiagramEditPartsUtil.isCanonical(editPart);
+ }
+ }
+
+ // Fires notification if changed from previous state
+ setValue(state);
+ }
+
+ // I am a computed value, actually
+ @Override
+ public Object getValue() {
+ IGraphicalEditPart editPart = (selectedEditPart == null) ? null : selectedEditPart.get();
+ return (editPart != null) ? DiagramEditPartsUtil.isCanonical(editPart) : super.getValue();
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/ToggleCanonicalHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/ToggleCanonicalHandler.java
new file mode 100644
index 00000000000..281b76beea8
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/ToggleCanonicalHandler.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.menu.handlers;
+
+import static org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil.isCanonical;
+
+import java.util.Collection;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SetCanonicalCommand;
+
+/**
+ * Handler for the toggle-canonical command.
+ */
+public class ToggleCanonicalHandler extends AbstractGraphicalCommandHandler {
+
+ public ToggleCanonicalHandler() {
+ super();
+ }
+
+ @Override
+ protected Command getCommand() {
+ Command result;
+ final Collection<? extends IGraphicalEditPart> selection = getSelectedElements();
+
+ if (selection.isEmpty()) {
+ result = UnexecutableCommand.INSTANCE;
+ } else {
+ ICommand command = new CompositeTransactionalCommand(getEditingDomain(), "Toggle Synchronize with Model");
+
+ for (final IGraphicalEditPart editPart : getSelectedElements()) {
+ if (editPart.getNotationView() != null) {
+ command = command.compose(new SetCanonicalCommand(getEditingDomain(), editPart.getNotationView(), !isCanonical(editPart)));
+ }
+ }
+
+ result = new ICommandProxy(command.reduce());
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
index 40ff432ce8e..2ffe2cdaf3e 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
@@ -22,7 +22,10 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0"
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.1.0"
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.1.0.qualifier
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi
index 2f94e101562..430f9bfeabf 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi
@@ -33,6 +33,9 @@
<modelElementFactories
name="Rulers And Grid Element Factory"
factoryClass="org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.RulersAndGridModelElementFactory"/>
+ <modelElementFactories
+ name="GMF Synchronization Factory"
+ factoryClass="org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.SynchronizationModelElementFactory"/>
<widgetTypes
label="DiagramPreferencesDefaultButton"
widgetClass="DiagramPreferencesDefaultButton"
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/synchronization.ctx b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/synchronization.ctx
new file mode 100644
index 00000000000..0b9b1edd0d5
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/synchronization.ctx
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" xmi:id="_SsfbQMElEeS_u7hIvAIReA" name="synchronization">
+ <tabs xmi:id="_SsfbQcElEeS_u7hIvAIReA" label="Appearance" id="appearance" category="org.eclipse.papyrus" priority="75">
+ <sections xmi:id="_SsgCV8ElEeS_u7hIvAIReA" name="Single CanonicalStyle" sectionFile="ui/SingleCanonicalStyle.xwt">
+ <widget href="ui/SingleCanonicalStyle.xwt#/"/>
+ </sections>
+ <sections xmi:id="_SsgpdsElEeS_u7hIvAIReA" name="Multiple CanonicalStyle" sectionFile="ui/MultipleCanonicalStyle.xwt">
+ <widget href="ui/MultipleCanonicalStyle.xwt#/"/>
+ </sections>
+ </tabs>
+ <views xmi:id="_Ssiem8ElEeS_u7hIvAIReA" name="Single CanonicalStyle" sections="_SsgCV8ElEeS_u7hIvAIReA" automaticContext="true" datacontexts="_SsmJGsElEeS_u7hIvAIReA">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_SsienMElEeS_u7hIvAIReA" name="isSingleCanonicalStyle">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_SsiencElEeS_u7hIvAIReA" name="editPolicy" value="Canonical"/>
+ </constraints>
+ </views>
+ <views xmi:id="_SskT2MElEeS_u7hIvAIReA" elementMultiplicity="-1" name="Multiple CanonicalStyle" sections="_SsgpdsElEeS_u7hIvAIReA" automaticContext="true" datacontexts="_SsmJGsElEeS_u7hIvAIReA">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_SskT2cElEeS_u7hIvAIReA" name="isMultipleCanonicalStyle">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_SskT2sElEeS_u7hIvAIReA" name="editPolicy" value="Canonical"/>
+ </constraints>
+ </views>
+ <dataContexts xmi:id="_SsmI-cElEeS_u7hIvAIReA" name="synchronization" label="synchronization">
+ <elements xmi:id="_SsmI-sElEeS_u7hIvAIReA" name="ImpliedStyle"/>
+ <elements xmi:id="_SsmJGsElEeS_u7hIvAIReA" name="CanonicalStyle" supertypes="_SsmI-sElEeS_u7hIvAIReA">
+ <properties xmi:id="_SsmJG8ElEeS_u7hIvAIReA" name="syncWithModel" label="Synchronize with model" type="Boolean" description="Whether the diagram view's contents are automatically synchronized with the model."/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@modelElementFactories.5"/>
+ </dataContexts>
+</contexts:Context>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/MultipleCanonicalStyle.xwt b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/MultipleCanonicalStyle.xwt
new file mode 100644
index 00000000000..b4c43a97557
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/MultipleCanonicalStyle.xwt
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Group text="Synchronization">
+ <Group.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Group.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="synchronization:CanonicalStyle:syncWithModel" customLabel="Sync with model"></ppe:BooleanRadio>
+ </Group>
+</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/SingleCanonicalStyle.xwt b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/SingleCanonicalStyle.xwt
new file mode 100644
index 00000000000..65ddb8dab33
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/synchronization/ui/SingleCanonicalStyle.xwt
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Group text="Synchronization">
+ <Group.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Group.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="synchronization:CanonicalStyle:syncWithModel" customLabel="Sync with model"></ppe:BooleanRadio>
+ </Group>
+</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/plugin.xml
index 821bcac39e2..7fae26889a7 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/plugin.xml
@@ -10,6 +10,9 @@
<context
contextModel="model/notation/notation.ctx">
</context>
+ <context
+ contextModel="model/synchronization/synchronization.ctx">
+ </context>
</extension>
<extension
point="org.eclipse.papyrus.views.properties.environment">
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/constraint/HasEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/constraint/HasEditPolicy.java
index 439b5c37baa..e8368db3517 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/constraint/HasEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/constraint/HasEditPolicy.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
+ * Copyright (c) 2011, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.properties.constraint;
@@ -16,6 +17,8 @@ import org.eclipse.papyrus.infra.constraints.SimpleConstraint;
import org.eclipse.papyrus.infra.constraints.constraints.AbstractConstraint;
import org.eclipse.papyrus.infra.constraints.constraints.Constraint;
+import com.google.common.base.Objects;
+
/**
*
* A constraint to test whether an object has the given EditPolicy or not
@@ -59,7 +62,7 @@ public class HasEditPolicy extends AbstractConstraint {
return false;
}
- return constraint instanceof HasEditPolicy && ((HasEditPolicy) constraint).editPolicyID == editPolicyID;
+ return constraint instanceof HasEditPolicy && Objects.equal(((HasEditPolicy) constraint).editPolicyID, editPolicyID);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/CanonicalObservableValue.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/CanonicalObservableValue.java
new file mode 100644
index 00000000000..74c45972252
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/databinding/CanonicalObservableValue.java
@@ -0,0 +1,125 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.properties.databinding;
+
+import org.eclipse.core.databinding.observable.Diffs;
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.databinding.observable.IObserving;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.CanonicalStyle;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.editpolicy.CanonicalStateListener;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SetCanonicalCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.SynchronizationModelElement;
+import org.eclipse.papyrus.infra.tools.databinding.AggregatedObservable;
+import org.eclipse.papyrus.infra.tools.databinding.ReferenceCountedObservable;
+import org.eclipse.papyrus.uml.tools.databinding.AggregatedPapyrusObservableValue;
+import org.eclipse.papyrus.uml.tools.databinding.CommandBasedObservableValue;
+
+/**
+ * The observable boolean "canonical synchronization" state of an {@link EditPart}, as represented by
+ * a {@link SynchronizationModelElement}.
+ */
+public class CanonicalObservableValue extends ReferenceCountedObservable.Value implements CommandBasedObservableValue, AggregatedObservable, IObserving {
+ private TransactionalEditingDomain domain;
+ private EditPart editPart;
+ private boolean lastComputed;
+
+ private CanonicalStateListener canonicalStateListener;
+ private CanonicalStateListener.Handler refreshHandler;
+
+ public CanonicalObservableValue(TransactionalEditingDomain domain, EditPart editPart) {
+ super();
+
+ this.domain = domain;
+ this.editPart = editPart;
+
+ final Runnable update = new Runnable() {
+ public void run() {
+ boolean oldValue = lastComputed; // doGetValue updates this
+ fireValueChange(Diffs.createValueDiff(oldValue, doGetValue()));
+ }
+ };
+
+ if (editPart instanceof IGraphicalEditPart) {
+ IGraphicalEditPart graphical = (IGraphicalEditPart) editPart;
+ canonicalStateListener = CanonicalStateListener.getInstance(graphical);
+
+ refreshHandler = new CanonicalStateListener.Handler() {
+
+ public Runnable handleAdd(CanonicalStyle style) {
+ return update;
+ }
+
+ public Runnable handleRemove(CanonicalStyle style) {
+ return update;
+ }
+ };
+ canonicalStateListener.addCanonicalRefreshHandler(refreshHandler);
+ }
+ }
+
+ @Override
+ public synchronized void dispose() {
+ try {
+ if (canonicalStateListener != null) {
+ canonicalStateListener.removeCanonicalRefreshHandler(refreshHandler);
+ canonicalStateListener.release();
+ canonicalStateListener = null;
+ }
+ } finally {
+ super.dispose();
+ }
+ }
+
+ public Object getObserved() {
+ return editPart;
+ }
+
+ public Object getValueType() {
+ return Boolean.class;
+ }
+
+ @Override
+ protected Object doGetValue() {
+ boolean result = DiagramEditPartsUtil.isCanonical(editPart);
+ lastComputed = result;
+ return result;
+ }
+
+ @Override
+ protected void doSetValue(Object value) {
+ Command command = getCommand(value);
+ domain.getCommandStack().execute(command);
+ }
+
+ public Command getCommand(Object value) {
+ boolean canonical = (value instanceof Boolean) && ((Boolean) value).booleanValue();
+
+ return GMFtoEMFCommandWrapper.wrap(new SetCanonicalCommand(domain, NotationHelper.findView(editPart), canonical));
+ }
+
+ public AggregatedObservable aggregate(IObservable observable) {
+ return new AggregatedPapyrusObservableValue(domain, this, observable);
+ }
+
+ public boolean hasDifferentValues() {
+ return false; // Primitive component has only one value
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElement.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElement.java
new file mode 100644
index 00000000000..73e13cec874
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElement.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.properties.modelelement;
+
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.CanonicalObservableValue;
+import org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement;
+
+/**
+ * An encapsulation of the synthetic synchronization-related properties of an {@link EditPart} in the diagrams.
+ */
+public class SynchronizationModelElement extends AbstractModelElement {
+ TransactionalEditingDomain domain;
+ EditPart editPart;
+
+ public SynchronizationModelElement(TransactionalEditingDomain domain, EditPart source) {
+ super();
+
+ this.domain = domain;
+ this.editPart = source;
+ }
+
+ @Override
+ protected IObservable doGetObservable(String propertyPath) {
+ IObservable result = null;
+
+ if (propertyPath.endsWith("syncWithModel")) {
+ result = new CanonicalObservableValue(domain, editPart);
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElementFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElementFactory.java
new file mode 100644
index 00000000000..b6fba3be817
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/SynchronizationModelElementFactory.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.properties.modelelement;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
+import org.eclipse.papyrus.infra.gmfdiag.properties.Activator;
+import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.views.properties.modelelement.AbstractModelElementFactory;
+
+/**
+ * Model-element factory for synthetic synchronization properties of GMF notation views.
+ */
+public class SynchronizationModelElementFactory extends AbstractModelElementFactory<SynchronizationModelElement> {
+ @Override
+ protected SynchronizationModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
+ SynchronizationModelElement result = null;
+ IGraphicalEditPart editPart = AdapterUtils.adapt(sourceElement, IGraphicalEditPart.class, null);
+
+ if (editPart == null) {
+ Activator.log.warn("The selected element cannot be resolved to a GEF EditPart");
+ } else {
+ result = new SynchronizationModelElement(editPart.getEditingDomain(), editPart);
+ }
+
+ return result;
+ }
+
+ @Override
+ protected void updateModelElement(SynchronizationModelElement modelElement, Object newSourceElement) {
+ IGraphicalEditPart editPart = AdapterUtils.adapt(newSourceElement, IGraphicalEditPart.class, null);
+ if (editPart == null) {
+ throw new IllegalArgumentException("Cannot resolve EditPart selection: " + newSourceElement);
+ }
+
+ modelElement.domain = editPart.getEditingDomain();
+ modelElement.editPart = editPart;
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/TypeUtils.java b/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/TypeUtils.java
index 532b2b449df..a8c14b522c1 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/TypeUtils.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/TypeUtils.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 CEA LIST and others.
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
@@ -108,10 +109,77 @@ public class TypeUtils {
}
return true;
}
- if(object instanceof Integer || object instanceof Double || object instanceof Float){
+ if (object instanceof Integer || object instanceof Double || object instanceof Float) {
return true;
}
return false;
-
+
+ }
+
+ /**
+ * Attempts to cast an {@code object} as the required {@code type}.
+ *
+ * @param object
+ * an object to cast
+ * @param type
+ * the type to cast it to
+ *
+ * @return the {@code object} or {@code null} if it is not of the required {@code type}
+ */
+ public static <T> T as(Object object, Class<T> type) {
+ T result = null;
+
+ if (type.isInstance(object)) {
+ result = type.cast(object);
+ }
+
+ return result;
+ }
+
+ /**
+ * Attempts to cast an {@code object} as an instance of the type implied by the given {@code default_}.
+ *
+ * @param object
+ * an object to cast
+ * @param default_
+ * the default value to return if it is not of the required type. May not be {@code null}
+ *
+ * @return the {@code object} or {@code default_} if it is not of the required type
+ *
+ * @throws NullPointerException
+ * if {@code default_} is {@code null}
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T as(Object object, T default_) {
+ T result = default_;
+
+ if (default_.getClass().isInstance(object)) {
+ result = (T) object;
+ }
+
+ return result;
+ }
+
+ /**
+ * Attempts to cast the object at an {@code index} of an {@code array} as the required {@code type}.
+ *
+ * @param array
+ * an array of objects
+ * @param index
+ * the position of an object in the {@code array}
+ * @param type
+ * the type to cast it to
+ *
+ * @return the {@code index}-th object in the {@code array} or {@code null} if it is not of the required {@code type} or the {@code array} has no such {@code index}
+ */
+ public static <T> T as(Object[] array, int index, Class<T> type) {
+ Object object = ((index >= 0) && (index < array.length)) ? array[index] : null;
+ T result = null;
+
+ if (type.isInstance(object)) {
+ result = type.cast(object);
+ }
+
+ return result;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF
index 52dd9c5b5ef..0703eb41d94 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF
@@ -1,5 +1,6 @@
Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.uml.diagram.activity,
+ org.eclipse.papyrus.uml.diagram.activity.canonical,
org.eclipse.papyrus.uml.diagram.activity.commands,
org.eclipse.papyrus.uml.diagram.activity.draw2d,
org.eclipse.papyrus.uml.diagram.activity.edit.actions,
@@ -8,7 +9,7 @@ Export-Package: org.eclipse.papyrus.uml.diagram.activity,
org.eclipse.papyrus.uml.diagram.activity.edit.dialogs,
org.eclipse.papyrus.uml.diagram.activity.edit.helpers,
org.eclipse.papyrus.uml.diagram.activity.edit.part,
- org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup;x-friends:=org.eclipse.papyrus.uml.diagram.activity.tests,
+ org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup;x-friends:="org.eclipse.papyrus.uml.diagram.activity.tests",
org.eclipse.papyrus.uml.diagram.activity.edit.parts,
org.eclipse.papyrus.uml.diagram.activity.edit.policies,
org.eclipse.papyrus.uml.diagram.activity.expressions,
@@ -87,7 +88,8 @@ Require-Bundle: org.eclipse.core.expressions,
org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
- org.eclipse.e4.ui.css.core
+ org.eclipse.e4.ui.css.core,
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.1.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.1.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/canonical/ActivityCanonicalCreationTargetStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/canonical/ActivityCanonicalCreationTargetStrategy.java
new file mode 100644
index 00000000000..b4b32166aea
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/canonical/ActivityCanonicalCreationTargetStrategy.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.canonical;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.ICreationTargetStrategy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityCNContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPartCN;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionActivityPartitionContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.uml2.uml.ActivityEdge;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * Target edit part strategy for canonical view creation in activity diagrams.
+ */
+public class ActivityCanonicalCreationTargetStrategy implements ICreationTargetStrategy {
+ private static final Map<String, String> CONTENT_COMPARTMENT_VISUAL_IDS = ImmutableMap.<String, String> builder()
+ .put(Integer.toString(ActivityEditPart.VISUAL_ID), Integer.toString(ActivityActivityContentCompartmentEditPart.VISUAL_ID))
+ .put(Integer.toString(ActivityEditPartCN.VISUAL_ID), Integer.toString(ActivityCNContentCompartmentEditPart.VISUAL_ID))
+ .put(Integer.toString(ConditionalNodeEditPart.VISUAL_ID), Integer.toString(ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID))
+ .put(Integer.toString(ExpansionRegionEditPart.VISUAL_ID), Integer.toString(ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID))
+ .put(Integer.toString(LoopNodeEditPart.VISUAL_ID), Integer.toString(LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID))
+ .put(Integer.toString(SequenceNodeEditPart.VISUAL_ID), Integer.toString(SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID))
+ .put(Integer.toString(StructuredActivityNodeEditPart.VISUAL_ID), Integer.toString(StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID))
+ .put(Integer.toString(ActivityPartitionEditPart.VISUAL_ID), Integer.toString(ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID))
+ .put(Integer.toString(InterruptibleActivityRegionEditPart.VISUAL_ID), Integer.toString(InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID)).build();
+
+ public ActivityCanonicalCreationTargetStrategy() {
+ super();
+ }
+
+ @Override
+ public EditPart getTargetEditPart(EditPart host, EObject element) {
+ EditPart result = null;
+
+ // We only need to worry about activity edges (for now)
+ if (element instanceof ActivityEdge) {
+ // Get the nearest containing shape compartment. It can create the edge view
+ for (EditPart candidate = host; (result == null) && (candidate != null); candidate = candidate.getParent()) {
+ if (candidate instanceof IResizableCompartmentEditPart) {
+ result = candidate;
+ } else {
+ // Could be a border-item (e.g., pin) on an activity-group or activity
+ View view = (View) host.getModel();
+ String visualID = (view == null) ? null : view.getType();
+ String compartmentID = CONTENT_COMPARTMENT_VISUAL_IDS.get(visualID);
+ if (compartmentID != null) {
+ // Only graphical edit parts are in the map, so this cast is safe
+ result = ((IGraphicalEditPart) host).getChildBySemanticHint(compartmentID);
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+}
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 8c36a40aca9..4c2438ac550 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
- Copyright (c) 2009, 2014 CEA and others.
+ Copyright (c) 2009, 2015 CEA, Christian W. Damus, and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
@@ -11,6 +11,7 @@
Contributors:
CEA - Initial API and implementation
Christian W. Damus (CEA) - bug 323802
+ Christian W. Damus - bug 433206
-->
<plugin>
@@ -3032,4 +3033,23 @@ self.structuralFeature.oclAsType(Property).opposite.type = self.object.type]]>
path="model/activityDiagram.elementtypesconfigurations">
</elementTypeSet>
</extension>
+<extension
+ point="org.eclipse.papyrus.infra.gmfdiag.canonical.strategies">
+ <creationTargetStrategy
+ class="org.eclipse.papyrus.uml.diagram.activity.canonical.ActivityCanonicalCreationTargetStrategy">
+ <enablement>
+ <with
+ variable="element">
+ <or>
+ <instanceof
+ value="org.eclipse.uml2.uml.Pin">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.uml2.uml.ActivityGroup">
+ </instanceof>
+ </or>
+ </with>
+ </enablement>
+ </creationTargetStrategy>
+</extension>
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF
index c47392d5d7c..957e6b5229b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF
@@ -2,6 +2,7 @@ Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.uml.diagram.common,
org.eclipse.papyrus.uml.diagram.common.actions,
org.eclipse.papyrus.uml.diagram.common.actions.handlers,
+ org.eclipse.papyrus.uml.diagram.common.canonical,
org.eclipse.papyrus.uml.diagram.common.commands,
org.eclipse.papyrus.uml.diagram.common.dialogs,
org.eclipse.papyrus.uml.diagram.common.directedit,
@@ -100,7 +101,8 @@ Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
org.eclipse.papyrus.uml.modelrepair;bundle-version="1.1.0",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.1.0",
org.eclipse.papyrus.infra.gmfdiag.menu;bundle-version="1.1.0",
- org.eclipse.e4.ui.css.core
+ org.eclipse.e4.ui.css.core,
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.1.0"
Bundle-Vendor: %providerName
Ant-Version: Apache Ant 1.7.0
Bundle-Version: 1.1.0.qualifier
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 28651d57de3..b39bf371fd9 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
@@ -3,13 +3,15 @@
<!--
##########################################################################################
-# Copyright (c) 2008 Conselleria de Infraestructuras y Transporte, Generalitat
-# de la Comunitat Valenciana . All rights reserved. This program
-# and the accompanying materials are made available under the terms of the
-# Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2008, 2015 Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana, Christian W. Damus, and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
#
-# Contributors: Francisco Javier Cano Muñoz (Prodevelop) - initial API implementation
+# Contributors:
+# Francisco Javier Cano Muñoz (Prodevelop) - initial API implementation
+# Christian W. Damus - bug 433206
#
########################################################################################
-->
@@ -547,4 +549,19 @@
type="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
</propertyTester>
</extension>
+<extension
+ point="org.eclipse.papyrus.infra.gmfdiag.canonical.strategies">
+ <defaultSemanticChildrenStrategy
+ class="org.eclipse.papyrus.uml.diagram.common.canonical.DefaultUMLSemanticChildrenStrategy"
+ priority="10">
+ <enablement>
+ <with
+ variable="element">
+ <instanceof
+ value="org.eclipse.uml2.uml.Element">
+ </instanceof>
+ </with>
+ </enablement>
+ </defaultSemanticChildrenStrategy>
+</extension>
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/canonical/DefaultUMLSemanticChildrenStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/canonical/DefaultUMLSemanticChildrenStrategy.java
new file mode 100644
index 00000000000..3ed07365b00
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/canonical/DefaultUMLSemanticChildrenStrategy.java
@@ -0,0 +1,167 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.common.canonical;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.ISemanticChildrenStrategy;
+import org.eclipse.papyrus.infra.tools.util.TypeUtils;
+import org.eclipse.papyrus.uml.tools.utils.UMLUtil;
+import org.eclipse.uml2.uml.ActivityNode;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.MessageEnd;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Vertex;
+import org.eclipse.uml2.uml.util.UMLSwitch;
+
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * Default semantic children strategy for canonical UML views.
+ */
+public class DefaultUMLSemanticChildrenStrategy implements ISemanticChildrenStrategy {
+
+ public DefaultUMLSemanticChildrenStrategy() {
+ super();
+ }
+
+ @Override
+ public List<? extends EObject> getCanonicalSemanticChildren(EObject semanticFromEditPart, View viewFromEditPart) {
+ List<Element> result = null;
+
+ if (semanticFromEditPart instanceof Element) {
+ Element element = (Element) semanticFromEditPart;
+ Iterable<Element> owned = element.getOwnedElements();
+
+ // Never include relationships that are owned, because they would be found
+ // when relationships are requested
+ result = Lists.newArrayList(Iterables.filter(owned, Predicates.not(UMLUtil.isRelationship())));
+ }
+
+ return result;
+ }
+
+ @Override
+ public List<? extends EObject> getCanonicalSemanticConnections(EObject semanticFromEditPart, View viewFromEditPart) {
+ List<Element> result = null;
+
+ if (semanticFromEditPart instanceof Element) {
+ Element element = (Element) semanticFromEditPart;
+
+ // Add relationships
+ result = Lists.<Element> newArrayList(element.getRelationships());
+
+ // And relationship-like elements
+ result = new ConnectionsSwitch(viewFromEditPart, result).doSwitch(element);
+ }
+
+ return result;
+ }
+
+ @Override
+ public Collection<? extends EObject> getCanonicalDependents(EObject semanticFromEditPart) {
+ Collection<Element> result = null;
+
+ if (semanticFromEditPart instanceof NamedElement) {
+ // Handle changes to client/supplier dependencies
+ // TODO: This will cause a lot of unneeded refresh. Performance problem? Better way?
+ Element package_ = ((NamedElement) semanticFromEditPart).getNearestPackage();
+ if (package_ != null) {
+ result = Collections.singletonList(package_);
+ }
+ }
+
+ return result;
+ }
+
+ protected Property getExpectedPartWithPort(View possiblePortView) {
+ Property result = null;
+
+ if (possiblePortView.getElement() instanceof Port) {
+ View parentView = TypeUtils.as(possiblePortView.eContainer(), View.class);
+ if (parentView != null) {
+ result = TypeUtils.as(parentView.getElement(), Property.class);
+ }
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ private class ConnectionsSwitch extends UMLSwitch<List<Element>> {
+ private final View visualContext;
+ private final List<Element> result;
+
+ ConnectionsSwitch(View visualContext, List<Element> result) {
+ super();
+
+ this.visualContext = visualContext;
+ this.result = result;
+ }
+
+ @Override
+ public List<Element> doSwitch(EObject eObject) {
+ super.doSwitch(eObject);
+
+ return result;
+ }
+
+ @Override
+ public List<Element> caseConnectableElement(ConnectableElement object) {
+ Property expectedPartWithPort = getExpectedPartWithPort(visualContext);
+
+ for (ConnectorEnd next : object.getEnds()) {
+ // Only report connectors for which the part-with-port matches in the visual context
+ if (next.getPartWithPort() == expectedPartWithPort) {
+ result.add(next.getOwner()); // the Connector
+ }
+ }
+ return super.caseConnectableElement(object);
+ }
+
+ @Override
+ public List<Element> caseActivityNode(ActivityNode object) {
+ result.addAll(object.getOutgoings());
+ result.addAll(object.getIncomings());
+ return super.caseActivityNode(object);
+ }
+
+ @Override
+ public List<Element> caseVertex(Vertex object) {
+ result.addAll(object.getOutgoings());
+ result.addAll(object.getIncomings());
+ return super.caseVertex(object);
+ }
+
+ @Override
+ public List<Element> caseMessageEnd(MessageEnd object) {
+ result.add(object.getMessage());
+ return super.caseMessageEnd(object);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/DeferredCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/DeferredCreateCommand.java
index 58b62f222ef..cb1aceea276 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/DeferredCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/DeferredCreateCommand.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011 Atos.
+ * Copyright (c) 2011, 2015 Atos, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Atos - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.commands;
@@ -115,7 +116,7 @@ public class DeferredCreateCommand extends AbstractTransactionalCommand {
}
}
}
- return CommandResult.newOKCommandResult();
+ return CommandResult.newOKCommandResult(adapter);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF
index 2eb98234c73..d405a1afcb1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF
@@ -72,7 +72,9 @@ Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties,
org.eclipse.emf.validation;visibility:=reexport,
org.eclipse.gef,
org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.core.databinding.observable
+ org.eclipse.core.databinding.observable,
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.1.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/CommunicationCanonicalCreationTargetStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/CommunicationCanonicalCreationTargetStrategy.java
new file mode 100644
index 00000000000..031bd554496
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/CommunicationCanonicalCreationTargetStrategy.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication.custom.canonical;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IResizableCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.ICreationTargetStrategy;
+import org.eclipse.uml2.uml.Message;
+
+/**
+ * Target edit part strategy for canonical view creation in communication diagrams.
+ */
+public class CommunicationCanonicalCreationTargetStrategy implements ICreationTargetStrategy {
+
+ public CommunicationCanonicalCreationTargetStrategy() {
+ super();
+ }
+
+ public EditPart getTargetEditPart(EditPart host, EObject element) {
+ EditPart result = null;
+
+ if (element instanceof Message) {
+ // Get the nearest containing shape compartment. It can create the edge view
+ for (EditPart candidate = host; (result == null) && (candidate != null); candidate = candidate.getParent()) {
+ if (candidate instanceof IResizableCompartmentEditPart) {
+ result = candidate;
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineSemanticChildrenStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineSemanticChildrenStrategy.java
new file mode 100644
index 00000000000..7c42b73eba9
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineSemanticChildrenStrategy.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication.custom.canonical;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.canonical.DefaultUMLSemanticChildrenStrategy;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.MessageEnd;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * Custom semantic-children strategy for lifelines in communication diagrams.
+ */
+public class LifelineSemanticChildrenStrategy extends DefaultUMLSemanticChildrenStrategy {
+
+ public LifelineSemanticChildrenStrategy() {
+ super();
+ }
+
+ @Override
+ public List<? extends EObject> getCanonicalSemanticConnections(EObject semanticFromEditPart, View viewFromEditPart) {
+ // We only have messages connected to lifelines in communication diagrams
+ List<? extends EObject> result = null;
+
+ Lifeline lifeline = (semanticFromEditPart instanceof Lifeline) ? (Lifeline) semanticFromEditPart : null;
+ if (lifeline != null) {
+ List<Element> messages = new ArrayList<Element>();
+ result = messages;
+
+ for (MessageEnd next : getMessageEnds(lifeline)) {
+ if (next.getMessage() != null) {
+ messages.add(next.getMessage());
+ }
+ }
+ }
+
+ return result;
+ }
+
+ Iterable<MessageEnd> getMessageEnds(Lifeline lifeline) {
+ return Iterables.filter(lifeline.getCoveredBys(), MessageEnd.class);
+ }
+
+ @Override
+ public Collection<? extends EObject> getCanonicalDependents(EObject semanticFromEditPart) {
+ List<? extends EObject> result = null;
+
+ Lifeline lifeline = (semanticFromEditPart instanceof Lifeline) ? (Lifeline) semanticFromEditPart : null;
+ if (lifeline != null) {
+ result = Lists.newArrayList(getMessageEnds(lifeline));
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineVisualChildrenStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineVisualChildrenStrategy.java
new file mode 100644
index 00000000000..d07de91c549
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineVisualChildrenStrategy.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication.custom.canonical;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.IVisualChildrenStrategy;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
+import org.eclipse.uml2.uml.Message;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Custom visual-children strategy for lifelines in communication diagrams.
+ */
+public class LifelineVisualChildrenStrategy implements IVisualChildrenStrategy {
+
+ public LifelineVisualChildrenStrategy() {
+ super();
+ }
+
+ public List<? extends Edge> getCanonicalChildren(EditPart editPart, View view) {
+ return null;
+ }
+
+ public List<? extends View> getCanonicalEdges(EditPart editPart, View view) {
+ List<View> result = null;
+
+ if (editPart instanceof LifelineEditPartCN) {
+ // In the communication diagram, edges are just communication paths.
+ // It is labels on these edges that represent the messages sent
+ // and received by lifelines
+ result = Lists.newArrayList();
+
+ @SuppressWarnings("unchecked")
+ List<? extends Edge> sourceEdges = view.getSourceEdges();
+ for (Edge next : sourceEdges) {
+ collectMessages(next, result);
+ }
+
+ @SuppressWarnings("unchecked")
+ List<? extends Edge> targetEdges = view.getTargetEdges();
+ for (Edge next : targetEdges) {
+ // Don't process self-edges twice
+ if (next.getSource() != view) {
+ collectMessages(next, result);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private static void collectMessages(Edge edge, List<? super View> result) {
+ @SuppressWarnings("unchecked")
+ List<? extends View> labels = edge.getChildren();
+ for (View next : labels) {
+ if (next.getElement() instanceof Message) {
+ result.add(next);
+ }
+ }
+ }
+}
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 8d126965617..a3de7cb0137 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
- Copyright (c) 2010, 2014 CEA and others.
+ Copyright (c) 2010, 2015 CEA, Christian W. Damus, and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
@@ -11,6 +11,7 @@
Contributors:
CEA - Initial API and implementation
Christian W. Damus (CEA) - bug 323802
+ Christian W. Damus - bug 433206
-->
<plugin>
@@ -704,5 +705,23 @@
</extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.canonical.strategies">
+ <semanticChildrenStrategy
+ editPart="org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN"
+ class="org.eclipse.papyrus.uml.diagram.communication.custom.canonical.LifelineSemanticChildrenStrategy">
+ </semanticChildrenStrategy>
+ <creationTargetStrategy
+ class="org.eclipse.papyrus.uml.diagram.communication.custom.canonical.CommunicationCanonicalCreationTargetStrategy">
+ <enablement>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN"/>
+ </enablement>
+ </creationTargetStrategy>
+ <visualChildrenStrategy
+ editPart="org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN"
+ class="org.eclipse.papyrus.uml.diagram.communication.custom.canonical.LifelineVisualChildrenStrategy">
+ </visualChildrenStrategy>
+ </extension>
+
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF
index dee4ef9cf83..bc3b6599e74 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF
@@ -1,81 +1,81 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.composite,
- org.eclipse.papyrus.uml.diagram.composite.custom.actions,
- org.eclipse.papyrus.uml.diagram.composite.custom.edit.command,
- org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies,
- org.eclipse.papyrus.uml.diagram.composite.custom.figures,
- org.eclipse.papyrus.uml.diagram.composite.custom.helper,
- org.eclipse.papyrus.uml.diagram.composite.custom.locators,
- org.eclipse.papyrus.uml.diagram.composite.custom.parts,
- org.eclipse.papyrus.uml.diagram.composite.edit.helpers,
- org.eclipse.papyrus.uml.diagram.composite.edit.parts,
- org.eclipse.papyrus.uml.diagram.composite.edit.policies,
- org.eclipse.papyrus.uml.diagram.composite.parsers,
- org.eclipse.papyrus.uml.diagram.composite.part,
- org.eclipse.papyrus.uml.diagram.composite.preferences,
- org.eclipse.papyrus.uml.diagram.composite.providers,
- org.eclipse.papyrus.uml.diagram.composite.sheet
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.emf.ecore,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.core.expressions,
- org.eclipse.jface,
- org.eclipse.ui.views,
- org.eclipse.gmf.runtime.emf.core,
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.gmf.runtime.emf.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.gmf.runtime.diagram.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.providers.ide,
- org.eclipse.gmf.runtime.diagram.ui.render,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
- org.eclipse.uml2.uml,
- org.eclipse.gmf.runtime.draw2d.ui,
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.uml.tools.extendedtypes;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
- org.eclipse.emf.ecore.xmi,
- org.eclipse.emf.edit.ui,
- org.eclipse.draw2d;visibility:=reexport,
- org.eclipse.emf.ecore.edit;visibility:=reexport,
- org.eclipse.ocl.ecore;visibility:=reexport,
- org.eclipse.emf.validation;visibility:=reexport,
- org.eclipse.gef,
- org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
- org.eclipse.papyrus.views.properties;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.synchronizeview;bundle-version="1.1.0",
- org.eclipse.core.databinding.observable,
- org.eclipse.papyrus.infra.elementtypesconfigurations;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Eclipse-LazyStart: true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.composite; singleton:=true
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.diagram.composite,
+ org.eclipse.papyrus.uml.diagram.composite.custom.actions,
+ org.eclipse.papyrus.uml.diagram.composite.custom.edit.command,
+ org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies,
+ org.eclipse.papyrus.uml.diagram.composite.custom.figures,
+ org.eclipse.papyrus.uml.diagram.composite.custom.helper,
+ org.eclipse.papyrus.uml.diagram.composite.custom.locators,
+ org.eclipse.papyrus.uml.diagram.composite.custom.parts,
+ org.eclipse.papyrus.uml.diagram.composite.edit.helpers,
+ org.eclipse.papyrus.uml.diagram.composite.edit.parts,
+ org.eclipse.papyrus.uml.diagram.composite.edit.policies,
+ org.eclipse.papyrus.uml.diagram.composite.parsers,
+ org.eclipse.papyrus.uml.diagram.composite.part,
+ org.eclipse.papyrus.uml.diagram.composite.preferences,
+ org.eclipse.papyrus.uml.diagram.composite.providers,
+ org.eclipse.papyrus.uml.diagram.composite.sheet
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.emf.ecore,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.core.expressions,
+ org.eclipse.jface,
+ org.eclipse.ui.views,
+ org.eclipse.gmf.runtime.emf.core,
+ org.eclipse.gmf.runtime.emf.commands.core,
+ org.eclipse.gmf.runtime.emf.ui.properties,
+ org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.gmf.runtime.diagram.ui.properties,
+ org.eclipse.gmf.runtime.diagram.ui.providers,
+ org.eclipse.gmf.runtime.diagram.ui.providers.ide,
+ org.eclipse.gmf.runtime.diagram.ui.render,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
+ org.eclipse.uml2.uml,
+ org.eclipse.gmf.runtime.draw2d.ui,
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.uml.tools.extendedtypes;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.draw2d;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.ocl.ecore;visibility:=reexport,
+ org.eclipse.emf.validation;visibility:=reexport,
+ org.eclipse.gef,
+ org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
+ org.eclipse.papyrus.views.properties;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.1.0",
+ org.eclipse.core.databinding.observable,
+ org.eclipse.papyrus.infra.elementtypesconfigurations;bundle-version="1.1.0"
+Bundle-Vendor: %providerName
+Eclipse-LazyStart: true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.composite; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
index c9eb7875d3e..7ebebcaf9d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009-2011 CEA LIST.
+ * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies;
@@ -123,6 +124,7 @@ import org.eclipse.papyrus.uml.diagram.composite.edit.parts.TimeObservationEditP
import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UseCaseEditPart;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
@@ -380,8 +382,8 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
return UnexecutableCommand.INSTANCE;
}
-
-
+
+
/**
* Returns the command to drop the Constraint + the link to attach it to its contrainted elements
*
@@ -818,7 +820,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
CollaborationHelper helper = new CollaborationHelper(getEditingDomain());
cc.add(helper.dropCollaborationAsCollaborationUse((GraphicalEditPart) getHost(), (Collaboration) droppedObject, location));
- } else if (droppedObject instanceof Classifier) {
+ } else if (droppedObject instanceof Classifier && !(droppedObject instanceof Association)) { // Properties of association type are nonsense
TypeHelper helper = new TypeHelper(getEditingDomain());
// clarify action name in order to facilitate selection of command
// (context: alternative actions proposed by DND service, see bug 402717)
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 c6e38e5f79c..9ca163aec6c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
@@ -1236,11 +1236,15 @@
</diagramMappings>
</extension>
<extension
- point="org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild">
- <semanticChild
+ point="org.eclipse.papyrus.infra.gmfdiag.canonical.strategies">
+ <semanticChildrenStrategy
editPart="org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartCompartmentEditPartCN"
- getSemanticChildren="org.eclipse.papyrus.uml.diagram.composite.SynchroSemanticForPopertyPartCompartment">
- </semanticChild>
+ class="org.eclipse.papyrus.uml.diagram.composite.PropertyPartCompartmentSemanticChildrenStrategy">
+ </semanticChildrenStrategy>
+ <semanticChildrenStrategy
+ editPart="org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartEditPartCN"
+ class="org.eclipse.papyrus.uml.diagram.composite.PropertyPartCompartmentSemanticChildrenStrategy">
+ </semanticChildrenStrategy>
</extension>
<extension
point="org.eclipse.papyrus.infra.elementtypesconfigurations.elementTypeSetConfiguration">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/PropertyPartCompartmentSemanticChildrenStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/PropertyPartCompartmentSemanticChildrenStrategy.java
new file mode 100644
index 00000000000..87aaa16afb5
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/PropertyPartCompartmentSemanticChildrenStrategy.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.composite;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.canonical.DefaultUMLSemanticChildrenStrategy;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * This class is used to precise semantic element that could be displayed in compartment of parts
+ */
+public class PropertyPartCompartmentSemanticChildrenStrategy extends DefaultUMLSemanticChildrenStrategy {
+
+ public PropertyPartCompartmentSemanticChildrenStrategy() {
+ super();
+ }
+
+ @Override
+ public List<? extends EObject> getCanonicalSemanticChildren(EObject semanticFromEditPart, View viewFromEditPart) {
+ List<? extends EObject> result = null;
+
+ Property property = (semanticFromEditPart instanceof Property) ? (Property) semanticFromEditPart : null;
+ if (property != null) {
+ Type type = property.getType();
+ if (type != null) {
+ // Show nested structure of the part as defined by its type
+ result = super.getCanonicalSemanticChildren(type, viewFromEditPart);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Collection<? extends EObject> getCanonicalDependents(EObject semanticFromEditPart) {
+ if (semanticFromEditPart instanceof Property) {
+ if (((Property) semanticFromEditPart).getType() != null) {
+ return Collections.singletonList(((Property) semanticFromEditPart).getType());
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF
index 4ee3f4fd911..a5774419605 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/META-INF/MANIFEST.MF
@@ -1,43 +1,44 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.menu,
- org.eclipse.papyrus.uml.diagram.menu.actions,
- org.eclipse.papyrus.uml.diagram.menu.actions.handlers
-Require-Bundle: org.eclipse.ui,
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.actions,
- org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.0",
- org.eclipse.core.expressions,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.diagram.ui.actions,
- org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.1.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.menu;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.menu.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.menu;singleton:=t
- rue
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Description: %pluginDescription
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.diagram.menu,
+ org.eclipse.papyrus.uml.diagram.menu.actions,
+ org.eclipse.papyrus.uml.diagram.menu.actions.handlers
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.actions,
+ org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.0",
+ org.eclipse.core.expressions,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor,
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.diagram.ui.actions,
+ org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.1.0",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.menu;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.menu.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.menu;singleton:=t
+ rue
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Description: %pluginDescription
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml
index 3ca3b20e3a8..5ed34acaea0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml
@@ -653,6 +653,26 @@
</visibleWhen>
</command>
<separator
+ name="org.eclipse.papyrus.menu.showhide.toolbar.separator1"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.papyrus.infra.gmfdiag.menu.toggleCanonical"
+ label="Synchronized with Model"
+ style="toggle"
+ tooltip="Automatically synchronize contents with the underlying model elements">
+ <visibleWhen>
+ <and>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ <separator
name="org.eclipse.papyrus.menu.showhide.toolbar.separator0"
visible="true">
</separator>
@@ -1368,6 +1388,16 @@
tooltip="Sort or Filter Compartments Items for this shape">
</command>
<separator
+ name="org.eclipse.papyrus.uml.diagram.ui.menu.filtersMenu.separator1"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.papyrus.infra.gmfdiag.menu.toggleCanonical"
+ label="Synchronized with Model"
+ style="toggle"
+ tooltip="Automatically synchronize contents with the underlying model elements">
+ </command>
+ <separator
name="org.eclipse.papyrus.uml.diagram.ui.menu.filtersMenu.separator0"
visible="true">
</separator>
@@ -2115,6 +2145,16 @@
tooltip="Sort or Filter Compartments Items for this shape">
</command>
<separator
+ name="org.eclipse.papyrus.uml.diagram.ui.popupmenu.filters.separator1"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.papyrus.infra.gmfdiag.menu.toggleCanonical"
+ label="Synchronized with Model"
+ style="toggle"
+ tooltip="Automatically synchronize contents with the underlying model elements">
+ </command>
+ <separator
name="org.eclipse.papyrus.uml.diagram.ui.popupmenu.filters.separator0"
visible="true">
</separator>
@@ -3573,6 +3613,10 @@
priorityLevel="workbench">
</variable>
<variable
+ name="toggleCanonical"
+ priorityLevel="workbench">
+ </variable>
+ <variable
name="copyAppearanceProperties"
priorityLevel="workbench">
</variable>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/HandlerStateSourceProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/HandlerStateSourceProvider.java
index 6242983badc..0ea761e8faf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/HandlerStateSourceProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/src/org/eclipse/papyrus/uml/diagram/menu/providers/HandlerStateSourceProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,11 +9,13 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.menu.providers;
import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.papyrus.infra.gmfdiag.menu.handlers.ToggleCanonicalHandler;
import org.eclipse.papyrus.uml.diagram.common.providers.AbstractActionStateSourceProvider;
import org.eclipse.papyrus.uml.diagram.menu.actions.ArrangeAction;
import org.eclipse.papyrus.uml.diagram.menu.actions.LineStyleAction;
@@ -54,6 +56,8 @@ public class HandlerStateSourceProvider extends AbstractActionStateSourceProvide
public static final String SHOW_HIDE_COMPARTMENTS = "showHideCompartments"; //$NON-NLS-1$
+ public static final String TOGGLE_CANONICAL = "toggleCanonical"; //$NON-NLS-1$
+
public static final String COPY_APPEARANCE_PROPERTIES = "copyAppearanceProperties";//$NON-NLS-1$
public static final String SORT_FILTER_COMPARTMENT_ITEMS = "sortFilterCompartmentItems"; //$NON-NLS-1$
@@ -99,6 +103,7 @@ public class HandlerStateSourceProvider extends AbstractActionStateSourceProvide
super();
currentState.put(SHOW_HIDE_CONTENTS, DISABLED);
currentState.put(SHOW_HIDE_COMPARTMENTS, DISABLED);
+ currentState.put(TOGGLE_CANONICAL, DISABLED);
currentState.put(COPY_APPEARANCE_PROPERTIES, DISABLED);
currentState.put(SORT_FILTER_COMPARTMENT_ITEMS, DISABLED);
currentState.put(ZOOM, DISABLED);
@@ -135,8 +140,9 @@ public class HandlerStateSourceProvider extends AbstractActionStateSourceProvide
*/
@Override
public String[] getProvidedSourceNames() {
- return new String[] { SHOW_HIDE_CONTENTS, SHOW_HIDE_COMPARTMENTS, COPY_APPEARANCE_PROPERTIES, ZOOM
+ return new String[] { SHOW_HIDE_CONTENTS, SHOW_HIDE_COMPARTMENTS, TOGGLE_CANONICAL
+ , COPY_APPEARANCE_PROPERTIES, ZOOM
, BRING_TO_FRONT, SEND_TO_BACK, BRING_FORWARD, SEND_BACKWARD
@@ -160,6 +166,7 @@ public class HandlerStateSourceProvider extends AbstractActionStateSourceProvide
protected void refreshActions() {
refresh(SHOW_HIDE_CONTENTS, new ShowHideContentsHandler());
refresh(SHOW_HIDE_COMPARTMENTS, new ShowHideCompartmentHandler());
+ refresh(TOGGLE_CANONICAL, new ToggleCanonicalHandler());
refresh(COPY_APPEARANCE_PROPERTIES, new CopyAppearancePropertiesHandler());
refresh(SORT_FILTER_COMPARTMENT_ITEMS, new SortFilterCompartmentItemsHandler());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF
index 8f16ad5004e..0e0fa4c06ac 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF
@@ -77,7 +77,9 @@ Require-Bundle: org.eclipse.core.expressions,
org.eclipse.uml2.uml,
org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.core.databinding.observable
+ org.eclipse.core.databinding.observable,
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0"
Bundle-Vendor: %providerName
Ant-Version: Apache Ant 1.7.0
Eclipse-LazyStart: true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/canonical/StateMachineCanonicalCreationTargetStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/canonical/StateMachineCanonicalCreationTargetStrategy.java
new file mode 100644
index 00000000000..1bf312ec8d7
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/canonical/StateMachineCanonicalCreationTargetStrategy.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.statemachine.custom.canonical;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IResizableCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.ICreationTargetStrategy;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateMachineCompartmentEditPart;
+import org.eclipse.uml2.uml.Region;
+import org.eclipse.uml2.uml.Transition;
+
+import com.google.common.collect.Iterators;
+
+/**
+ * Target edit part strategy for canonical view creation in state machine diagrams.
+ */
+public class StateMachineCanonicalCreationTargetStrategy implements ICreationTargetStrategy {
+
+ public StateMachineCanonicalCreationTargetStrategy() {
+ super();
+ }
+
+ @Override
+ public EditPart getTargetEditPart(EditPart host, EObject element) {
+ EditPart result = null;
+
+ if (element instanceof Transition) {
+ // Get the nearest containing shape compartment. It can create the edge view
+ for (EditPart candidate = host; (result == null) && (candidate != null); candidate = candidate.getParent()) {
+ if (candidate instanceof IResizableCompartmentEditPart) {
+ result = candidate;
+ } else {
+ // TODO: Border items (e.g., connection points)
+ }
+ }
+ } else if (element instanceof Region) {
+ // Only the first region can be dropped onto a composite state or state machine's compartment.
+ // Additional regions have to be dropped on a previous region because regions fill the entire
+ // space of their parent compartment
+ for (EditPart candidate = host; (result == null) && (candidate != null); candidate = candidate.getParent()) {
+ if ((candidate instanceof StateMachineCompartmentEditPart) || (candidate instanceof StateCompartmentEditPart)) {
+ Iterator<RegionCompartmentEditPart> regions = Iterators.filter(DiagramEditPartsUtil.getAllContents(candidate, false), RegionCompartmentEditPart.class);
+ result = Iterators.getLast(regions, candidate);
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/preferences/CustomTransitionPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/preferences/CustomTransitionPreferencePage.java
index b85f27e52a0..be275f9e07f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/preferences/CustomTransitionPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/preferences/CustomTransitionPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 461629
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.uml.diagram.statemachine.custom.preferences;
import org.eclipse.jface.preference.BooleanFieldEditor;
@@ -16,7 +29,7 @@ public class CustomTransitionPreferencePage extends FieldEditorPreferencePage
super(GRID);
setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore());
setDescription(
- "This preference page allows to customize label appearance on transitions. " + //$NON-NLS-1$
+ "This preference page allows to customize label appearance on transitions. " + //$NON-NLS-1$
"Please note that per diagram or element settings can be done via CSS."); //$NON-NLS-1$
}
@@ -49,8 +62,7 @@ public class CustomTransitionPreferencePage extends FieldEditorPreferencePage
@Override
public void run() {
- DiagramHelper.setNeedsRefresh();
- DiagramHelper.refreshDiagrams();
+ DiagramHelper.forceRefresh();
updatePending = false;
}
});
@@ -66,6 +78,7 @@ public class CustomTransitionPreferencePage extends FieldEditorPreferencePage
*
* @param workbench
*/
+ @Override
public void init(IWorkbench workbench) {
}
-} \ No newline at end of file
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml
index 7b97ba31111..aecebb936bc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
- Copyright (c) 2009, 2014 MOSKitt, CEA and others.
+ Copyright (c) 2009, 2015 MOSKitt, CEA, Christian W. Damus, and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
@@ -11,6 +11,7 @@
Contributors:
MOSKitt - Initial API and implementation
Christian W. Damus (CEA) - bug 323802
+ Christian W. Damus - bug 433206
-->
<plugin>
@@ -1095,4 +1096,20 @@
</initializer>
</extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.canonical.strategies">
+ <creationTargetStrategy
+ class="org.eclipse.papyrus.uml.diagram.statemachine.custom.canonical.StateMachineCanonicalCreationTargetStrategy">
+ <enablement>
+ <with
+ variable="element">
+ <or>
+ <instanceof value="org.eclipse.uml2.uml.Vertex"/>
+ <instanceof value="org.eclipse.uml2.uml.StateMachine"/>
+ </or>
+ </with>
+ </enablement>
+ </creationTargetStrategy>
+ </extension>
+
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/META-INF/MANIFEST.MF
deleted file mode 100644
index 5f28e7511c6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.emf.common,
- org.eclipse.emf.ecore,
- org.eclipse.gef,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.gmf.tooling.runtime,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0"
-Export-Package: org.eclipse.papyrus.uml.diagram.synchronizeview.custom
- ization
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.synchronizeview.Acti
- vator
-Bundle-ManifestVersion: 2
-Bundle-Description: The goal of this plugin is add the fucntionality t
- o synchronize elements in diagram. More details (models and .html) ha
- s been store in the docs directory.
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.synchronizeview;s
- ingleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-Description: %pluginDescription
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/plugin.xml
deleted file mode 100644
index 5ad9ce1f54f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/plugin.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild" name="org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild" schema="schema/org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild.exsd"/>
-<!-- FIXME: Bug 433206 Reinstate this edit-policy provider when it doesn't break numerous automated test cases
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.uml.diagram.synchronizeview.provider.SynchronizeEditPolicyProvider">
- <Priority
- name="Low">
- </Priority>
- </editpolicyProvider>
-</extension>
--->
-</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/schema/org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild.exsd b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/schema/org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild.exsd
deleted file mode 100644
index 0dcbb536aef..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/schema/org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild.exsd
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.uml.diagram.synchronizeview" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.papyrus.uml.diagram.synchronizeview" id="org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild" name="org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild"/>
- </appinfo>
- <documentation>
- The goal of this extension point is to describe semantic elements that plays children of greaphical element.
-
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="semanticChild"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="semanticChild">
- <annotation>
- <documentation>
- This is couple &lt;EditPart, ISynchroSemanticChild&gt; used to describes the list of semantic element that will represented as son of the current EditPart
- </documentation>
- </annotation>
- <complexType>
- <attribute name="editPart" type="string" use="required">
- <annotation>
- <documentation>
- EditPart that will be synchronized
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.gef.EditPart"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="getSemanticChildren" type="string" use="required">
- <annotation>
- <documentation>
- this class describes the list of semantic element that will represented ass son of the current EditPart
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.uml.diagram.synchronizeview.customization.ISynchroSemanticChild"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="priority" type="string">
- <annotation>
- <documentation>
- the priority of the semantic childreen more this number is important, more the priority is high
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;extension
- point=&quot;org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild&quot;&gt;
- &lt;semanticChild
- editPart=&quot;org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartCompartmentEditPartCN&quot;
- getSemanticChildren=&quot;org.eclipse.papyrus.uml.diagram.composite.SynchroSemanticForPopertyPartCompartment&quot;&gt;
- &lt;/semanticChild&gt;
-&lt;/extension&gt;
-
-here we describe by using SynchroSemanticForPopertyPartCompartment instance the list of semantic childreen fir the the editpart PropertyPartCompartmentEditPartCN
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- 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
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/ISynchroSemanticChild.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/ISynchroSemanticChild.java
deleted file mode 100644
index b1b08cb82fc..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/ISynchroSemanticChild.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.synchronizeview.customization;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * this interface allows developer to specialize "semantic element" to display in the content of a given editPart
- *
- */
-public interface ISynchroSemanticChild {
-
- /**
- * return the list of semantic elements that play graphical children foe a given element and a given editpart
- *
- * @param semanticFromEditPart
- * @return list of semantic elements
- */
- public List<EObject> getSynchroSemanticChild(EObject semanticFromEditPart);
-
- /** EObject to listen **/
- public EObject getSemanticEObjectToListen(EObject semanticFromEditPart);
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/SemanticChild.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/SemanticChild.java
deleted file mode 100644
index d7bd38fbf32..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/SemanticChild.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.synchronizeview.customization;
-
-import org.eclipse.gef.EditPart;
-
-/**
- * this class is the obejct that references the editpart and the an instance of ISynchroSemanticChild
- *
- */
-public class SemanticChild {
-
- protected Class<? extends EditPart> editPart = null;
-
- protected ISynchroSemanticChild synchroSemanticChild = null;
-
- protected int priority = 0;
-
-
- /**
- *
- * @return the referenced edipart, cannot but null.
- */
- public Class<? extends EditPart> getEditPart() {
- return editPart;
- }
-
- /**
- *
- * @return an instance of ISynchroSemanticChild, cannot be null
- */
- public ISynchroSemanticChild getSynchroSemanticChild() {
- return synchroSemanticChild;
- }
-
- /**
- * get the priority for this mapping
- *
- * @return
- */
- public int getPriority() {
- return priority;
- }
-
- /**
- *
- * Constructor.
- *
- * @param editPart
- * the editpart
- * @param synchroSemanticChild
- * the class that explain the list of semantic element that play graphical childreen.
- * @param priority
- * the priority of this mapping
- */
- public SemanticChild(Class<? extends EditPart> editPart, ISynchroSemanticChild synchroSemanticChild, int priority) {
- super();
- this.editPart = editPart;
- this.synchroSemanticChild = synchroSemanticChild;
- this.priority = priority;
- }
-
-
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/SynchroSemanticChildRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/SynchroSemanticChildRegistry.java
deleted file mode 100644
index 7acb4ef9f1d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/customization/SynchroSemanticChildRegistry.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 CEA LIST.
- * All rights reserved.
- * This code is the property of CEA LIST, this use is subject to specific
- * agreement with the CEA LIST.
- * Contributors:
- * CEA LIST. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.uml.diagram.synchronizeview.customization;
-
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.gef.EditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
-import org.osgi.framework.Bundle;
-
-/**
- * This the registry of to get the class that can give info about childreen of an editpart. this is a singleton.
- */
-public class SynchroSemanticChildRegistry {
-
- private static final String SEMANTICCHILD_EXTENSION_ID = "org.eclipse.papyrus.uml.diagram.synchronizeview.semanticchild";
-
- private static final String EDITPART = "editPart";
-
- private static final String GET_SEMANTIC_CHILDREN = "getSemanticChildren";
-
- private static final String PRIORITY = "priority";
-
- protected HashMap<Class<? extends EditPart>, SemanticChild> semanticMap = new HashMap<Class<? extends EditPart>, SemanticChild>();
-
- protected static SynchroSemanticChildRegistry eInstance = null;
-
- /**
- *
- * @return the instance of SynchroSemanticChildRegistry
- */
- public static SynchroSemanticChildRegistry getInstance() {
- if (eInstance == null) {
- eInstance = new SynchroSemanticChildRegistry();
- }
- return eInstance;
- }
-
- public SynchroSemanticChildRegistry() {
- init();
- }
-
- /**
- * this method init loading of extension points
- */
- public void init() {
- // Reading data from plugins
- IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(SEMANTICCHILD_EXTENSION_ID);
- for (int i = 0; i < configElements.length; i++) {
- SemanticChild semanticChild = createSemanticChild(configElements[i]);
- if (semanticMap.get(semanticChild.getEditPart()) != null) {
- if (semanticMap.get(semanticChild.getEditPart()).getPriority() <= semanticChild.getPriority()) {
- semanticMap.remove(semanticChild.getEditPart());
- semanticMap.put(semanticChild.getEditPart(), semanticChild);
- }
- } else {
- semanticMap.put(semanticChild.getEditPart(), semanticChild);
- }
- }
- }
-
-
-
-
- /**
- * Load one semanticChild
- *
- * @param element
- * the extension point
- */
- protected SemanticChild createSemanticChild(IConfigurationElement element) {
- Class<? extends EditPart> editPart = null;
- ISynchroSemanticChild synchroSemanticChild = null;
- int priority = 0;
- SemanticChild semanticChild = null;
- try {
- editPart = LoadExtension(element, element.getAttribute(EDITPART));
- synchroSemanticChild = (ISynchroSemanticChild) createExtension(element, element.getAttribute(GET_SEMANTIC_CHILDREN));
- if (element.getAttribute(PRIORITY) != null) {
- priority = Integer.getInteger(element.getAttribute(PRIORITY)).intValue();
- }
- semanticChild = new SemanticChild(editPart, synchroSemanticChild, priority);
- } catch (Exception e) {
- Activator.log.error("" + element + " can not be loaded ", e);
- }
- return semanticChild;
- }
-
-
- /**
- * Load an the class
- *
- * @param element
- * the extension point
- * @param classAttribute
- * the name of the class to load
- * @return the loaded Class
- * @throws Exception
- * if the class is not loaded
- */
- @SuppressWarnings("unchecked")
- protected static Class<? extends EditPart> LoadExtension(final IConfigurationElement element, final String classAttribute) throws Exception {
- try {
- Bundle extensionBundle = Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier());
- Class<?> clazz = extensionBundle.loadClass(classAttribute);
- return ((Class<? extends EditPart>) clazz);
- } catch (Exception e) {
- throw new Exception("unable to create Extension" + e);
- }
- }
-
- /**
- * Load an instance of a class
- *
- * @param element
- * the extension point
- * @param classAttribute
- * the name of the class to load
- * @return the loaded Class
- * @throws Exception
- * if the class is not loaded
- */
- protected static Object createExtension(final IConfigurationElement element, final String classAttribute) throws Exception {
- try {
- Bundle extensionBundle = Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier());
- @SuppressWarnings("rawtypes")
- Class clazz = extensionBundle.loadClass(classAttribute);
- Object obj = clazz.newInstance();
- return obj;
- } catch (Exception e) {
- throw new Exception("unable to create Extension" + e);
- }
- }
-
- /**
- * @param editPart
- * @return {@link ISynchroSemanticChild} from a editpart or null
- */
- public ISynchroSemanticChild getSynchroSemanticChild(Class<? extends EditPart> editPart) {
- if (semanticMap.get(editPart) != null) {
- return semanticMap.get(editPart).getSynchroSemanticChild();
- }
- return null;
- }
-
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/editpolicy/SynchronizeViewEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/editpolicy/SynchronizeViewEditPolicy.java
deleted file mode 100644
index c985ac644d7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/src/org/eclipse/papyrus/uml/diagram/synchronizeview/editpolicy/SynchronizeViewEditPolicy.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*****************************************************************************
- * 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.synchronizeview.editpolicy;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.synchronizeview.customization.ISynchroSemanticChild;
-import org.eclipse.papyrus.uml.diagram.synchronizeview.customization.SynchroSemanticChildRegistry;
-import org.eclipse.uml2.uml.Element;
-
-/**
- * this edit policy is used to allowing synchronization between graphical element and element in the model
- * It is based on canonical editpolicy but it has several differencies:
- * - View Service cannot be called. To call it we need to get the identifier of the child that could be place in compartment. I is not possible to
- * find in a generic way
- * --> link to each Diagram Updater, and moreover some child has been created by custom code. In fact, the hierarchy of visual element must follow the
- * hierachy of semantic element.
- * --> this is not the case so the Diagram updater generated from the gmfgen has not the good info.
- * To allow the creation we base our work on the mechanism of the drop.
- */
-public class SynchronizeViewEditPolicy extends CanonicalEditPolicy {
-
- ISynchroSemanticChild synchroSemanticChild = null;
-
- EObject derivedSemanticHost = null;
-
- @Override
- public void activate() {
- super.activate();
- synchroSemanticChild = SynchroSemanticChildRegistry.getInstance().getSynchroSemanticChild(getHost().getClass());
- if (synchroSemanticChild != null) {
- derivedSemanticHost = synchroSemanticChild.getSemanticEObjectToListen((getSemanticHost()));
- if (derivedSemanticHost != null) {
- addListenerFilter("SYNCHRONIZE", this, derivedSemanticHost);
- }
- }
- }
-
- @Override
- public boolean isEnabled() {
- // by default there is no synchronization
- if (getCanonicalStyle() == null) {
- return false;
- }
- return super.isEnabled();
- }
-
- @Override
- protected List<EObject> getSemanticChildrenList() {
- ArrayList<EObject> result = new ArrayList<EObject>();
- Class<? extends EditPart> EditPart = getHost().getClass();
- ISynchroSemanticChild synchroSemanticChild = SynchroSemanticChildRegistry.getInstance().getSynchroSemanticChild(EditPart);
- if (synchroSemanticChild != null) {
- ArrayList<EObject> ancestor = getAllEObjectAncestor();
- List<EObject> tmplist = (synchroSemanticChild.getSynchroSemanticChild((getSemanticHost())));
- for (Iterator<EObject> iterator = tmplist.iterator(); iterator.hasNext();) {
- EObject eObject = iterator.next();
- if (ancestor.contains(eObject)) {
- return Collections.emptyList();
- }
- }
- return tmplist;
- }
- if (getSemanticHost() instanceof Element) {
- result.addAll(((Element) getSemanticHost()).getOwnedElements());
- return result;
- }
-
- return result;
- }
-
-
- /**
- * This method is used to calculate if a semantic element has been already display in parent to avoid loop of display
- *
- * @return the list of all semantic element display by parents edipart.
- */
- protected ArrayList<EObject> getAllEObjectAncestor() {
- ArrayList<EObject> ancestor = new ArrayList<EObject>();
- EditPart currentEditPart = getHost();
- if (currentEditPart.getModel() instanceof View) {
- ancestor.add(((View) currentEditPart.getModel()).getElement());
- }
- while (currentEditPart.getParent() != null) {
- currentEditPart = currentEditPart.getParent();
- if (currentEditPart.getModel() instanceof View) {
- ancestor.add(((View) currentEditPart.getModel()).getElement());
- }
- }
- return ancestor;
-
- }
-
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- if (synchroSemanticChild != null) {
- if (derivedSemanticHost == null && (synchroSemanticChild.getSemanticEObjectToListen((getSemanticHost())) != null)) {
- derivedSemanticHost = synchroSemanticChild.getSemanticEObjectToListen((getSemanticHost()));
- addListenerFilter("SYNCHRONIZE", this, derivedSemanticHost);
- }
- }
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy#refreshSemantic()
- * In order to connect the drop mechanism this method has be overloaded
- */
- @Override
- protected void refreshSemantic() {
- List<IAdaptable> createdViews = refreshSemanticChildrenByDrop();
- makeViewsImmutable(createdViews);
- }
-
- /**
- * this method is extracted from refreshSemanticChildren
- * but instead of using the service view it uses the drop
- *
- * @return
- */
- protected List<IAdaptable> refreshSemanticChildrenByDrop() {
- // -------------- code from superClass----------------
- // Don't try to refresh children if the semantic element
- // cannot be resolved.
- if (resolveSemanticElement() == null) {
- return Collections.emptyList();
- }
-
- // current views
- List<View> viewChildren = getViewChildren();
- List<EObject> semanticChildren = new ArrayList<EObject>(getSemanticChildrenList());
-
- List<View> orphaned = cleanCanonicalSemanticChildren(viewChildren, semanticChildren);
- boolean changed = false;
- //
- // delete all the remaining orphaned views
- if (!orphaned.isEmpty()) {
- changed = deleteViews(orphaned.iterator());
- }
-
- //
- // create a view for each remaining semantic element.
- List<IAdaptable> createdViews = Collections.emptyList();
- if (!semanticChildren.isEmpty()) {
- createdViews = createViews(semanticChildren);
- }
-
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
-
-
- return createdViews;
- }
-
- @Override
- protected Command getCreateViewCommand(CreateRequest request) {
- // transform the request to drop request
- if (request instanceof CreateViewRequest) {
- CreateViewRequest createViewRequest = (CreateViewRequest) request;
- createViewRequest.getViewDescriptors();
-
- CompoundCommand compoundCommand = new CompoundCommand();
- for (Iterator<? extends ViewDescriptor> iterator = createViewRequest.getViewDescriptors().iterator(); iterator.hasNext();) {
- ViewDescriptor viewDescriptor = iterator.next();
- EObject element = (EObject) viewDescriptor.getElementAdapter().getAdapter(EObject.class);
-
- if (element != null) {
- ArrayList<EObject> elementToDrop = new ArrayList<EObject>();
- elementToDrop.add(element);
- DropObjectsRequest dropRequest = new DropObjectsRequest();
- dropRequest.setObjects(elementToDrop);
- dropRequest.setLocation(createViewRequest.getLocation());
-
- Command cmd = getHost().getCommand(dropRequest);
- if (cmd != null && cmd.canExecute()) {
- compoundCommand.add(cmd);
- }
- }
-
- }
- return compoundCommand;
-
- }
- Command cmd = super.getCreateViewCommand(request);
-
- return cmd;
- }
-
- @Override
- protected boolean shouldDeleteView(View view) {
- // in order to avoid duplication of views allow deleting of edges
- if (view instanceof Edge && view.getElement() == null) {
-
- return true;
- }
- // it is managed by the service edit.
- return false;
- }
-
-
- @SuppressWarnings("unchecked")
- @Override
- protected List<View> getViewChildren() {
- List<View> children = super.getViewChildren();
- children.addAll(((GraphicalEditPart) getHost()).getNotationView().getDiagram().getEdges());
- return children;
- }
-
-}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/UMLUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/UMLUtil.java
index 5f30dc7e55a..27b14e0f2fe 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/UMLUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/UMLUtil.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,12 +9,14 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 444092
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.uml.tools.utils;
import java.util.Collection;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
@@ -30,6 +32,7 @@ import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Connector;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.Message;
@@ -37,10 +40,15 @@ import org.eclipse.uml2.uml.MessageEvent;
import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Relationship;
import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Transition;
import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableSet;
+
/**
* A Helper class for UML
*
@@ -50,6 +58,14 @@ import org.eclipse.uml2.uml.UMLPackage;
// specification for some cases.
public class UMLUtil {
+ private static final Set<EClass> relationshipLikeUMLMetaclasses = ImmutableSet.of(
+ UMLPackage.Literals.RELATIONSHIP,
+ UMLPackage.Literals.GENERALIZATION_SET,
+ UMLPackage.Literals.CONNECTOR,
+ UMLPackage.Literals.ACTIVITY_EDGE,
+ UMLPackage.Literals.TRANSITION,
+ UMLPackage.Literals.MESSAGE);
+
/**
* Retrieve the UML semantic element from the given Object.
* This method relies on {@link EMFHelper#getEObject(Object)} to resolve
@@ -480,4 +496,40 @@ public class UMLUtil {
element.destroy();
}
}
+
+ /**
+ * Queries whether an {@code element} is a UML {@link Relationship} or something like a relationship
+ * (e.g., a {@link Connector} or a {@link Transition}).
+ *
+ * @param element
+ * an element
+ * @return whether it is a relationship-like element, that usually would be visualized as a connection on a diagram
+ */
+ public static boolean isRelationship(Element element) {
+ EClass eClass = element.eClass();
+ boolean result = relationshipLikeUMLMetaclasses.contains(eClass);
+
+ if (!result) {
+ for (Iterator<EClass> super_ = eClass.getEAllSuperTypes().iterator(); !result && super_.hasNext();) {
+ result = relationshipLikeUMLMetaclasses.contains(super_.next());
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Obtains an {@linkplain #isRelationship(Element) is-relationship} predicate.
+ *
+ * @return the predicate
+ *
+ * @see #isRelationship(Element)
+ */
+ public static Predicate<Element> isRelationship() {
+ return new Predicate<Element>() {
+ public boolean apply(Element input) {
+ return isRelationship(input);
+ }
+ };
+ }
}
diff --git a/releng/top-pom-main-tests.xml b/releng/top-pom-main-tests.xml
index b3221109e09..0513a482420 100644
--- a/releng/top-pom-main-tests.xml
+++ b/releng/top-pom-main-tests.xml
@@ -1,367 +1,368 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.tests</module>
- <module>../tests/junit/plugins/suites/org.eclipse.papyrus.tests.diagramassistants</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.core.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.nattable.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.diagram.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.nattable.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.assistants.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.nattable.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.tools.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.views.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.uml.textedit.tests.feature</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.elementtypesconfigurations.tests</module>
- <module>../tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests</module>
- <module>../tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests</module>
- <module>../tests/junit/plugins/infra/org.eclipse.papyrus.infra.filters.tests</module>
- <module>../tests/junit/plugins/infra/org.eclipse.papyrus.infra.tools.tests</module>
- <module>../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests</module>
- <module>../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests</module>
- <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands.tests</module>
- <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests</module>
- <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests</module>
- <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu.tests</module>
- <module>../tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests</module>
- <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.tests</module>
- <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests</module>
- <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests</module>
- <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests</module>
- <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests</module>
- <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests</module>
- <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests</module>
- <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework</module>
- <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils</module>
- <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests</module>
- <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests</module>
- <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests</module>
- <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests</module>
- <module>../tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests</module>
- <module>../tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.tests</module>
- <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests</module>
- <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.service.types.tests</module>
- <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests</module>
- <module>../tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests</module>
- <module>../tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.tests</module>
- <module>../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests</module>
- <module>../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests</module>
- <module>../tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests</module>
- <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.tests</module>
- <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.tests</module>
- <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests</module>
- <module>../tests/junit/plugins/uml/org.eclipse.papyrus.search.tests</module>
- <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.filters.tests</module>
- <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.modelrepair.tests</module>
- <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests</module>
- <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests</module>
- <module>../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests</module>
- <module>../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils.tests</module>
- <module>../tests/junit/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.tests</module>
- <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.tests</module>
- <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.tests</module>
- <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.tests</module>
- <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.tests</module>
- <module>../tests/junit/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter.tests</module>
- </modules>
- <properties>
- <tycho-version>0.22.0</tycho-version>
- <tychoExtrasVersion>0.22.0</tychoExtrasVersion>
- <testConfig>CI_TESTS_CONFIG</testConfig> <!-- See org.eclipse.papyrus.junit.framework.classification.ClassificationConfig -->
- <testSuitePlugin>org.eclipse.papyrus.tests</testSuitePlugin>
- <testSuiteClass>org.eclipse.papyrus.tests.AllTests</testSuiteClass>
- </properties>
- <repositories>
- <repository>
- <id>papyrus-main</id>
- <layout>p2</layout>
- <url>${papyrus.repo.main}</url>
- </repository>
- <repository>
- <id>emf-compare</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF COMPARE",0) -->
- <url>http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201503131342</url>
- </repository>
- <repository>
- <id>emf-emf</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF (Core)",0) -->
- <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
- </repository>
- <repository>
- <id>emft-mwe[0]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",0) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201503240644/mwe</url>
- </repository>
- <repository>
- <id>emft-mwe[1]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",1) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201503240833/mwe2lang</url>
- </repository>
- <repository>
- <id>emf-transaction</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF TRANSACTION",0) -->
- <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201503250534</url>
- </repository>
- <repository>
- <id>emf-validation</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF VALIDATION",0) -->
- <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201503250348</url>
- </repository>
- <repository>
- <id>ep</id>
- <layout>p2</layout>
- <!-- updateFrom("Eclipse",0) -->
- <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M6-201503200800/</url>
- </repository>
- <repository>
- <id>gef</id>
- <layout>p2</layout>
- <!-- updateFrom("GEF",0) -->
- <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
- </repository>
- <repository>
- <id>gmp-gmf-notation</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Notation",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201503250354</url>
- </repository>
- <repository>
- <id>gmp-gmf-runtime</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Runtime",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201502040533</url>
- </repository>
- <repository>
- <id>gmf-tooling</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Tooling",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.3/M4</url>
- </repository>
- <repository>
- <id>m2t-acceleo</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T ACCELEO",0) -->
- <url>http://download.eclipse.org/acceleo/updates/milestones/3.6/S201503131323</url>
- </repository>
- <repository>
- <id>m2t-xpand</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T XPAND",0) -->
- <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201503240650/</url>
- </repository>
- <repository>
- <id>mdt-ocl</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT OCL 6.0",0) -->
- <url>http://download.eclipse.org/modeling/mdt/ocl/updates/milestones/6.0.0/S201503240634</url>
- </repository>
- <repository>
- <id>mdt-uml2</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT UML2",0) -->
- <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.1milestones</url>
- </repository>
- <repository>
- <id>mmt-qvto</id>
- <layout>p2</layout>
- <!-- updateFrom("QVT Operational",0) -->
- <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.5.0/S201503241740</url>
- </repository>
- <repository>
- <id>nattable</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/nattable/releases/1.2.0/repository/</url>
- </repository>
- <repository>
- <id>orbit</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20150124073747/repository</url>
- </repository>
- <repository>
- <id>subversive</id>
- <layout>p2</layout>
- <!-- updateFrom("Subversive",0) -->
- <url>http://download.eclipse.org/technology/subversive/3.0/mars-site/</url>
- </repository>
- <repository>
- <id>tmf-xtext</id>
- <layout>p2</layout>
- <!-- updateFrom("Xtext, Xtend",0) -->
- <url>http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.8.1/</url>
- </repository>
- <repository>
- <id>swtbot</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/technology/swtbot/snapshots</url>
- </repository>
- <repository>
- <id>webtools</id>
- <layout>p2</layout>
- <!-- updateFrom("WebTools",0) -->
- <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M6-20150324000117/repository/</url>
- </repository>
- <repository>
- <id>XWT</id>
- <layout>p2</layout>
- <!-- updateFrom("XWT",0) -->
- <url>http://download.eclipse.org/xwt/release-1.1.0</url>
- </repository>
- </repositories>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <optimize>true</optimize>
- <showWarnings>true</showWarnings>
- <!-- Tycho build using the project's JDT settings. -->
- <useProjectSettings>true</useProjectSettings>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <environments>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-repository-plugin</artifactId>
- <version>${tycho-version}</version>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>${testSuitePlugin}</testSuite>
- <testClass>${testSuiteClass}</testClass>
- <useUIHarness>true</useUIHarness>
- <useUIThread>true</useUIThread>
- <testFailureIgnore>true</testFailureIgnore>
- <argLine>-Xms512m -Xmx2048m -XX:MaxPermSize=512M -XX:SoftRefLRUPolicyMSPerMB=100</argLine>
- <appArgLine>-testConfig=${testConfig}</appArgLine>
- <product>org.eclipse.sdk.ide</product>
-
- <dependencies>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.sdk.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.papyrus.sdk.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- </dependencies>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.tests</module>
+ <module>../tests/junit/plugins/suites/org.eclipse.papyrus.tests.diagramassistants</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.core.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.nattable.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.diagram.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.nattable.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.assistants.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.nattable.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.tools.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.views.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.uml.textedit.tests.feature</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.elementtypesconfigurations.tests</module>
+ <module>../tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests</module>
+ <module>../tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests</module>
+ <module>../tests/junit/plugins/infra/org.eclipse.papyrus.infra.filters.tests</module>
+ <module>../tests/junit/plugins/infra/org.eclipse.papyrus.infra.tools.tests</module>
+ <module>../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests</module>
+ <module>../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests</module>
+ <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests</module>
+ <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands.tests</module>
+ <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests</module>
+ <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests</module>
+ <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu.tests</module>
+ <module>../tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests</module>
+ <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.tests</module>
+ <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests</module>
+ <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests</module>
+ <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests</module>
+ <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests</module>
+ <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests</module>
+ <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests</module>
+ <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework</module>
+ <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils</module>
+ <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests</module>
+ <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests</module>
+ <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests</module>
+ <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests</module>
+ <module>../tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests</module>
+ <module>../tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.tests</module>
+ <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests</module>
+ <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.service.types.tests</module>
+ <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests</module>
+ <module>../tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.tests</module>
+ <module>../tests/junit/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.tests</module>
+ <module>../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests</module>
+ <module>../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests</module>
+ <module>../tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests</module>
+ <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.tests</module>
+ <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.tests</module>
+ <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests</module>
+ <module>../tests/junit/plugins/uml/org.eclipse.papyrus.search.tests</module>
+ <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.filters.tests</module>
+ <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.modelrepair.tests</module>
+ <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests</module>
+ <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests</module>
+ <module>../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests</module>
+ <module>../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils.tests</module>
+ <module>../tests/junit/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.tests</module>
+ <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.tests</module>
+ <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.tests</module>
+ <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.tests</module>
+ <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.tests</module>
+ <module>../tests/junit/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter.tests</module>
+ </modules>
+ <properties>
+ <tycho-version>0.22.0</tycho-version>
+ <tychoExtrasVersion>0.22.0</tychoExtrasVersion>
+ <testConfig>CI_TESTS_CONFIG</testConfig> <!-- See org.eclipse.papyrus.junit.framework.classification.ClassificationConfig -->
+ <testSuitePlugin>org.eclipse.papyrus.tests</testSuitePlugin>
+ <testSuiteClass>org.eclipse.papyrus.tests.AllTests</testSuiteClass>
+ </properties>
+ <repositories>
+ <repository>
+ <id>papyrus-main</id>
+ <layout>p2</layout>
+ <url>${papyrus.repo.main}</url>
+ </repository>
+ <repository>
+ <id>emf-compare</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF COMPARE",0) -->
+ <url>http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201503131342</url>
+ </repository>
+ <repository>
+ <id>emf-emf</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF (Core)",0) -->
+ <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[0]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",0) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201503240644/mwe</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[1]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",1) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201503240833/mwe2lang</url>
+ </repository>
+ <repository>
+ <id>emf-transaction</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF TRANSACTION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201503250534</url>
+ </repository>
+ <repository>
+ <id>emf-validation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF VALIDATION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201503250348</url>
+ </repository>
+ <repository>
+ <id>ep</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Eclipse",0) -->
+ <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M6-201503200800/</url>
+ </repository>
+ <repository>
+ <id>gef</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GEF",0) -->
+ <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-notation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Notation",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201503250354</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-runtime</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Runtime",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201502040533</url>
+ </repository>
+ <repository>
+ <id>gmf-tooling</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Tooling",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.3/M4</url>
+ </repository>
+ <repository>
+ <id>m2t-acceleo</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T ACCELEO",0) -->
+ <url>http://download.eclipse.org/acceleo/updates/milestones/3.6/S201503131323</url>
+ </repository>
+ <repository>
+ <id>m2t-xpand</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T XPAND",0) -->
+ <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201503240650/</url>
+ </repository>
+ <repository>
+ <id>mdt-ocl</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT OCL 6.0",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/ocl/updates/milestones/6.0.0/S201503240634</url>
+ </repository>
+ <repository>
+ <id>mdt-uml2</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT UML2",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.1milestones</url>
+ </repository>
+ <repository>
+ <id>mmt-qvto</id>
+ <layout>p2</layout>
+ <!-- updateFrom("QVT Operational",0) -->
+ <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.5.0/S201503241740</url>
+ </repository>
+ <repository>
+ <id>nattable</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/nattable/releases/1.2.0/repository/</url>
+ </repository>
+ <repository>
+ <id>orbit</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20150124073747/repository</url>
+ </repository>
+ <repository>
+ <id>subversive</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Subversive",0) -->
+ <url>http://download.eclipse.org/technology/subversive/3.0/mars-site/</url>
+ </repository>
+ <repository>
+ <id>tmf-xtext</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Xtext, Xtend",0) -->
+ <url>http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.8.1/</url>
+ </repository>
+ <repository>
+ <id>swtbot</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/technology/swtbot/snapshots</url>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <layout>p2</layout>
+ <!-- updateFrom("WebTools",0) -->
+ <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M6-20150324000117/repository/</url>
+ </repository>
+ <repository>
+ <id>XWT</id>
+ <layout>p2</layout>
+ <!-- updateFrom("XWT",0) -->
+ <url>http://download.eclipse.org/xwt/release-1.1.0</url>
+ </repository>
+ </repositories>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <optimize>true</optimize>
+ <showWarnings>true</showWarnings>
+ <!-- Tycho build using the project's JDT settings. -->
+ <useProjectSettings>true</useProjectSettings>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>${testSuitePlugin}</testSuite>
+ <testClass>${testSuiteClass}</testClass>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <testFailureIgnore>true</testFailureIgnore>
+ <argLine>-Xms512m -Xmx2048m -XX:MaxPermSize=512M -XX:SoftRefLRUPolicyMSPerMB=100</argLine>
+ <appArgLine>-testConfig=${testConfig}</appArgLine>
+ <product>org.eclipse.sdk.ide</product>
+
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.sdk.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.papyrus.sdk.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/releng/top-pom-main.xml b/releng/top-pom-main.xml
index cb10069f60d..850ce9b4031 100644
--- a/releng/top-pom-main.xml
+++ b/releng/top-pom-main.xml
@@ -1,878 +1,878 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.customization.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.doc.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.editor.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.emf.facet.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.discovery.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.emf.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.css.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.nattable.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.services.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.widget.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sdk.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.diagram.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.modelexplorer.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.nattable.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.properties.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.alf.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.assistants.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.css.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.modelexplorer.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.nattable.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.properties.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.search.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.tools.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.xtext.integration.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.views.modelexplorer.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.views.properties.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.views.search.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.views.validation.feature</module>
- <module>../plugins/doc</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.palette</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.paletteconfiguration</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.properties</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.properties.generation</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt</module>
- <module>../plugins/editor/org.eclipse.papyrus.editor</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel.edit</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.sdk.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.sdk.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.catalog</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.editor</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.sdk.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.metamodel</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.sdk.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.metamodel</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.sdk.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.catalog</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.jface.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.pde.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.swt</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors.ecore</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.ui</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.constraints</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.constraints.edit</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.constraints.editor</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.log</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di</module>
- <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery</module>
- <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui</module>
- <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu</module>
- <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf</module>
- <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance</module>
- <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable</module>
- <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations.edit</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations.editor</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations.emf</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations.invarianttypes</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.filters</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.filters.edit</module>
- <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.elementtypesconfigurations</module>
- <module>../plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant</module>
- <module>../plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit</module>
- <module>../plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor</module>
- <module>../plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.hyperlink</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.newchild</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.newchild.edit</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.onefile</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.psf</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.history</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.decoration</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.edit</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.localizer</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.markerlistener</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.navigation</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.openelement</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.preferences</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.semantic</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.validation</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.viewersearch</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.viewlabelprovider</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.tools</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.ui.resources</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences</module>
- <module>../plugins/infra/widget/org.eclipse.papyrus.infra.widgets</module>
- <module>../plugins/infra/widget/org.eclipse.papyrus.infra.widgets.toolbox</module>
- <module>../plugins/sysml/org.eclipse.papyrus.sysml</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.css</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui</module>
- <module>../plugins/sysml/org.eclipse.papyrus.sysml.edit</module>
- <module>../plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config</module>
- <module>../plugins/sysml/properties/org.eclipse.papyrus.sysml.properties</module>
- <module>../plugins/sysml/org.eclipse.papyrus.sysml.service.types</module>
- <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf</module>
- <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.common</module>
- <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.common.ui</module>
- <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui</module>
- <module>../plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator</module>
- <module>../plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.ui</module>
- <module>../plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator</module>
- <module>../plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui</module>
- <module>../plugins/uml/newchild/org.eclipse.papyrus.uml.profile.newchildmenu.generator</module>
- <module>../plugins/uml/newchild/org.eclipse.papyrus.uml.profile.newchildmenu.generator.ui</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.appearance</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.commands</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.controlmode.profile</module>
- <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel</module>
- <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode</module>
- <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties</module>
- <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.groups</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.palette.customaction</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.icons</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols.properties</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.documentation.profile</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.extensionpoints</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.filters</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.filters.edit</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.icons</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.import</module>
- <module>../plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer</module>
- <module>../plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.widgets</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.modelrepair</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.navigation</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.oclconstraintevaluation</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.perspective</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.profile</module>
- <module>../plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter</module>
- <module>../plugins/uml/properties/org.eclipse.papyrus.uml.properties</module>
- <module>../plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.resourceloading.profile</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.search.ui</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.service.types</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.service.validation</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.services.decoration</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.templaterepository</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.javaconstraint</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.transition.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.transition.xtext.ui</module>
- <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools</module>
- <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes</module>
- <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils</module>
- <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.core</module>
- <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui</module>
- <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.validation</module>
- <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer</module>
- <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.newchild</module>
- <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.resourceloading</module>
- <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.widgets</module>
- <module>../plugins/views/properties/org.eclipse.papyrus.views.properties</module>
- <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model</module>
- <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model.edit</module>
- <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model.editor</module>
- <module>../plugins/views/org.eclipse.papyrus.views.search</module>
- <module>../plugins/views/validation/org.eclipse.papyrus.views.validation</module>
- <module>../plugins/team/org.eclipse.papyrus.team.svn</module>
- <module>main</module>
- <!-- Papyrus Sysml 1.4 -->
- <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14</module>
- <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui</module>
- <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common</module>
- <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition</module>
- <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock</module>
- <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric</module>
- <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement</module>
- <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.edit</module>
- <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types</module>
- <!-- Papyrus examples -->
- <module>../examples/core/org.eclipse.papyrus.example.core.lifecycleevents</module>
- <module>../examples/core/org.eclipse.papyrus.example.core.sashwindows.fulleditor</module>
- <module>../examples/core/org.eclipse.papyrus.example.core.sashwindows.simpleeditor</module>
- <module>../examples/infra/org.eclipse.papyrus.example.infra.servicesregistry.retrieval</module>
- <module>../examples/org.eclipse.papyrus.example.text.instance</module>
- <module>../examples/org.eclipse.papyrus.example.uml.comment.editor.newresource</module>
- <module>../examples/org.eclipse.papyrus.example.uml.comment.editor.sharedresource</module>
- <module>../examples/infra/org.eclipse.papyrus.infra.gmfdiag.connectionpoint.preferences</module>
- <module>../examples/emf/org.eclipse.papyrus.outline.emftree</module>
- <module>../examples/uml/org.eclipse.papyrus.thousandcreation</module>
- <module>../examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation</module>
-
-
- </modules>
- <properties>
- <tycho-version>0.22.0</tycho-version>
- <tychoExtrasVersion>0.22.0</tychoExtrasVersion>
- <findbugs.version>2.5.3</findbugs.version>
- <xtext.version>2.7.3</xtext.version>
- <java.source.version>1.6</java.source.version>
- <java.target.version>1.6</java.target.version>
- <papyrus.eclipse.target>mars</papyrus.eclipse.target>
- <mylyn.wikitext.version>2.4.0-SNAPSHOT</mylyn.wikitext.version>
- </properties>
- <repositories>
- <repository>
- <id>emf-emf</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF (Core)",0) -->
- <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
- </repository>
- <repository>
- <id>emft-mwe[0]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",0) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201503240644/mwe</url>
- </repository>
- <repository>
- <id>emft-mwe[1]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",1) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201503240833/mwe2lang</url>
- </repository>
- <repository>
- <id>emf-transaction</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF TRANSACTION",0) -->
- <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201503250534</url>
- </repository>
- <repository>
- <id>emf-validation</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF VALIDATION",0) -->
- <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201503250348</url>
- </repository>
- <repository>
- <id>ep</id>
- <layout>p2</layout>
- <!-- updateFrom("Eclipse",0) -->
- <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M6-201503200800/</url>
- </repository>
- <repository>
- <id>gef</id>
- <layout>p2</layout>
- <!-- updateFrom("GEF",0) -->
- <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
- </repository>
- <repository>
- <id>gmp-gmf-notation</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Notation",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201503250354</url>
- </repository>
- <repository>
- <id>gmp-gmf-runtime</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Runtime",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201502040533</url>
- </repository>
- <repository>
- <id>gmf-tooling</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Tooling",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.3/M4</url>
- </repository>
- <repository>
- <id>m2t-xpand</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T XPAND",0) -->
- <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201503240650/</url>
- </repository>
- <repository>
- <id>mdt-ocl</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT OCL 6.0",0) -->
- <url>http://download.eclipse.org/modeling/mdt/ocl/updates/milestones/6.0.0/S201503240634</url>
- </repository>
- <repository>
- <id>mdt-uml2</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT UML2",0) -->
- <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.1milestones</url>
- </repository>
- <repository>
- <id>mmt-qvto</id>
- <layout>p2</layout>
- <!-- updateFrom("QVT Operational",0) -->
- <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.5.0/S201503241740</url>
- </repository>
- <repository>
- <id>nattable</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/nattable/releases/1.2.0/repository/</url>
- </repository>
- <repository>
- <id>nebula-tablecombo</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/technology/nebula/archives/Q12015/release/</url>
- </repository>
- <repository>
- <id>orbit</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20150124073747/repository</url>
- </repository>
- <repository>
- <id>tmf-xtext</id>
- <layout>p2</layout>
- <!-- updateFrom("Xtext, Xtend",0) -->
- <url>http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.8.1/</url>
- </repository>
- <repository>
- <id>webtools</id>
- <layout>p2</layout>
- <!-- updateFrom("WebTools",0) -->
- <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M6-20150324000117/repository/</url>
- </repository>
- <repository>
- <id>XWT</id>
- <layout>p2</layout>
- <!-- updateFrom("XWT",0) -->
- <url>http://download.eclipse.org/xwt/release-1.1.0</url>
- </repository>
- <repository>
- <id>subversive</id>
- <layout>p2</layout>
- <!-- updateFrom("Subversive",0) -->
- <url>http://download.eclipse.org/technology/subversive/3.0/mars-site/</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>org.eclipse.cbi.maven.plugins</id>
- <name>Eclipse CBI</name>
- <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- <pluginRepository>
- <id>eclipse.org-mylyn</id>
- <!-- url>https://repo.eclipse.org/content/repositories/mylyn-releases/</url -->
- <url>https://repo.eclipse.org/content/repositories/mylyn/</url>
- </pluginRepository>
- </pluginRepositories>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.2</version>
- <configuration>
- <source>${java.source.version}</source>
- <target>${java.target.version}</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.6</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.9.1</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.2.1</version>
- </plugin>
- <plugin>
- <groupId>org.eclipse.xtend</groupId>
- <artifactId>xtend-maven-plugin</artifactId>
- <version>${xtext.version}</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <optimize>true</optimize>
- <showWarnings>true</showWarnings>
- <!-- Tycho build using the project's JDT settings. -->
- <useProjectSettings>true</useProjectSettings>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <environments>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.mylyn.docs</groupId>
- <artifactId>org.eclipse.mylyn.wikitext.core.maven</artifactId>
- <version>${mylyn.wikitext.version}</version>
- </plugin>
- <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>
- org.eclipse.mylyn.docs
- </groupId>
- <artifactId>
- org.eclipse.mylyn.wikitext.core.maven
- </artifactId>
- <versionRange>
- [2.4.0-SNAPSHOT,)
- </versionRange>
- <goals>
- <goal>eclipse-help</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <execute/>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-repository-plugin</artifactId>
- <version>${tycho-version}</version>
- </plugin>
- <!-- Sources -->
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>plugin-source</id>
- <goals>
- <goal>plugin-source</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-source-feature-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>source-feature</id>
- <phase>package</phase>
- <goals>
- <goal>source-feature</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.customization.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.doc.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.editor.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.emf.facet.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.discovery.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.emf.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.css.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.nattable.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.services.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.widget.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sdk.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.diagram.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.modelexplorer.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.nattable.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.properties.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.alf.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.assistants.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.css.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.modelexplorer.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.nattable.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.properties.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.search.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.tools.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.xtext.integration.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.views.modelexplorer.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.views.properties.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.views.search.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.views.validation.feature</module>
+ <module>../plugins/doc</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.palette</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.paletteconfiguration</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.properties</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.properties.generation</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt</module>
+ <module>../plugins/editor/org.eclipse.papyrus.editor</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel.edit</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.sdk.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.sdk.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.catalog</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.editor</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.sdk.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.metamodel</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.sdk.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.metamodel</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.sdk.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.catalog</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.jface.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.pde.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.swt</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors.ecore</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.ui</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.constraints</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.constraints.edit</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.constraints.editor</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.log</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di</module>
+ <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery</module>
+ <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui</module>
+ <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu</module>
+ <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf</module>
+ <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance</module>
+ <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable</module>
+ <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations.edit</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations.editor</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations.emf</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.elementtypesconfigurations.invarianttypes</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.filters</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.filters.edit</module>
+ <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.elementtypesconfigurations</module>
+ <module>../plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant</module>
+ <module>../plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.edit</module>
+ <module>../plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor</module>
+ <module>../plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.ui</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.hyperlink</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.newchild</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.newchild.edit</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.onefile</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.psf</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.history</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.decoration</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.edit</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.localizer</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.markerlistener</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.navigation</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.openelement</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.preferences</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.semantic</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.validation</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.viewersearch</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.viewlabelprovider</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.tools</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.ui.resources</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences</module>
+ <module>../plugins/infra/widget/org.eclipse.papyrus.infra.widgets</module>
+ <module>../plugins/infra/widget/org.eclipse.papyrus.infra.widgets.toolbox</module>
+ <module>../plugins/sysml/org.eclipse.papyrus.sysml</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.css</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui</module>
+ <module>../plugins/sysml/org.eclipse.papyrus.sysml.edit</module>
+ <module>../plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config</module>
+ <module>../plugins/sysml/properties/org.eclipse.papyrus.sysml.properties</module>
+ <module>../plugins/sysml/org.eclipse.papyrus.sysml.service.types</module>
+ <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf</module>
+ <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.common</module>
+ <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.common.ui</module>
+ <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui</module>
+ <module>../plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator</module>
+ <module>../plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator.ui</module>
+ <module>../plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator</module>
+ <module>../plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui</module>
+ <module>../plugins/uml/newchild/org.eclipse.papyrus.uml.profile.newchildmenu.generator</module>
+ <module>../plugins/uml/newchild/org.eclipse.papyrus.uml.profile.newchildmenu.generator.ui</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.appearance</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.commands</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.controlmode.profile</module>
+ <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel</module>
+ <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode</module>
+ <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties</module>
+ <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.groups</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.palette.customaction</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.icons</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols.properties</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.documentation.profile</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.extensionpoints</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.filters</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.filters.edit</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.icons</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.import</module>
+ <module>../plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer</module>
+ <module>../plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.widgets</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.modelrepair</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.navigation</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.oclconstraintevaluation</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.perspective</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.profile</module>
+ <module>../plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter</module>
+ <module>../plugins/uml/properties/org.eclipse.papyrus.uml.properties</module>
+ <module>../plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.resourceloading.profile</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.search.ui</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.service.types</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.service.validation</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.services.decoration</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.templaterepository</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.javaconstraint</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.transition.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.transition.xtext.ui</module>
+ <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools</module>
+ <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes</module>
+ <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils</module>
+ <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.core</module>
+ <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui</module>
+ <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.validation</module>
+ <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer</module>
+ <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.newchild</module>
+ <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.resourceloading</module>
+ <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.widgets</module>
+ <module>../plugins/views/properties/org.eclipse.papyrus.views.properties</module>
+ <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model</module>
+ <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model.edit</module>
+ <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model.editor</module>
+ <module>../plugins/views/org.eclipse.papyrus.views.search</module>
+ <module>../plugins/views/validation/org.eclipse.papyrus.views.validation</module>
+ <module>../plugins/team/org.eclipse.papyrus.team.svn</module>
+ <module>main</module>
+ <!-- Papyrus Sysml 1.4 -->
+ <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14</module>
+ <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui</module>
+ <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common</module>
+ <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition</module>
+ <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock</module>
+ <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric</module>
+ <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement</module>
+ <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.edit</module>
+ <module>../plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types</module>
+ <!-- Papyrus examples -->
+ <module>../examples/core/org.eclipse.papyrus.example.core.lifecycleevents</module>
+ <module>../examples/core/org.eclipse.papyrus.example.core.sashwindows.fulleditor</module>
+ <module>../examples/core/org.eclipse.papyrus.example.core.sashwindows.simpleeditor</module>
+ <module>../examples/infra/org.eclipse.papyrus.example.infra.servicesregistry.retrieval</module>
+ <module>../examples/org.eclipse.papyrus.example.text.instance</module>
+ <module>../examples/org.eclipse.papyrus.example.uml.comment.editor.newresource</module>
+ <module>../examples/org.eclipse.papyrus.example.uml.comment.editor.sharedresource</module>
+ <module>../examples/infra/org.eclipse.papyrus.infra.gmfdiag.connectionpoint.preferences</module>
+ <module>../examples/emf/org.eclipse.papyrus.outline.emftree</module>
+ <module>../examples/uml/org.eclipse.papyrus.thousandcreation</module>
+ <module>../examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation</module>
+
+
+ </modules>
+ <properties>
+ <tycho-version>0.22.0</tycho-version>
+ <tychoExtrasVersion>0.22.0</tychoExtrasVersion>
+ <findbugs.version>2.5.3</findbugs.version>
+ <xtext.version>2.7.3</xtext.version>
+ <java.source.version>1.6</java.source.version>
+ <java.target.version>1.6</java.target.version>
+ <papyrus.eclipse.target>mars</papyrus.eclipse.target>
+ <mylyn.wikitext.version>2.4.0-SNAPSHOT</mylyn.wikitext.version>
+ </properties>
+ <repositories>
+ <repository>
+ <id>emf-emf</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF (Core)",0) -->
+ <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[0]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",0) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201503240644/mwe</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[1]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",1) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201503240833/mwe2lang</url>
+ </repository>
+ <repository>
+ <id>emf-transaction</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF TRANSACTION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201503250534</url>
+ </repository>
+ <repository>
+ <id>emf-validation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF VALIDATION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201503250348</url>
+ </repository>
+ <repository>
+ <id>ep</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Eclipse",0) -->
+ <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M6-201503200800/</url>
+ </repository>
+ <repository>
+ <id>gef</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GEF",0) -->
+ <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-notation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Notation",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201503250354</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-runtime</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Runtime",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201502040533</url>
+ </repository>
+ <repository>
+ <id>gmf-tooling</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Tooling",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.3/M4</url>
+ </repository>
+ <repository>
+ <id>m2t-xpand</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T XPAND",0) -->
+ <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201503240650/</url>
+ </repository>
+ <repository>
+ <id>mdt-ocl</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT OCL 6.0",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/ocl/updates/milestones/6.0.0/S201503240634</url>
+ </repository>
+ <repository>
+ <id>mdt-uml2</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT UML2",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.1milestones</url>
+ </repository>
+ <repository>
+ <id>mmt-qvto</id>
+ <layout>p2</layout>
+ <!-- updateFrom("QVT Operational",0) -->
+ <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.5.0/S201503241740</url>
+ </repository>
+ <repository>
+ <id>nattable</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/nattable/releases/1.2.0/repository/</url>
+ </repository>
+ <repository>
+ <id>nebula-tablecombo</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/technology/nebula/archives/Q12015/release/</url>
+ </repository>
+ <repository>
+ <id>orbit</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20150124073747/repository</url>
+ </repository>
+ <repository>
+ <id>tmf-xtext</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Xtext, Xtend",0) -->
+ <url>http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.8.1/</url>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <layout>p2</layout>
+ <!-- updateFrom("WebTools",0) -->
+ <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M6-20150324000117/repository/</url>
+ </repository>
+ <repository>
+ <id>XWT</id>
+ <layout>p2</layout>
+ <!-- updateFrom("XWT",0) -->
+ <url>http://download.eclipse.org/xwt/release-1.1.0</url>
+ </repository>
+ <repository>
+ <id>subversive</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Subversive",0) -->
+ <url>http://download.eclipse.org/technology/subversive/3.0/mars-site/</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>org.eclipse.cbi.maven.plugins</id>
+ <name>Eclipse CBI</name>
+ <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>eclipse.org-mylyn</id>
+ <!-- url>https://repo.eclipse.org/content/repositories/mylyn-releases/</url -->
+ <url>https://repo.eclipse.org/content/repositories/mylyn/</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.2</version>
+ <configuration>
+ <source>${java.source.version}</source>
+ <target>${java.target.version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.9.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.xtend</groupId>
+ <artifactId>xtend-maven-plugin</artifactId>
+ <version>${xtext.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <optimize>true</optimize>
+ <showWarnings>true</showWarnings>
+ <!-- Tycho build using the project's JDT settings. -->
+ <useProjectSettings>true</useProjectSettings>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.mylyn.docs</groupId>
+ <artifactId>org.eclipse.mylyn.wikitext.core.maven</artifactId>
+ <version>${mylyn.wikitext.version}</version>
+ </plugin>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.eclipse.mylyn.docs
+ </groupId>
+ <artifactId>
+ org.eclipse.mylyn.wikitext.core.maven
+ </artifactId>
+ <versionRange>
+ [2.4.0-SNAPSHOT,)
+ </versionRange>
+ <goals>
+ <goal>eclipse-help</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute/>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <!-- Sources -->
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>plugin-source</id>
+ <goals>
+ <goal>plugin-source</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
<!--
No profile: Don't produce any artifact (update site). Used by Gerrit
findBugs: produce analysis reports. Activation: explicit ("Profiles")
packAndSign: produce a stable update site (Packed & signed). Used for releases (+ milestones) only. Activation: SIGN=true
pack: produce a simple update site (Packed). Used for nightly or feature branch builds. Activation: SIGN=false
- -->
- <profiles>
-
- <profile>
- <id>defaultProfile</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
-
- <profile>
- <id>findBugs</id> <!-- Analysis profile. Takes +1h -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <version>${findbugs.version}</version>
- <configuration>
- <findbugsXmlOutput>true</findbugsXmlOutput>
- <failOnError>false</failOnError>
- <maxHeap>1024</maxHeap>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
-
- <profile>
- <id>packAndSign</id> <!-- Stable release profile. Takes +30min. Eclipse servers only -->
- <!-- Pack200 -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200a-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>pack200-normalize</id>
- <goals>
- <goal>normalize</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.cbi.maven.plugins</groupId>
- <artifactId>eclipse-jarsigner-plugin</artifactId>
- <version>1.0.5</version>
- <executions>
- <execution>
- <id>sign</id>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200b-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>pack200-pack</id>
- <goals>
- <goal>pack</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <defaultP2Metadata>false</defaultP2Metadata>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <activation>
- <property>
- <name>SIGN</name>
- <value>true</value>
- </property>
- </activation>
- </profile>
-
-
- <profile>
- <id>pack</id> <!-- Nightly profile. Artifacts can be consumed, but are not signed -->
- <build>
- <plugins>
- <!-- Pack200 -->
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200b-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>pack200-pack</id>
- <goals>
- <goal>pack</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <defaultP2Metadata>false</defaultP2Metadata>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <activation>
- <property>
- <name>SIGN</name>
- <value>false</value>
- </property>
- </activation>
- </profile>
-
- <!-- nightly profile is usefull for developers that want to link to nightly build -->
- <profile>
- <id>nightly</id>
- <repositories>
- <repository>
- <id>papyrus-nightly</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/${papyrus.eclipse.target}/
- </url>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>daily</updatePolicy>
- <checksumPolicy>warn</checksumPolicy>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>daily</updatePolicy>
- <checksumPolicy>fail</checksumPolicy>
- </snapshots>
- </repository>
- </repositories>
- <activation>
- <property>
- <name>env</name>
- <value>devnightly</value>
- </property>
- <activeByDefault>false</activeByDefault>
- </activation>
- </profile>
- </profiles>
-</project>
+ -->
+ <profiles>
+
+ <profile>
+ <id>defaultProfile</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
+
+ <profile>
+ <id>findBugs</id> <!-- Analysis profile. Takes +1h -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>${findbugs.version}</version>
+ <configuration>
+ <findbugsXmlOutput>true</findbugsXmlOutput>
+ <failOnError>false</failOnError>
+ <maxHeap>1024</maxHeap>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+
+ <profile>
+ <id>packAndSign</id> <!-- Stable release profile. Takes +30min. Eclipse servers only -->
+ <!-- Pack200 -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200a-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-normalize</id>
+ <goals>
+ <goal>normalize</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.cbi.maven.plugins</groupId>
+ <artifactId>eclipse-jarsigner-plugin</artifactId>
+ <version>1.0.5</version>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <property>
+ <name>SIGN</name>
+ <value>true</value>
+ </property>
+ </activation>
+ </profile>
+
+
+ <profile>
+ <id>pack</id> <!-- Nightly profile. Artifacts can be consumed, but are not signed -->
+ <build>
+ <plugins>
+ <!-- Pack200 -->
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <property>
+ <name>SIGN</name>
+ <value>false</value>
+ </property>
+ </activation>
+ </profile>
+
+ <!-- nightly profile is usefull for developers that want to link to nightly build -->
+ <profile>
+ <id>nightly</id>
+ <repositories>
+ <repository>
+ <id>papyrus-nightly</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/${papyrus.eclipse.target}/
+ </url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>daily</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>daily</updatePolicy>
+ <checksumPolicy>fail</checksumPolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ <activation>
+ <property>
+ <name>env</name>
+ <value>devnightly</value>
+ </property>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ </profile>
+ </profiles>
+</project>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInTheDiagram.di b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.di
index 8634d4c00e0..bf9abab340f 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInTheDiagram.di
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.di
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.notation b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.notation
new file mode 100644
index 00000000000..50f74c0a930
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.notation
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_b2JjcMjxEeS9XIofcN-grg" type="PapyrusUMLClassDiagram" name="main" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_eDFVEMjxEeS9XIofcN-grg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_eDHKQMjxEeS9XIofcN-grg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_eDHKQcjxEeS9XIofcN-grg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_eDHKQsjxEeS9XIofcN-grg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_eDHxUMjxEeS9XIofcN-grg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_eDHxUcjxEeS9XIofcN-grg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_eDHxUsjxEeS9XIofcN-grg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_eDHxU8jxEeS9XIofcN-grg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_eDHxVMjxEeS9XIofcN-grg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_eDHxVcjxEeS9XIofcN-grg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_eDHxVsjxEeS9XIofcN-grg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_eDHxV8jxEeS9XIofcN-grg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_eDHxWMjxEeS9XIofcN-grg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_eDHxWcjxEeS9XIofcN-grg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_eDHxWsjxEeS9XIofcN-grg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_eDHxW8jxEeS9XIofcN-grg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_eDHxXMjxEeS9XIofcN-grg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_eDHxXcjxEeS9XIofcN-grg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_eDHxXsjxEeS9XIofcN-grg"/>
+ </children>
+ <element xmi:type="uml:Class" href="css_leaktest.uml#_eC9ZQMjxEeS9XIofcN-grg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_eDFVEcjxEeS9XIofcN-grg" x="47" y="21"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ggADcMjxEeS9XIofcN-grg" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ggAqgMjxEeS9XIofcN-grg" type="5023"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ggAqgcjxEeS9XIofcN-grg" type="8508">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ggAqgsjxEeS9XIofcN-grg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ggBRkMjxEeS9XIofcN-grg" type="7015">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ggBRkcjxEeS9XIofcN-grg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ggBRksjxEeS9XIofcN-grg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ggBRk8jxEeS9XIofcN-grg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ggBRlMjxEeS9XIofcN-grg"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="css_leaktest.uml#_gf9nMMjxEeS9XIofcN-grg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ggADccjxEeS9XIofcN-grg" x="252" y="17"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_i5ZjwMjxEeS9XIofcN-grg" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_i5aK0MjxEeS9XIofcN-grg" type="5026"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_i5aK0cjxEeS9XIofcN-grg" type="7016">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_yadd4MjxEeS9XIofcN-grg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yadd4cjxEeS9XIofcN-grg" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_i5aK0sjxEeS9XIofcN-grg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i5aK08jxEeS9XIofcN-grg"/>
+ </children>
+ <element xmi:type="uml:Package" href="css_leaktest.uml#_i5XukMjxEeS9XIofcN-grg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i5ZjwcjxEeS9XIofcN-grg" x="29" y="159" width="385" height="300"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_b2JjccjxEeS9XIofcN-grg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_b2JjcsjxEeS9XIofcN-grg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_b2Jjc8jxEeS9XIofcN-grg">
+ <owner xmi:type="uml:Model" href="css_leaktest.uml#_b0QGAMjxEeS9XIofcN-grg"/>
+ </styles>
+ <styles xmi:type="notation:EObjectListValueStyle" xmi:id="_yY3icMjxEeS9XIofcN-grg" name="css_stylesheets" eObjectListValue="_yY4wkMjxEeS9XIofcN-grg"/>
+ <element xmi:type="uml:Model" href="css_leaktest.uml#_b0QGAMjxEeS9XIofcN-grg"/>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_tfPhEMjxEeS9XIofcN-grg"/>
+ <css:EmbeddedStyleSheet xmi:id="_yY4wkMjxEeS9XIofcN-grg" label="canonical" content="Class, Enumeration, Package {&#xA; canonical: true&#xA;}"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.uml b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.uml
new file mode 100644
index 00000000000..c4c95eda8ff
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.uml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_b0QGAMjxEeS9XIofcN-grg" name="Model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_b0QtEMjxEeS9XIofcN-grg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_eC9ZQMjxEeS9XIofcN-grg" name="Class1"/>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_gf9nMMjxEeS9XIofcN-grg" name="Enumeration1"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_i5XukMjxEeS9XIofcN-grg" name="Package1"/>
+</uml:Model>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java
index 2df2fe2a585..f3a04ec9349 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014, 2015 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*/
package org.eclipse.papyrus.editor.integration.tests.tests;
@@ -16,6 +17,7 @@ import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
+import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
@@ -29,11 +31,16 @@ import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule;
import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule.SoftReferenceSensitive;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
import org.eclipse.papyrus.junit.utils.rules.PluginResource;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.nattable.menu.util.TableMenuUtils;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
import org.junit.Rule;
import org.junit.Test;
@@ -83,7 +90,7 @@ public class EditingScenariosMemoryLeakTest extends AbstractPapyrusTest {
IEditorPart tableEditor = fixture.getActiveEditor();
assertThat("Not a table editor", tableEditor, instanceOf(NatTableEditor.class));
- INattableModelManager manager = (INattableModelManager)tableEditor.getAdapter(INattableModelManager.class);
+ INattableModelManager manager = (INattableModelManager) tableEditor.getAdapter(INattableModelManager.class);
assertThat(manager, notNullValue());
IAxisManager axisManager = manager.getRowAxisManager();
final int originalAxisSize = axisManager.getAllManagedAxis().size();
@@ -107,6 +114,41 @@ public class EditingScenariosMemoryLeakTest extends AbstractPapyrusTest {
}
}
+ /**
+ * Verify that diagrams having active canonical edit policies do not cause leaks.
+ */
+ @Test
+ @SoftReferenceSensitive
+ @PluginResource("model/canonical/css_leaktest.di")
+ @ActiveDiagram("main")
+ public void testCanonicalEditPolicy_bug433206() {
+ memory.add(editor.getModel());
+ memory.add(editor.getActiveDiagramEditor().getDiagram());
+
+ // Cause some views to be created canonically
+ editor.getEditingDomain().getCommandStack().execute(new RecordingCommand(editor.getEditingDomain()) {
+
+ @Override
+ protected void doExecute() {
+ final Package model = editor.getModel();
+
+ final Class class1 = (Class) model.getOwnedType("Class1");
+ class1.createOwnedAttribute("name", null);
+ class1.createOwnedOperation("doIt", null, null);
+ class1.createNestedClassifier("nested", UMLPackage.Literals.PRIMITIVE_TYPE);
+
+ final Enumeration enum1 = (Enumeration) model.getOwnedType("Enumeration1");
+ enum1.createOwnedLiteral("one");
+ enum1.createOwnedLiteral("two");
+
+ final Package package1 = model.getNestedPackage("Package1");
+ package1.createOwnedClass("Foo", false);
+ }
+ });
+ editor.flushDisplayEvents();
+
+ }
+
//
// Test framework
//
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
index 33a2b8542af..bdf2190c572 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
@@ -70,7 +70,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.gmfdiag.menu.tests;bundle-version="1.1.0",
org.eclipse.papyrus.infra.nattable.model.tests;bundle-version="1.1.0",
org.eclipse.papyrus.tests.diagramassistants;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.profile.drafter;bundle-version="1.1.0"
+ org.eclipse.papyrus.uml.profile.drafter;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.canonical.tests;bundle-version="1.1.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.1.0.qualifier
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests.launch b/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests.launch
index 570644a76cd..0329d1777df 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests.launch
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests.launch
@@ -31,7 +31,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms512m -Xmx1024m -DsuppressRawWhenUnchecked=true -XX:MaxPermSize=512M&#10;-XX:SoftRefLRUPolicyMSPerMB=100"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms512m -Xmx1024m -DsuppressRawWhenUnchecked=true -XX:MaxPermSize=512M&#10;-XX:SoftRefLRUPolicyMSPerMB=100&#10;-Doomph.setup.skip=true&#10;-Doomph.setup.questionnaire.skip=true"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus Core tests (no SysML).launch b/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus Core tests (no SysML).launch
index 55b6fbd8413..72c6f0010fe 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus Core tests (no SysML).launch
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus Core tests (no SysML).launch
@@ -31,7 +31,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms512m -Xmx768m -DsuppressRawWhenUnchecked=true -XX:MaxPermSize=512M&#10;-Dno.SysML.tests&#10;-XX:SoftRefLRUPolicyMSPerMB=100"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms512m -Xmx768m -DsuppressRawWhenUnchecked=true -XX:MaxPermSize=512M&#10;-Dno.SysML.tests&#10;-XX:SoftRefLRUPolicyMSPerMB=100&#10;-Doomph.setup.skip=true&#10;-Doomph.setup.questionnaire.skip=true"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
index a076a6e9642..92fad633060 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
@@ -11,6 +11,7 @@
* Christian W. Damus (CEA) - bugs 402525, 323802, 431953, 433310, 434993
* Christian W. Damus - bug 399859
* Christian W. Damus - bug 451230
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.tests;
@@ -58,6 +59,7 @@ public class AllTests {
// suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.services.openelement.tests.AllTests.class));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.commands.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.gmfdiag.commands.tests.AllTests"));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.gmfdiag.common.Activator.ID, "org.eclipse.papyrus.infra.gmfdiag.common.tests.AllTests"));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.gmfdiag.canonical.tests.AllTests.class));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.emf.readonly.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.emf.readonly.tests.AllTests"));
/* views */
diff --git a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/META-INF/MANIFEST.MF
index ee79e41565c..4c6dfdc1eb9 100644
--- a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/META-INF/MANIFEST.MF
@@ -7,7 +7,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.pde.core,
org.eclipse.update.configurator,
org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.1.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.1.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.1.0"
Export-Package: org.eclipse.papyrus.bundles.tests
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/Activator.java b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/Activator.java
index d3d6ff03baa..ca011465622 100644
--- a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/Activator.java
+++ b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/Activator.java
@@ -1,21 +1,7 @@
-/*
- * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- * Christian W. Damus - Skip the feature-version test when not running in the Tycho build
- */
package org.eclipse.papyrus.bundles.tests;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.application.ApplicationHandle;
/**
* The activator class controls the plug-in life cycle
@@ -28,33 +14,28 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
- private String runningApplicationID;
-
/**
* The constructor
*/
public Activator() {
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
-
- // Get the running application ID
- ServiceReference<ApplicationHandle> appRef = context.getServiceReference(ApplicationHandle.class);
- if (appRef != null) {
- ApplicationHandle appHandle = context.getService(appRef);
- if (appHandle != null) {
- try {
- runningApplicationID = appHandle.getApplicationDescriptor().getApplicationId();
- } finally {
- context.ungetService(appRef);
- }
- }
- }
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
@@ -70,7 +51,4 @@ public class Activator extends AbstractUIPlugin {
return plugin;
}
- public String getRunningApplicationID() {
- return (runningApplicationID == null) ? "" : runningApplicationID; //$NON-NLS-1$
- }
}
diff --git a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java
index 5f105e17b5e..30f4828cc44 100644
--- a/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java
+++ b/tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java
@@ -10,6 +10,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
* Christian W. Damus - Skip the feature-version test when running in development mode
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.bundles.tests;
@@ -28,6 +29,7 @@ import org.eclipse.papyrus.junit.framework.classification.NotImplemented;
import org.eclipse.papyrus.junit.framework.classification.rules.Condition;
import org.eclipse.papyrus.junit.framework.classification.rules.Conditional;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.JUnitUtils;
import org.eclipse.pde.internal.core.feature.Feature;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
@@ -62,10 +64,10 @@ public class BundlesTests extends AbstractPapyrusTest {
private static final String PAPYRUS_VERSION = BundleTestsUtils.PAPYRUS_VERSION;
@Condition
- public final boolean isTychoExecution = Activator.getDefault().getRunningApplicationID().startsWith("org.eclipse.tycho."); //$NON-NLS-1$
+ public final boolean isAutomatedBuild = JUnitUtils.isAutomatedBuildExecution();
@Test
- @Conditional(key = "isTychoExecution")
+ @Conditional(key = "isAutomatedBuild")
public void featureVersionNumberTest() {
StringBuffer message = new StringBuffer("Wrong version number for the features:"); //$NON-NLS-1$
int nbProblem = 0;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.classpath b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.classpath
index 8a8f1668cdc..098194ca4b7 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.classpath
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.project b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.project
index fac87127354..718e1d52780 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.project
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.papyrus.uml.diagram.synchronizeview.test</name>
+ <name>org.eclipse.papyrus.infra.gmfdiag.canonical.tests</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.settings/org.eclipse.jdt.core.prefs
index 410244d65a6..9ca8e68231b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.settings/org.eclipse.jdt.ui.prefs
index 954281dbc31..954281dbc31 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/.settings/org.eclipse.jdt.ui.prefs
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/.settings/org.eclipse.jdt.ui.prefs
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..ddd399e9ba2
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.junit.framework;bundle-version="1.1.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.1.0",
+ org.junit;bundle-version="4.11.0",
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.uml2.uml;bundle-version="5.1.0",
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.properties;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.1.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.1.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.canonical.tests.internal.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.canonical.tests
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.canonical.tests,
+ org.eclipse.papyrus.infra.gmfdiag.canonical.tests.internal;x-internal:=true
+
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/about.html b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/about.html
index 82d49bf5f81..82d49bf5f81 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/about.html
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/build.properties b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/build.properties
index 1b08f841b5e..54e8f43992d 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/build.properties
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/build.properties
@@ -3,5 +3,6 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
about.html,\
- plugin.properties
+ plugin.properties,\
+ models/
src.includes = about.html
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram.css
new file mode 100644
index 00000000000..4fb4cab7e1d
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram.css
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ */
+
+Class {
+ canonical: true
+}
+
+.synch {
+ canonical: true
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInThemodel.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.di
index 8634d4c00e0..bf9abab340f 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAClassIntoAPackageInThemodel.di
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.di
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.notation
new file mode 100644
index 00000000000..c84e2b0d83f
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.notation
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_ZuWIwMK3EeSkv8vaizVybg" type="PapyrusUMLClassDiagram" name="canonical" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_dZ-tAMK3EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_daBJQMK3EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_daBJQcK3EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_daBJQsK3EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_daGo0MK3EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_daGo0cK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_daGo0sK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_daGo08K3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_daGo1MK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_daGo1cK3EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_daGo1sK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_daGo18K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_daGo2MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_daGo2cK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_daGo2sK3EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_daGo28K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_daGo3MK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_daGo3cK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_daGo3sK3EeSkv8vaizVybg"/>
+ </children>
+ <styles xmi:type="notation:CanonicalStyle" xmi:id="_dnnq8MK4EeSkv8vaizVybg"/>
+ <element xmi:type="uml:Class" href="classdiagram_canonical.uml#_dZNQ8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dZ-tAcK3EeSkv8vaizVybg" x="85" y="62" width="120" height="122"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iBjVEMK3EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iBjVEsK3EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_iBjVE8K3EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_iBjVFMK3EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iBjVFcK3EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iBjVFsK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iBjVF8K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iBjVGMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBjVGcK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iBjVGsK3EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iBjVG8K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iBjVHMK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iBjVHcK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBjVHsK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iBjVH8K3EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iBjVIMK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iBjVIcK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iBjVIsK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBjVI8K3EeSkv8vaizVybg"/>
+ </children>
+ <styles xmi:type="notation:CanonicalStyle" xmi:id="_fPeZkMK4EeSkv8vaizVybg"/>
+ <element xmi:type="uml:Class" href="classdiagram_canonical.uml#_iBhf4MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBjVEcK3EeSkv8vaizVybg" x="307" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_jhyYwMK3EeSkv8vaizVybg" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_jhy_0MK3EeSkv8vaizVybg" type="5023"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_jhy_0cK3EeSkv8vaizVybg" type="8508">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jhy_0sK3EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_jhy_08K3EeSkv8vaizVybg" type="7015">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_jhy_1MK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_jhy_1cK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_jhy_1sK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jhy_18K3EeSkv8vaizVybg"/>
+ </children>
+ <styles xmi:type="notation:CanonicalStyle" xmi:id="_ffa6EMK4EeSkv8vaizVybg"/>
+ <element xmi:type="uml:Enumeration" href="classdiagram_canonical.uml#_jhxKoMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jhyYwcK3EeSkv8vaizVybg" x="697" y="73"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_l5srUMK3EeSkv8vaizVybg" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_l5srUsK3EeSkv8vaizVybg" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_l5srU8K3EeSkv8vaizVybg" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_l5srVMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_l5srVcK3EeSkv8vaizVybg"/>
+ </children>
+ <styles xmi:type="notation:CanonicalStyle" xmi:id="_ftnHEMK4EeSkv8vaizVybg"/>
+ <element xmi:type="uml:Package" href="classdiagram_canonical.uml#_l5pA8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_l5srUcK3EeSkv8vaizVybg" x="93" y="254" width="462" height="337"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_pmuWsMK3EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_pmu9wMK3EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_pmu9wcK3EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_pmu9wsK3EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pmu9w8K3EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pmu9xMK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_pmu9xcK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_pmu9xsK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pmu9x8K3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pmu9yMK3EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pmu9ycK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_pmu9ysK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_pmu9y8K3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pmu9zMK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pmu9zcK3EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pmu9zsK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_pmu9z8K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_pmu90MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pmu90cK3EeSkv8vaizVybg"/>
+ </children>
+ <styles xmi:type="notation:CanonicalStyle" xmi:id="_f7qKIMK4EeSkv8vaizVybg"/>
+ <element xmi:type="uml:Class" href="classdiagram_canonical.uml#_pmtIkMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pmuWscK3EeSkv8vaizVybg" x="498" y="66"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_ZuWIwcK3EeSkv8vaizVybg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_ZuWIwsK3EeSkv8vaizVybg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_ZuWIw8K3EeSkv8vaizVybg">
+ <owner xmi:type="uml:Model" href="classdiagram_canonical.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </styles>
+ <element xmi:type="uml:Model" href="classdiagram_canonical.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="__5nfEMK5EeSkv8vaizVybg"/>
+ <notation:Diagram xmi:id="_IYESEMK6EeSkv8vaizVybg" type="PapyrusUMLClassDiagram" name="default" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_LcByUMK6EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LcCZYMK6EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LcCZYcK6EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LcCZYsK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcCZY8K6EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LcCZZMK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LcCZZcK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LcCZZsK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcCZZ8K6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcCZaMK6EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LcCZacK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LcCZasK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LcCZa8K6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcCZbMK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcCZbcK6EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LcCZbsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LcCZb8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LcCZcMK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcCZccK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_canonical.uml#_dZNQ8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcByUcK6EeSkv8vaizVybg" x="81" y="59" width="124" height="115"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_L0lcQMK6EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_L0lcQsK6EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_L0lcQ8K6EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_L0lcRMK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_L0mDUMK6EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_L0mDUcK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_L0mDUsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_L0mDU8K6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0mDVMK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_L0mDVcK6EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_L0mDVsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_L0mDV8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_L0mDWMK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0mDWcK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_L0mDWsK6EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_L0mDW8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_L0mDXMK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_L0mDXcK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0mDXsK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_canonical.uml#_iBhf4MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0lcQcK6EeSkv8vaizVybg" x="318" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MV710MK6EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MV8c4MK6EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MV8c4cK6EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MV8c4sK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MV8c48K6EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MV8c5MK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MV8c5cK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MV8c5sK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV8c58K6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MV8c6MK6EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MV8c6cK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MV8c6sK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MV8c68K6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV8c7MK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MV8c7cK6EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MV8c7sK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MV8c78K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MV8c8MK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV8c8cK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_canonical.uml#_pmtIkMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV710cK6EeSkv8vaizVybg" x="522" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_N_ueIMK6EeSkv8vaizVybg" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_N_ueIsK6EeSkv8vaizVybg" type="5023"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_N_ueI8K6EeSkv8vaizVybg" type="8508">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N_ueJMK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_N_ueJcK6EeSkv8vaizVybg" type="7015">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_N_ueJsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_N_ueJ8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_N_ueKMK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_ueKcK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="classdiagram_canonical.uml#_jhxKoMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_ueIcK6EeSkv8vaizVybg" x="697" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Oao4gMK6EeSkv8vaizVybg" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Oao4gsK6EeSkv8vaizVybg" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_OapfkMK6EeSkv8vaizVybg" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OapfkcK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OapfksK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Package" href="classdiagram_canonical.uml#_l5pA8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Oao4gcK6EeSkv8vaizVybg" x="97" y="245" width="557" height="323"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_IYESEcK6EeSkv8vaizVybg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_IYESEsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_IYESE8K6EeSkv8vaizVybg">
+ <owner xmi:type="uml:Model" href="classdiagram_canonical.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </styles>
+ <element xmi:type="uml:Model" href="classdiagram_canonical.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.uml
new file mode 100644
index 00000000000..cacc06880af
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_canonical.uml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_ZtEWYMK3EeSkv8vaizVybg" name="Model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_ZtEWYcK3EeSkv8vaizVybg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_dZNQ8MK3EeSkv8vaizVybg" name="Foo">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_XFcBQMLBEeSkv8vaizVybg" name="ok">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_qkfmgMK3EeSkv8vaizVybg" name="bar" type="_iBhf4MK3EeSkv8vaizVybg" association="_qkgNkMK3EeSkv8vaizVybg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qkfmgcK3EeSkv8vaizVybg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_qkfmgsK3EeSkv8vaizVybg" value="1"/>
+ </ownedAttribute>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_68S0AMK6EeSkv8vaizVybg" name="doIt"/>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_88g_UMK6EeSkv8vaizVybg" name="Nested"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_iBhf4MK3EeSkv8vaizVybg" name="Bar">
+ <generalization xmi:type="uml:Generalization" xmi:id="_rYz_YMK3EeSkv8vaizVybg" general="_pmtIkMK3EeSkv8vaizVybg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_jhxKoMK3EeSkv8vaizVybg" name="YesNo">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_wXsUMMK3EeSkv8vaizVybg" name="no"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_vemJAMK3EeSkv8vaizVybg" name="yes"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_l5pA8MK3EeSkv8vaizVybg" name="types">
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_sShOkMK3EeSkv8vaizVybg" alias="Foo" importedElement="_dZNQ8MK3EeSkv8vaizVybg"/>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_s2kW0MK3EeSkv8vaizVybg" alias="Bar" importedElement="_iBhf4MK3EeSkv8vaizVybg"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_AINmoMK4EeSkv8vaizVybg" name="SubFoo">
+ <generalization xmi:type="uml:Generalization" xmi:id="_BxHeIMK4EeSkv8vaizVybg" general="_dZNQ8MK3EeSkv8vaizVybg"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_MnwQgMK4EeSkv8vaizVybg" name="createdOn" type="_KR5MYMK4EeSkv8vaizVybg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_KR5MYMK4EeSkv8vaizVybg" name="Date"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_mS1QMNCxEeSgLrtEqH-xrA" client="_AINmoMK4EeSkv8vaizVybg" supplier="_KR5MYMK4EeSkv8vaizVybg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_pmtIkMK3EeSkv8vaizVybg" name="Super"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_qkgNkMK3EeSkv8vaizVybg" memberEnd="_qkgNkcK3EeSkv8vaizVybg _qkfmgMK3EeSkv8vaizVybg">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_qkgNkcK3EeSkv8vaizVybg" name="foo" type="_dZNQ8MK3EeSkv8vaizVybg" association="_qkgNkMK3EeSkv8vaizVybg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qkgNksK3EeSkv8vaizVybg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_qkgNk8K3EeSkv8vaizVybg" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_Y9sG4MLCEeSkv8vaizVybg" client="_pmtIkMK3EeSkv8vaizVybg" supplier="_jhxKoMK3EeSkv8vaizVybg"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAPartIntoACompositeInTheDiagram.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.di
index 8634d4c00e0..bf9abab340f 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview.test/models/AddAChildNode/AddAPartIntoACompositeInTheDiagram.di
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.di
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.notation
new file mode 100644
index 00000000000..6c5db1466d9
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.notation
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_ZuWIwMK3EeSkv8vaizVybg" type="PapyrusUMLClassDiagram" name="canonical" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_dZ-tAMK3EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_daBJQMK3EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_daBJQcK3EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_daBJQsK3EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_daGo0MK3EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_daGo0cK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_daGo0sK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_daGo08K3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_daGo1MK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_daGo1cK3EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_daGo1sK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_daGo18K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_daGo2MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_daGo2cK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_daGo2sK3EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_daGo28K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_daGo3MK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_daGo3cK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_daGo3sK3EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_css.uml#_dZNQ8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dZ-tAcK3EeSkv8vaizVybg" x="85" y="62" width="120" height="122"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_iBjVEMK3EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iBjVEsK3EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_iBjVE8K3EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_iBjVFMK3EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iBjVFcK3EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iBjVFsK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iBjVF8K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iBjVGMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBjVGcK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iBjVGsK3EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iBjVG8K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iBjVHMK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iBjVHcK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBjVHsK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iBjVH8K3EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iBjVIMK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iBjVIcK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iBjVIsK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBjVI8K3EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_css.uml#_iBhf4MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBjVEcK3EeSkv8vaizVybg" x="307" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_jhyYwMK3EeSkv8vaizVybg" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_jhy_0MK3EeSkv8vaizVybg" type="5023"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_jhy_0cK3EeSkv8vaizVybg" type="8508">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jhy_0sK3EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_jhy_08K3EeSkv8vaizVybg" type="7015">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_jhy_1MK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_jhy_1cK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_jhy_1sK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jhy_18K3EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="classdiagram_css.uml#_jhxKoMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jhyYwcK3EeSkv8vaizVybg" x="697" y="73"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_l5srUMK3EeSkv8vaizVybg" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_l5srUsK3EeSkv8vaizVybg" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_l5srU8K3EeSkv8vaizVybg" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_l5srVMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_l5srVcK3EeSkv8vaizVybg"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_Tal6kMOaEeSrRZNlIXoDgg" name="cssClass">
+ <stringListValue>synch</stringListValue>
+ </styles>
+ <element xmi:type="uml:Package" href="classdiagram_css.uml#_l5pA8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_l5srUcK3EeSkv8vaizVybg" x="93" y="254" width="462" height="337"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_pmuWsMK3EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_pmu9wMK3EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_pmu9wcK3EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_pmu9wsK3EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pmu9w8K3EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pmu9xMK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_pmu9xcK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_pmu9xsK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pmu9x8K3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pmu9yMK3EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pmu9ycK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_pmu9ysK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_pmu9y8K3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pmu9zMK3EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pmu9zcK3EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pmu9zsK3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_pmu9z8K3EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_pmu90MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pmu90cK3EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_css.uml#_pmtIkMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pmuWscK3EeSkv8vaizVybg" x="498" y="66"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_ZuWIwcK3EeSkv8vaizVybg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_ZuWIwsK3EeSkv8vaizVybg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_ZuWIw8K3EeSkv8vaizVybg">
+ <owner xmi:type="uml:Model" href="classdiagram_css.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </styles>
+ <styles xmi:type="notation:EObjectListValueStyle" xmi:id="_Gov_wMOaEeSrRZNlIXoDgg" name="css_stylesheets" eObjectListValue="_GozDEMOaEeSrRZNlIXoDgg"/>
+ <element xmi:type="uml:Model" href="classdiagram_css.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="__5nfEMK5EeSkv8vaizVybg"/>
+ <notation:Diagram xmi:id="_IYESEMK6EeSkv8vaizVybg" type="PapyrusUMLClassDiagram" name="default" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_LcByUMK6EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LcCZYMK6EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LcCZYcK6EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LcCZYsK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcCZY8K6EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LcCZZMK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LcCZZcK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LcCZZsK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcCZZ8K6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcCZaMK6EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LcCZacK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LcCZasK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LcCZa8K6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcCZbMK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcCZbcK6EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LcCZbsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LcCZb8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LcCZcMK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcCZccK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_css.uml#_dZNQ8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcByUcK6EeSkv8vaizVybg" x="81" y="59" width="124" height="115"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_L0lcQMK6EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_L0lcQsK6EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_L0lcQ8K6EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_L0lcRMK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_L0mDUMK6EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_L0mDUcK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_L0mDUsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_L0mDU8K6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0mDVMK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_L0mDVcK6EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_L0mDVsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_L0mDV8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_L0mDWMK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0mDWcK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_L0mDWsK6EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_L0mDW8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_L0mDXMK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_L0mDXcK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0mDXsK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_css.uml#_iBhf4MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0lcQcK6EeSkv8vaizVybg" x="318" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MV710MK6EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MV8c4MK6EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MV8c4cK6EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MV8c4sK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MV8c48K6EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MV8c5MK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MV8c5cK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MV8c5sK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV8c58K6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MV8c6MK6EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MV8c6cK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MV8c6sK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MV8c68K6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV8c7MK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MV8c7cK6EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MV8c7sK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MV8c78K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MV8c8MK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV8c8cK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_css.uml#_pmtIkMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV710cK6EeSkv8vaizVybg" x="522" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_N_ueIMK6EeSkv8vaizVybg" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_N_ueIsK6EeSkv8vaizVybg" type="5023"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_N_ueI8K6EeSkv8vaizVybg" type="8508">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N_ueJMK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_N_ueJcK6EeSkv8vaizVybg" type="7015">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_N_ueJsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_N_ueJ8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_N_ueKMK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_ueKcK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="classdiagram_css.uml#_jhxKoMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_ueIcK6EeSkv8vaizVybg" x="697" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Oao4gMK6EeSkv8vaizVybg" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Oao4gsK6EeSkv8vaizVybg" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_OapfkMK6EeSkv8vaizVybg" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OapfkcK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OapfksK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Package" href="classdiagram_css.uml#_l5pA8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Oao4gcK6EeSkv8vaizVybg" x="97" y="245" width="557" height="323"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_IYESEcK6EeSkv8vaizVybg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_IYESEsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_IYESE8K6EeSkv8vaizVybg">
+ <owner xmi:type="uml:Model" href="classdiagram_css.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </styles>
+ <element xmi:type="uml:Model" href="classdiagram_css.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </notation:Diagram>
+ <css:EmbeddedStyleSheet xmi:id="_GozDEMOaEeSrRZNlIXoDgg" label="canonical_styles" content="Class, Enumeration {&#xA;&#x9;canonical: true&#xA;}&#xA;&#xA;.synch {&#xA;&#x9;canonical: true&#xA;}"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.uml
new file mode 100644
index 00000000000..c8bcc3b8a52
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_css.uml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_ZtEWYMK3EeSkv8vaizVybg" name="Model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_ZtEWYcK3EeSkv8vaizVybg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_dZNQ8MK3EeSkv8vaizVybg" name="Foo">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_XFcBQMLBEeSkv8vaizVybg" name="ok">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_qkfmgMK3EeSkv8vaizVybg" name="bar" type="_iBhf4MK3EeSkv8vaizVybg" association="_qkgNkMK3EeSkv8vaizVybg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qkfmgcK3EeSkv8vaizVybg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_qkfmgsK3EeSkv8vaizVybg" value="1"/>
+ </ownedAttribute>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_68S0AMK6EeSkv8vaizVybg" name="doIt"/>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_88g_UMK6EeSkv8vaizVybg" name="Nested"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_iBhf4MK3EeSkv8vaizVybg" name="Bar">
+ <generalization xmi:type="uml:Generalization" xmi:id="_rYz_YMK3EeSkv8vaizVybg" general="_pmtIkMK3EeSkv8vaizVybg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_jhxKoMK3EeSkv8vaizVybg" name="YesNo">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_wXsUMMK3EeSkv8vaizVybg" name="no"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_vemJAMK3EeSkv8vaizVybg" name="yes"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_l5pA8MK3EeSkv8vaizVybg" name="types">
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_sShOkMK3EeSkv8vaizVybg" alias="Foo" importedElement="_dZNQ8MK3EeSkv8vaizVybg"/>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_s2kW0MK3EeSkv8vaizVybg" alias="Bar" importedElement="_iBhf4MK3EeSkv8vaizVybg"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_AINmoMK4EeSkv8vaizVybg" name="SubFoo">
+ <generalization xmi:type="uml:Generalization" xmi:id="_BxHeIMK4EeSkv8vaizVybg" general="_dZNQ8MK3EeSkv8vaizVybg"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_MnwQgMK4EeSkv8vaizVybg" name="createdOn" type="_KR5MYMK4EeSkv8vaizVybg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_KR5MYMK4EeSkv8vaizVybg" name="Date"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_pmtIkMK3EeSkv8vaizVybg" name="Super"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_qkgNkMK3EeSkv8vaizVybg" memberEnd="_qkgNkcK3EeSkv8vaizVybg _qkfmgMK3EeSkv8vaizVybg">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_qkgNkcK3EeSkv8vaizVybg" name="foo" type="_dZNQ8MK3EeSkv8vaizVybg" association="_qkgNkMK3EeSkv8vaizVybg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qkgNksK3EeSkv8vaizVybg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_qkgNk8K3EeSkv8vaizVybg" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_Y9sG4MLCEeSkv8vaizVybg" client="_pmtIkMK3EeSkv8vaizVybg" supplier="_jhxKoMK3EeSkv8vaizVybg"/>
+</uml:Model>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.di
new file mode 100644
index 00000000000..bf9abab340f
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.notation
new file mode 100644
index 00000000000..12e3a5d91c0
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.notation
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <css:ModelStyleSheets xmi:id="__5nfEMK5EeSkv8vaizVybg"/>
+ <notation:Diagram xmi:id="_IYESEMK6EeSkv8vaizVybg" type="PapyrusUMLClassDiagram" name="default" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_LcByUMK6EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LcCZYMK6EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LcCZYcK6EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LcCZYsK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcCZY8K6EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LcCZZMK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LcCZZcK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LcCZZsK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcCZZ8K6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcCZaMK6EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LcCZacK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LcCZasK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LcCZa8K6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcCZbMK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcCZbcK6EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LcCZbsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LcCZb8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LcCZcMK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcCZccK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_cssext.uml#_dZNQ8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcByUcK6EeSkv8vaizVybg" x="81" y="59" width="124" height="115"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_L0lcQMK6EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_L0lcQsK6EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_L0lcQ8K6EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_L0lcRMK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_L0mDUMK6EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_L0mDUcK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_L0mDUsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_L0mDU8K6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0mDVMK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_L0mDVcK6EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_L0mDVsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_L0mDV8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_L0mDWMK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0mDWcK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_L0mDWsK6EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_L0mDW8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_L0mDXMK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_L0mDXcK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0mDXsK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_cssext.uml#_iBhf4MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L0lcQcK6EeSkv8vaizVybg" x="318" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MV710MK6EeSkv8vaizVybg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MV8c4MK6EeSkv8vaizVybg" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MV8c4cK6EeSkv8vaizVybg" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MV8c4sK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MV8c48K6EeSkv8vaizVybg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MV8c5MK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MV8c5cK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MV8c5sK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV8c58K6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MV8c6MK6EeSkv8vaizVybg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MV8c6cK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MV8c6sK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MV8c68K6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV8c7MK6EeSkv8vaizVybg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MV8c7cK6EeSkv8vaizVybg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MV8c7sK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MV8c78K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MV8c8MK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV8c8cK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Class" href="classdiagram_cssext.uml#_pmtIkMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MV710cK6EeSkv8vaizVybg" x="522" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_N_ueIMK6EeSkv8vaizVybg" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_N_ueIsK6EeSkv8vaizVybg" type="5023"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_N_ueI8K6EeSkv8vaizVybg" type="8508">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N_ueJMK6EeSkv8vaizVybg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_N_ueJcK6EeSkv8vaizVybg" type="7015">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_N_ueJsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_N_ueJ8K6EeSkv8vaizVybg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_N_ueKMK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_ueKcK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="classdiagram_cssext.uml#_jhxKoMK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_ueIcK6EeSkv8vaizVybg" x="697" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Oao4gMK6EeSkv8vaizVybg" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Oao4gsK6EeSkv8vaizVybg" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_OapfkMK6EeSkv8vaizVybg" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OapfkcK6EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OapfksK6EeSkv8vaizVybg"/>
+ </children>
+ <element xmi:type="uml:Package" href="classdiagram_cssext.uml#_l5pA8MK3EeSkv8vaizVybg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Oao4gcK6EeSkv8vaizVybg" x="97" y="245" width="557" height="323"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_IYESEcK6EeSkv8vaizVybg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_IYESEsK6EeSkv8vaizVybg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_IYESE8K6EeSkv8vaizVybg">
+ <owner xmi:type="uml:Model" href="classdiagram_cssext.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </styles>
+ <element xmi:type="uml:Model" href="classdiagram_cssext.uml#_ZtEWYMK3EeSkv8vaizVybg"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.uml
new file mode 100644
index 00000000000..c8bcc3b8a52
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/classdiagram_cssext.uml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_ZtEWYMK3EeSkv8vaizVybg" name="Model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_ZtEWYcK3EeSkv8vaizVybg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_dZNQ8MK3EeSkv8vaizVybg" name="Foo">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_XFcBQMLBEeSkv8vaizVybg" name="ok">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_qkfmgMK3EeSkv8vaizVybg" name="bar" type="_iBhf4MK3EeSkv8vaizVybg" association="_qkgNkMK3EeSkv8vaizVybg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qkfmgcK3EeSkv8vaizVybg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_qkfmgsK3EeSkv8vaizVybg" value="1"/>
+ </ownedAttribute>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_68S0AMK6EeSkv8vaizVybg" name="doIt"/>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_88g_UMK6EeSkv8vaizVybg" name="Nested"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_iBhf4MK3EeSkv8vaizVybg" name="Bar">
+ <generalization xmi:type="uml:Generalization" xmi:id="_rYz_YMK3EeSkv8vaizVybg" general="_pmtIkMK3EeSkv8vaizVybg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_jhxKoMK3EeSkv8vaizVybg" name="YesNo">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_wXsUMMK3EeSkv8vaizVybg" name="no"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_vemJAMK3EeSkv8vaizVybg" name="yes"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_l5pA8MK3EeSkv8vaizVybg" name="types">
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_sShOkMK3EeSkv8vaizVybg" alias="Foo" importedElement="_dZNQ8MK3EeSkv8vaizVybg"/>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_s2kW0MK3EeSkv8vaizVybg" alias="Bar" importedElement="_iBhf4MK3EeSkv8vaizVybg"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_AINmoMK4EeSkv8vaizVybg" name="SubFoo">
+ <generalization xmi:type="uml:Generalization" xmi:id="_BxHeIMK4EeSkv8vaizVybg" general="_dZNQ8MK3EeSkv8vaizVybg"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_MnwQgMK4EeSkv8vaizVybg" name="createdOn" type="_KR5MYMK4EeSkv8vaizVybg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_KR5MYMK4EeSkv8vaizVybg" name="Date"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_pmtIkMK3EeSkv8vaizVybg" name="Super"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_qkgNkMK3EeSkv8vaizVybg" memberEnd="_qkgNkcK3EeSkv8vaizVybg _qkfmgMK3EeSkv8vaizVybg">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_qkgNkcK3EeSkv8vaizVybg" name="foo" type="_dZNQ8MK3EeSkv8vaizVybg" association="_qkgNkMK3EeSkv8vaizVybg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qkgNksK3EeSkv8vaizVybg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_qkgNk8K3EeSkv8vaizVybg" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_Y9sG4MLCEeSkv8vaizVybg" client="_pmtIkMK3EeSkv8vaizVybg" supplier="_jhxKoMK3EeSkv8vaizVybg"/>
+</uml:Model>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/composite.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/composite.di
new file mode 100644
index 00000000000..bf9abab340f
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/composite.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical.tests/models/composite.notation b/tests/j