diff options
author | Maged Elaasar | 2017-02-21 08:19:48 +0000 |
---|---|---|
committer | Florian Noyrit | 2017-03-13 16:19:06 +0000 |
commit | 7a1e61e4203fcf468a2635b80dd94182a95b588b (patch) | |
tree | 804451f2f230c2cb1a4b07815f4ccd2dc1edcf52 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine | |
parent | cb10068854ce727bc5004e997663ae0a3ae2ffd6 (diff) | |
download | org.eclipse.papyrus-7a1e61e4203fcf468a2635b80dd94182a95b588b.tar.gz org.eclipse.papyrus-7a1e61e4203fcf468a2635b80dd94182a95b588b.tar.xz org.eclipse.papyrus-7a1e61e4203fcf468a2635b80dd94182a95b588b.zip |
Bug 510451 - Reimplement the ISO42010 specification to properly support
architectural contexts and viewpoints
Replaced the viewpoint configuration framework by a new architectural
context/viewpoint framework. This involves defining architecture
contexts and viewpoints in models and contributing them via extension
points or via the preferences. Models reference an architecture context
and a set of viewpoints at creation time, but can be switched later.
Architecture contexts double as client contexts for which
elementtypesetconfigurations can be registered. They also define
viewpoints, which reference representation kinds (diagrams or tables).
This contribution defines three architecture contexts: UML, Profile, and
SysML corresponding to what Papyrus used to call diagram categories.
Change-Id: I203b58d9e97afdffc45c2674683c0281eb8a7c5b
Signed-off-by: Maged Elaasar <melaasar@gmail.com>
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java | 8 | ||||
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/migration/StateMachineReconcilerForCompartment_1_2_0.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/migration/StateMachineReconcilerForCompartment.java) | 2 | ||||
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.configuration | 47 | ||||
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml | 23 |
4 files changed, 8 insertions, 72 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java index 689ddf4e220..8c7ae73eb84 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramCommand.java @@ -27,8 +27,8 @@ import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.gmf.runtime.notation.Node; import org.eclipse.gmf.runtime.notation.NotationFactory; import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramPrototype; import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils; -import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype; import org.eclipse.papyrus.uml.diagram.common.commands.CreateBehavioredClassifierDiagramCommand; import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter; import org.eclipse.papyrus.uml.diagram.statemachine.custom.helpers.Zone; @@ -104,7 +104,7 @@ public class CreateStateMachineDiagramCommand extends CreateBehavioredClassifier * @return */ @Override - protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, ViewPrototype prototype, String name) { + protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, DiagramPrototype prototype, String name) { Diagram diagram = super.doCreateDiagram(diagramResource, owner, element, prototype, name); if (diagram == null) { if (element instanceof State) { @@ -115,9 +115,7 @@ public class CreateStateMachineDiagramCommand extends CreateBehavioredClassifier setName(name); diagram.setElement(element); DiagramUtils.setOwner(diagram, owner); - if (!prototype.isNatural()) { - DiagramUtils.setPrototype(diagram, prototype); - } + DiagramUtils.setPrototype(diagram, prototype); initializeModel(element); initializeDiagram(diagram); diagramResource.getContents().add(diagram); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/migration/StateMachineReconcilerForCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/migration/StateMachineReconcilerForCompartment_1_2_0.java index 3b8a294c8e4..eccfa0c3846 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/migration/StateMachineReconcilerForCompartment.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/migration/StateMachineReconcilerForCompartment_1_2_0.java @@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.ReconcilerForCompartm /** * Diagram Reconciler for compartment from 1.1.0 to 1.2.0 */ -public class StateMachineReconcilerForCompartment extends ReconcilerForCompartment { +public class StateMachineReconcilerForCompartment_1_2_0 extends ReconcilerForCompartment { private static final String RegionCompartmentEditPart_VISUAL_ID = "3002"; private static final String StateMachineCompartmentEditPart_VISUAL_ID = "2002"; diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.configuration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.configuration deleted file mode 100644 index 66dd0dbe7cd..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.configuration +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_ko07IErbEeSdQKzSRatBjg"> - <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint"> - <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_PwD0cHDvEeWh-MssWmCB_A" implementationID="PapyrusUMLStateMachineDiagram"> - <modelRules xmi:id="_PwD0cXDvEeWh-MssWmCB_A"> - <element href="http://www.eclipse.org/uml2/5.0.0/UML#//StateMachine"/> - </modelRules> - <modelRules xmi:id="_H-oCgB0UEea_bcpknMJ7-w"> - <element href="http://www.eclipse.org/uml2/5.0.0/UML#//State"/> - </modelRules> - <owningRules xmi:id="_PwD0cnDvEeWh-MssWmCB_A"> - <element href="http://www.eclipse.org/uml2/5.0.0/UML#//StateMachine"/> - </owningRules> - <owningRules xmi:id="_PwD0c3DvEeWh-MssWmCB_A"> - <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/> - <newModelPath xmi:id="_PwD0dHDvEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.StateMachine"> - <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/classifierBehavior"/> - </newModelPath> - </owningRules> - <owningRules xmi:id="_PwD0dXDvEeWh-MssWmCB_A"> - <element href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier"/> - <newModelPath xmi:id="_PwD0dnDvEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.StateMachine"> - <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/ownedBehavior"/> - </newModelPath> - </owningRules> - <owningRules xmi:id="_PwD0d3DvEeWh-MssWmCB_A"> - <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/> - <newModelPath xmi:id="_PwD0eHDvEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.StateMachine"> - <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/> - </newModelPath> - </owningRules> - <owningRules xmi:id="_PwD0eXDvEeWh-MssWmCB_A"> - <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Interface"/> - <newModelPath xmi:id="_PwD0enDvEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.uml.ProtocolStateMachine"> - <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Interface/protocol"/> - </newModelPath> - </owningRules> - <owningRules xmi:id="_5kmMcB0UEea_bcpknMJ7-w"> - <element href="http://www.eclipse.org/uml2/5.0.0/UML#//State"/> - </owningRules> - <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb4txhEeOqHvRyiN87hA"/> - <childRules xmi:id="_PwD0e3DvEeWh-MssWmCB_A"/> - </modelKinds> - </viewpoints> - <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/> - <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/> -</configuration:PapyrusConfiguration> diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml index 7307cc90b99..3ab6cfa9503 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 @@ -15,14 +15,6 @@ --> <plugin> - <extension - point="org.eclipse.papyrus.infra.viewpoints.policy.custom"> - <contribution - file="model/stateMachineDiagram.configuration" - original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration"> - </contribution> - </extension> - <extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation"> <?gmfgen generated="true"?> <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLMarkerNavigationProvider"> @@ -792,13 +784,6 @@ <extension - point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration"> - <elementTypeSet - clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext" - path="model/stateMachineDiagram.elementtypesconfigurations"> - </elementTypeSet> -</extension> -<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders"> <ParserProvider class="org.eclipse.papyrus.uml.diagram.statemachine.custom.providers.CustomUMLParserProvider"> @@ -811,15 +796,15 @@ point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler"> <diagramReconciler diagramType="PapyrusUMLStateMachineDiagram" - reconcilerClass="org.eclipse.papyrus.uml.diagram.statemachine.custom.migration.StateMachineReconcilerForCompartment" - source="undefined" - target="1.2.0"> + reconcilerClass="org.eclipse.papyrus.uml.diagram.statemachine.custom.migration.StateMachineReconcilerForCompartment_1_2_0" + source="1.1.0" + target="1.3.0"> </diagramReconciler> <diagramReconciler diagramType="PapyrusUMLStateMachineDiagram" reconcilerClass="org.eclipse.papyrus.uml.diagram.statemachine.custom.migration.StateMachineReconciler_1_2_0" source="1.1.0" - target="1.2.0"> + target="1.3.0"> </diagramReconciler> </extension> <extension point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders"> |