Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Noyrit2016-08-09 10:25:50 +0000
committerGerrit Code Review @ Eclipse.org2016-08-28 15:46:41 +0000
commit7310db0b3b2e8ee805fedf4bfd16baf438c89332 (patch)
tree3dadff6a067e8d8bcbf837d8277dfac7749aef27 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine
parent7851474fe5f33de156c797942945a3e9c97cb0a8 (diff)
downloadorg.eclipse.papyrus-7310db0b3b2e8ee805fedf4bfd16baf438c89332.tar.gz
org.eclipse.papyrus-7310db0b3b2e8ee805fedf4bfd16baf438c89332.tar.xz
org.eclipse.papyrus-7310db0b3b2e8ee805fedf4bfd16baf438c89332.zip
Bug 443799 - Fix potential bugs identified by FindBugs in oep.infra.*
Bug 499554 - Oxygen release version number moved to 3.0.0. Change-Id: I8e112db7175a5b89eb9b37973639627a6c29e007
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/EMFCustomTransitionRetargetContainerCommand.java602
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/listeners/AbstractModifcationTriggerListener.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomRegionCompartmentCreationEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/pom.xml20
5 files changed, 319 insertions, 319 deletions
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 d6074bddff9..ba481b104b1 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
@@ -32,12 +32,12 @@ Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport;bundle-version="[2.12
org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="[1.7.0,2.0.0)",
org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide;bundle-version="[1.7.0,2.0.0)",
org.eclipse.ocl.ecore;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.papyrus.editor;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.preferences;visibility:=reexport;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.editor;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;visibility:=reexport;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.uml.appearance;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.uml.diagram.navigation;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.uml.service.types;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.infra.hyperlink;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.diagram.navigation;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.service.types;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.hyperlink;bundle-version="[3.0.0,4.0.0)",
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jface,
@@ -66,7 +66,7 @@ Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport;bundle-version="[2.12
Bundle-Vendor: %providerName
Ant-Version: Apache Ant 1.7.0
Eclipse-LazyStart: true
-Bundle-Version: 2.0.0.qualifier
+Bundle-Version: 3.0.0.qualifier
Bundle-Activator: org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorPlugin
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.statemachine; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/EMFCustomTransitionRetargetContainerCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/EMFCustomTransitionRetargetContainerCommand.java
index f868663ef8f..fbdae4d46ba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/EMFCustomTransitionRetargetContainerCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/EMFCustomTransitionRetargetContainerCommand.java
@@ -1,301 +1,301 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.commands;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.GMFUnsafe;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Pseudostate;
-import org.eclipse.uml2.uml.PseudostateKind;
-import org.eclipse.uml2.uml.Region;
-import org.eclipse.uml2.uml.State;
-import org.eclipse.uml2.uml.StateMachine;
-import org.eclipse.uml2.uml.Transition;
-import org.eclipse.uml2.uml.Vertex;
-
-/**
- * Customized transition-reorient command, takes changing of container into account.
- *
- * @author ansgar
- *
- */
-public class EMFCustomTransitionRetargetContainerCommand extends GMFUnsafe.UnsafeCommand {
-
- protected Transition transition;
-
- protected Region oldRegion;
-
- protected Region newRegion;
-
- public EMFCustomTransitionRetargetContainerCommand(Transition transition) {
- super(TransactionUtil.getEditingDomain(transition));
-
- this.transition = transition;
- }
-
-
- /**
- * change the container of a transition, if necessary
- */
- public static boolean changeContainer(Transition transition) {
- // now change container
- Region region = deduceContainer(transition.getSource(), transition.getTarget());
- if (region == null) {
- return false; // transition is not valid
- }
- if (region != transition.getOwner()) {
- region.getTransitions().add(transition); // will remove transition automatically from original region
- }
- return true;
- }
-
- /**
- * Check whether a transition from source to target is valid
- */
- public static boolean isValid(EObject sourceE, EObject targetE) {
- if (targetE == null) {
- return true; // don't judge before knowing the target
- }
- NamedElement source = getNearestStateOrSM(sourceE);
- NamedElement target = getNearestStateOrSM(targetE);
- Region sourceRegion = getNearestRegion(source);
- Region targetRegion = getNearestRegion(target);
-
- if (isChild(source, targetRegion)) {
- // transition starts from a composite state (or state-machine) to a vertex within this state
- // assure that source is not an exit point
- if (isExitPoint(sourceE)) {
- return false; // source is an exit point, but target is within the inner part of a class (inverse condition)
- }
- if (isExitPoint(targetE)) {
- return false; // standard condition
- }
- return true;
- } else if (isChild(target, sourceRegion)) {
- // transition from a vertex within the target points to target composite state (or state-machine)
- // assure that target is not an entry point
- if (isEntryPoint(sourceE)) {
- return false; // standard condition
- }
- if (isEntryPoint(targetE)) {
- return false; // source is an entry point, but target is outside the composite state
-
- }
- return true;
- } else if (source == target) {
- // source and target are on same state or state machine. Could be either an external or internal transition
- // Allow transitions from entry to exit (internal) as well as from exit to entry (external)
- // => only disallow from entry to entry and from exit to exit
- if ((isEntryPoint(sourceE) && isEntryPoint(targetE)) || (isExitPoint(sourceE) && isExitPoint(targetE))) {
- return false;
- }
- return true;
- }
-
- // standard conditions for external connections: start may not be a entry point, target not an exit point
- if (isEntryPoint(sourceE)) {
- return false;
- }
- if (isExitPoint(targetE)) {
- return false;
- }
- return true;
- }
-
- /**
- * Calculate the container. Also checks whether a transition is possible
- *
- * @param sourceE
- * @param targetE
- * @return
- */
- public static Region deduceContainer(EObject sourceE, EObject targetE) {
- // Find container element for the new link.
- NamedElement source = getNearestStateOrSM(sourceE);
- if (targetE == null) {
- // don't constraint until both source and target are given.
- if (getNearestRegion(source) != null) {
- return getNearestRegion(source);
- } else {
- return firstRegion(source);
- }
- }
- NamedElement target = getNearestStateOrSM(targetE);
- Region sourceRegion = getNearestRegion(source);
- Region targetRegion = getNearestRegion(target);
-
- if (isChild(source, targetRegion)) {
- // transition starts from a composite state (or state-machine) to a vertex within this state
- return childRegion(sourceRegion, source, targetRegion, target);
- } else if (isChild(target, sourceRegion)) {
- // transition from a vertex within the target points to target composite state (or state-machine)
- return childRegion(targetRegion, target, sourceRegion, source);
- } else if (source == target) {
- // source and target are on same state or state machine. Could be either an external or internal transition
- // Allow transitions from entry to exit (internal) as well as from exit to entry (external)
- // => only disallow from entry to entry and from exit to exit
- if (isEntryPoint(sourceE) || isExitPoint(targetE)) {
- // is a local or internal transition, return first owned region
- return firstRegion(source);
- }
- return sourceRegion;
- }
-
- if (isChild(targetRegion, sourceRegion)) {
- // region of target state is a child of region of source state, choose the letter as "more global" region
- // also include standard case, a transition between two states within same region
- return targetRegion;
- } else {
- return sourceRegion;
- }
- }
-
- public static Region childRegion(Region sourceRegion, NamedElement source, Region targetRegion, NamedElement target) {
- // source state is parent of targetRegion => transition from composite state
- // (or entry point of this state) to a target within composite
- // need to choose a region of the state depending on target
- EList<Region> regions = null;
- if (source instanceof State) {
- regions = ((State) source).getRegions();
- } else if (source instanceof StateMachine) {
- regions = ((StateMachine) source).getRegions();
- }
- if (regions != null) {
- // should always be true, since we called getNearsetStateOrSM before
- for (Region region : regions) {
- if (isChild(region, targetRegion)) {
- return region;
- }
- }
- }
- return null;
- }
-
- /**
- * Return the first region of a state or statemachine.
- *
- * @param source
- * @return
- */
- public static Region firstRegion(EObject source) {
- EList<Region> regions = null;
- if (source instanceof State) {
- regions = ((State) source).getRegions();
- } else if (source instanceof StateMachine) {
- regions = ((StateMachine) source).getRegions();
- }
- if ((regions != null) && (regions.size() > 0)) {
- return regions.get(0);
- } else {
- return null;
- }
- }
-
- public static boolean isChild(EObject parent, EObject child) {
- for (EObject element = child; element != null; element = element.eContainer()) {
- if (element == parent) {
- return true;
- }
- }
- return false;
- }
-
- public static boolean isEntryPoint(EObject vertex) {
- if (vertex instanceof Pseudostate) {
- Pseudostate ps = (Pseudostate) vertex;
- if (ps.getKind() == PseudostateKind.ENTRY_POINT_LITERAL) {
- return true;
- }
- }
- return false;
- }
-
- public static boolean isExitPoint(EObject vertex) {
- if (vertex instanceof Pseudostate) {
- Pseudostate ps = (Pseudostate) vertex;
- if (ps.getKind() == PseudostateKind.EXIT_POINT_LITERAL) {
- return true;
- }
- }
- return false;
- }
-
-
- /**
- * Climb up by containment hierarchy starting from a given element
- * and return the first region (as in default policy)
- */
- public static Region getNearestRegion(EObject startFrom) {
- for (EObject element = startFrom; element != null; element = element.eContainer()) {
- if (element instanceof Region) {
- return (Region) element;
- }
- }
- return null;
- }
-
-
- /**
- * Returns the nearest state or statemachine, if the passed element is a pseudo-state.
- * This simplifies the calculation of a suitable container;
- *
- * @param vertex
- * @return Return type is named element, since state and region have no other common superclass
- */
- public static NamedElement getNearestStateOrSM(EObject vertex) {
- if (vertex instanceof Pseudostate) {
- Pseudostate ps = (Pseudostate) vertex;
- if ((ps.getKind() == PseudostateKind.ENTRY_POINT_LITERAL) || (ps.getKind() == PseudostateKind.EXIT_POINT_LITERAL)) {
- State state = ps.getState();
- if (state != null) {
- return state;
- }
- StateMachine sm = ps.getStateMachine();
- if (sm != null) {
- return sm;
- }
- }
- }
- if (vertex instanceof Vertex) {
- return (Vertex) vertex;
- }
- return null;
- }
-
- @Override
- protected void doExecute() {
- oldRegion = (Region) transition.getOwner();
- changeContainer(transition);
- newRegion = (Region) transition.getOwner();
- }
-
- @Override
- protected void doUndo() {
- if (oldRegion != transition.getOwner()) {
- oldRegion.getTransitions().add(transition); // will remove transition automatically from original region
- }
- }
-
- @Override
- protected void doRedo() {
- if (newRegion != transition.getOwner()) {
- newRegion.getTransitions().add(transition); // will remove transition automatically from original region
- }
- }
-
- @Override
- protected boolean prepare() {
- return true;
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.statemachine.custom.commands;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.papyrus.infra.emf.gmf.util.GMFUnsafe;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Pseudostate;
+import org.eclipse.uml2.uml.PseudostateKind;
+import org.eclipse.uml2.uml.Region;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.Vertex;
+
+/**
+ * Customized transition-reorient command, takes changing of container into account.
+ *
+ * @author ansgar
+ *
+ */
+public class EMFCustomTransitionRetargetContainerCommand extends GMFUnsafe.UnsafeCommand {
+
+ protected Transition transition;
+
+ protected Region oldRegion;
+
+ protected Region newRegion;
+
+ public EMFCustomTransitionRetargetContainerCommand(Transition transition) {
+ super(TransactionUtil.getEditingDomain(transition));
+
+ this.transition = transition;
+ }
+
+
+ /**
+ * change the container of a transition, if necessary
+ */
+ public static boolean changeContainer(Transition transition) {
+ // now change container
+ Region region = deduceContainer(transition.getSource(), transition.getTarget());
+ if (region == null) {
+ return false; // transition is not valid
+ }
+ if (region != transition.getOwner()) {
+ region.getTransitions().add(transition); // will remove transition automatically from original region
+ }
+ return true;
+ }
+
+ /**
+ * Check whether a transition from source to target is valid
+ */
+ public static boolean isValid(EObject sourceE, EObject targetE) {
+ if (targetE == null) {
+ return true; // don't judge before knowing the target
+ }
+ NamedElement source = getNearestStateOrSM(sourceE);
+ NamedElement target = getNearestStateOrSM(targetE);
+ Region sourceRegion = getNearestRegion(source);
+ Region targetRegion = getNearestRegion(target);
+
+ if (isChild(source, targetRegion)) {
+ // transition starts from a composite state (or state-machine) to a vertex within this state
+ // assure that source is not an exit point
+ if (isExitPoint(sourceE)) {
+ return false; // source is an exit point, but target is within the inner part of a class (inverse condition)
+ }
+ if (isExitPoint(targetE)) {
+ return false; // standard condition
+ }
+ return true;
+ } else if (isChild(target, sourceRegion)) {
+ // transition from a vertex within the target points to target composite state (or state-machine)
+ // assure that target is not an entry point
+ if (isEntryPoint(sourceE)) {
+ return false; // standard condition
+ }
+ if (isEntryPoint(targetE)) {
+ return false; // source is an entry point, but target is outside the composite state
+
+ }
+ return true;
+ } else if (source == target) {
+ // source and target are on same state or state machine. Could be either an external or internal transition
+ // Allow transitions from entry to exit (internal) as well as from exit to entry (external)
+ // => only disallow from entry to entry and from exit to exit
+ if ((isEntryPoint(sourceE) && isEntryPoint(targetE)) || (isExitPoint(sourceE) && isExitPoint(targetE))) {
+ return false;
+ }
+ return true;
+ }
+
+ // standard conditions for external connections: start may not be a entry point, target not an exit point
+ if (isEntryPoint(sourceE)) {
+ return false;
+ }
+ if (isExitPoint(targetE)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Calculate the container. Also checks whether a transition is possible
+ *
+ * @param sourceE
+ * @param targetE
+ * @return
+ */
+ public static Region deduceContainer(EObject sourceE, EObject targetE) {
+ // Find container element for the new link.
+ NamedElement source = getNearestStateOrSM(sourceE);
+ if (targetE == null) {
+ // don't constraint until both source and target are given.
+ if (getNearestRegion(source) != null) {
+ return getNearestRegion(source);
+ } else {
+ return firstRegion(source);
+ }
+ }
+ NamedElement target = getNearestStateOrSM(targetE);
+ Region sourceRegion = getNearestRegion(source);
+ Region targetRegion = getNearestRegion(target);
+
+ if (isChild(source, targetRegion)) {
+ // transition starts from a composite state (or state-machine) to a vertex within this state
+ return childRegion(sourceRegion, source, targetRegion, target);
+ } else if (isChild(target, sourceRegion)) {
+ // transition from a vertex within the target points to target composite state (or state-machine)
+ return childRegion(targetRegion, target, sourceRegion, source);
+ } else if (source == target) {
+ // source and target are on same state or state machine. Could be either an external or internal transition
+ // Allow transitions from entry to exit (internal) as well as from exit to entry (external)
+ // => only disallow from entry to entry and from exit to exit
+ if (isEntryPoint(sourceE) || isExitPoint(targetE)) {
+ // is a local or internal transition, return first owned region
+ return firstRegion(source);
+ }
+ return sourceRegion;
+ }
+
+ if (isChild(targetRegion, sourceRegion)) {
+ // region of target state is a child of region of source state, choose the letter as "more global" region
+ // also include standard case, a transition between two states within same region
+ return targetRegion;
+ } else {
+ return sourceRegion;
+ }
+ }
+
+ public static Region childRegion(Region sourceRegion, NamedElement source, Region targetRegion, NamedElement target) {
+ // source state is parent of targetRegion => transition from composite state
+ // (or entry point of this state) to a target within composite
+ // need to choose a region of the state depending on target
+ EList<Region> regions = null;
+ if (source instanceof State) {
+ regions = ((State) source).getRegions();
+ } else if (source instanceof StateMachine) {
+ regions = ((StateMachine) source).getRegions();
+ }
+ if (regions != null) {
+ // should always be true, since we called getNearsetStateOrSM before
+ for (Region region : regions) {
+ if (isChild(region, targetRegion)) {
+ return region;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return the first region of a state or statemachine.
+ *
+ * @param source
+ * @return
+ */
+ public static Region firstRegion(EObject source) {
+ EList<Region> regions = null;
+ if (source instanceof State) {
+ regions = ((State) source).getRegions();
+ } else if (source instanceof StateMachine) {
+ regions = ((StateMachine) source).getRegions();
+ }
+ if ((regions != null) && (regions.size() > 0)) {
+ return regions.get(0);
+ } else {
+ return null;
+ }
+ }
+
+ public static boolean isChild(EObject parent, EObject child) {
+ for (EObject element = child; element != null; element = element.eContainer()) {
+ if (element == parent) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static boolean isEntryPoint(EObject vertex) {
+ if (vertex instanceof Pseudostate) {
+ Pseudostate ps = (Pseudostate) vertex;
+ if (ps.getKind() == PseudostateKind.ENTRY_POINT_LITERAL) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static boolean isExitPoint(EObject vertex) {
+ if (vertex instanceof Pseudostate) {
+ Pseudostate ps = (Pseudostate) vertex;
+ if (ps.getKind() == PseudostateKind.EXIT_POINT_LITERAL) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * Climb up by containment hierarchy starting from a given element
+ * and return the first region (as in default policy)
+ */
+ public static Region getNearestRegion(EObject startFrom) {
+ for (EObject element = startFrom; element != null; element = element.eContainer()) {
+ if (element instanceof Region) {
+ return (Region) element;
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Returns the nearest state or statemachine, if the passed element is a pseudo-state.
+ * This simplifies the calculation of a suitable container;
+ *
+ * @param vertex
+ * @return Return type is named element, since state and region have no other common superclass
+ */
+ public static NamedElement getNearestStateOrSM(EObject vertex) {
+ if (vertex instanceof Pseudostate) {
+ Pseudostate ps = (Pseudostate) vertex;
+ if ((ps.getKind() == PseudostateKind.ENTRY_POINT_LITERAL) || (ps.getKind() == PseudostateKind.EXIT_POINT_LITERAL)) {
+ State state = ps.getState();
+ if (state != null) {
+ return state;
+ }
+ StateMachine sm = ps.getStateMachine();
+ if (sm != null) {
+ return sm;
+ }
+ }
+ }
+ if (vertex instanceof Vertex) {
+ return (Vertex) vertex;
+ }
+ return null;
+ }
+
+ @Override
+ protected void doExecute() {
+ oldRegion = (Region) transition.getOwner();
+ changeContainer(transition);
+ newRegion = (Region) transition.getOwner();
+ }
+
+ @Override
+ protected void doUndo() {
+ if (oldRegion != transition.getOwner()) {
+ oldRegion.getTransitions().add(transition); // will remove transition automatically from original region
+ }
+ }
+
+ @Override
+ protected void doRedo() {
+ if (newRegion != transition.getOwner()) {
+ newRegion.getTransitions().add(transition); // will remove transition automatically from original region
+ }
+ }
+
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/listeners/AbstractModifcationTriggerListener.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/listeners/AbstractModifcationTriggerListener.java
index d25818e87c4..f767d8c42c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/listeners/AbstractModifcationTriggerListener.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/listeners/AbstractModifcationTriggerListener.java
@@ -20,7 +20,7 @@ import org.eclipse.emf.transaction.TriggerListener;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.ui.IEditorPart;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomRegionCompartmentCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomRegionCompartmentCreationEditPolicy.java
index 9c9fc7391db..f57804b2ffe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomRegionCompartmentCreationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomRegionCompartmentCreationEditPolicy.java
@@ -48,7 +48,7 @@ import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalC
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.CustomRegionCreateElementCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.EMFCustomTransitionRetargetContainerCommand;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/pom.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/pom.xml
index 573a3ac891f..4097a33a4be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/pom.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/pom.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus.uml-diagrams</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <artifactId>org.eclipse.papyrus.uml.diagram.statemachine</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml-diagrams</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.diagram.statemachine</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file

Back to the top