Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java50
33 files changed, 455 insertions, 562 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java
index b591034abdd..d6b6150cf1c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java
@@ -13,6 +13,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.CompactStateInvariantCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DestructionOccurrenceSpecificationCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DurationConstraintCreateCommandCN;
@@ -42,8 +43,8 @@ public class CompactLifelineCompartmentItemSemanticEditPolicyCN extends UMLBaseI
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -54,8 +55,7 @@ public class CompactLifelineCompartmentItemSemanticEditPolicyCN extends UMLBaseI
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -64,57 +64,56 @@ public class CompactLifelineCompartmentItemSemanticEditPolicyCN extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CompactStateInvariantCreateCommandCN(req));
+ return getGEFWrapper(new CompactStateInvariantCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OccurrenceSpecification_12 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new OccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.MessageOccurrenceSpecification_13 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new MessageOccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new MessageOccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DestructionOccurrenceSpecification_27 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_18 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_17 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationObservationCreateCommandCN(req));
+ return getGEFWrapper(new DurationObservationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_15 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommand(req));
+ return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_16 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeObservationCreateCommand(req));
+ return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.GeneralOrdering_67 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new GeneralOrderingCreateCommand(req));
+ return getGEFWrapper(new GeneralOrderingCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java
index 35430e90f2d..d511667691c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
index 75528f51e37..67674586c5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
@@ -33,8 +33,8 @@ public class CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN extends
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -45,13 +45,11 @@ public class CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN extends
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java
index 34cf94b472e..e6245ba1791 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java
index 54131bcc319..bd48a03cfc1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java
@@ -62,13 +62,12 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -80,16 +79,16 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -100,8 +99,7 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -154,8 +152,8 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -166,8 +164,7 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -224,7 +221,7 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageSyncEditPart.VISUAL_ID:
return getGEFWrapper(new MessageSyncReorientCommand(req));
@@ -243,5 +240,4 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java
index d1b48b72954..6704305bfd5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java
index 93cca0e6d66..bb0d2900ab1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java
index fdbdd05ba22..3492ae2d96c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java
index 340edfbf3fa..e519a13860f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java
@@ -33,8 +33,8 @@ public class FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN exte
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -45,13 +45,11 @@ public class FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN exte
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
index 71294a04fc9..7c715eea807 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
@@ -33,8 +33,8 @@ public class FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN extends UM
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -45,13 +45,11 @@ public class FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN extends UM
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java
index 8ea077efd8f..6ea609ee11f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java
@@ -13,6 +13,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DestructionOccurrenceSpecificationCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DurationConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DurationObservationCreateCommandCN;
@@ -42,8 +43,8 @@ public class FullLifelineTimelineCompartmentItemSemanticEditPolicyCN extends UML
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -54,8 +55,7 @@ public class FullLifelineTimelineCompartmentItemSemanticEditPolicyCN extends UML
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -64,57 +64,56 @@ public class FullLifelineTimelineCompartmentItemSemanticEditPolicyCN extends UML
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FullStateInvariantCreateCommandCN(req));
+ return getGEFWrapper(new FullStateInvariantCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OccurrenceSpecification_12 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new OccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.MessageOccurrenceSpecification_13 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new MessageOccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new MessageOccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DestructionOccurrenceSpecification_27 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_18 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_17 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationObservationCreateCommandCN(req));
+ return getGEFWrapper(new DurationObservationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_15 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommand(req));
+ return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_16 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeObservationCreateCommand(req));
+ return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.GeneralOrdering_67 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new GeneralOrderingCreateCommand(req));
+ return getGEFWrapper(new GeneralOrderingCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java
index 19b2c6a2450..6f17fc0a148 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java
index e190f061e29..c56d2b1a8b6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java
@@ -62,13 +62,12 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -80,16 +79,16 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -100,8 +99,7 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -154,8 +152,8 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -166,8 +164,7 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -224,7 +221,7 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageSyncEditPart.VISUAL_ID:
return getGEFWrapper(new MessageSyncReorientCommand(req));
@@ -243,5 +240,4 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
index ed3cbe1fc87..b48b1468880 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java
index 69ab0662cdd..97657b54fca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java
@@ -13,6 +13,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.CompactLifelineCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.FullLifelineCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.providers.UMLElementTypes;
@@ -35,8 +36,8 @@ public class InteractionCompartmentItemSemanticEditPolicyTN extends UMLBaseItemS
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -47,8 +48,7 @@ public class InteractionCompartmentItemSemanticEditPolicyTN extends UMLBaseItemS
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -57,15 +57,14 @@ public class InteractionCompartmentItemSemanticEditPolicyTN extends UMLBaseItemS
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FullLifelineCreateCommandCN(req));
+ return getGEFWrapper(new FullLifelineCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Lifeline_20 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CompactLifelineCreateCommandCN(req));
+ return getGEFWrapper(new CompactLifelineCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java
index 8cac636666b..951e7cbe0fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java
@@ -20,6 +20,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.GateCreateCommand;
@@ -49,8 +50,8 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -61,8 +62,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -71,7 +71,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new GateCreateCommand(req));
+ return getGEFWrapper(new GateCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
@@ -80,13 +80,12 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -98,16 +97,16 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +117,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -139,8 +137,8 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -151,8 +149,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -176,7 +173,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -185,5 +182,4 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java
index 7ae3dc0af57..b220587bea3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java
index c21cdaac003..8be6b8c5405 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java
index 045509d391d..6b5ae8ebec7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java
index aa34ce1db35..4a66baa1d11 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java
index 545da71153f..b66876f0a6c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java
index 2db6c1a129c..8122664ee02 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java
index b208e5ef77d..1eb64daf1de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java
@@ -62,13 +62,12 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -80,16 +79,16 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -100,8 +99,7 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -154,8 +152,8 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -166,8 +164,7 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -224,7 +221,7 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageSyncEditPart.VISUAL_ID:
return getGEFWrapper(new MessageSyncReorientCommand(req));
@@ -243,5 +240,4 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java
index dd1493ea725..9d954226292 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java
index dd20f687f39..110751085f6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java
index 96f23dfc1ca..b005705e735 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java
index 6a780ca14b0..eb03a240084 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java
index 1efd5463cc4..0bff4374b8b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java
index ca41ca53b9d..786d6f8d57a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java
@@ -33,8 +33,8 @@ public class TimeRulerCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSem
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -45,13 +45,11 @@ public class TimeRulerCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSem
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java
index 82de5aedcc9..faf71de7429 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.InteractionCreateCommandTN;
import org.eclipse.papyrus.uml.diagram.timing.providers.UMLElementTypes;
@@ -39,8 +40,8 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -51,8 +52,7 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -61,7 +61,7 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCreateCommandTN(req));
+ return getGEFWrapper(new InteractionCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
@@ -70,8 +70,8 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
* @generated
*/
@Override
- protected Command getDuplicateCommand(final DuplicateElementsRequest req) {
- final TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
+ protected Command getDuplicateCommand(DuplicateElementsRequest req) {
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
Diagram currentDiagram = null;
if(getHost() instanceof IGraphicalEditPart) {
currentDiagram = ((IGraphicalEditPart)getHost()).getNotationView().getDiagram();
@@ -87,15 +87,14 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
/**
* @generated
*/
- private final Diagram diagram;
+ private Diagram diagram;
/**
* @generated
*/
- public DuplicateAnythingCommand(final TransactionalEditingDomain editingDomain, final DuplicateElementsRequest req, final Diagram currentDiagram) {
+ public DuplicateAnythingCommand(TransactionalEditingDomain editingDomain, DuplicateElementsRequest req, Diagram currentDiagram) {
super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap(), currentDiagram);
this.diagram = currentDiagram;
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 0387a764619..cd6ebf02c73 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -81,8 +81,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected UMLBaseItemSemanticEditPolicy(final IElementType elementType) {
- this.myElementType = elementType;
+ protected UMLBaseItemSemanticEditPolicy(IElementType elementType) {
+ myElementType = elementType;
}
/**
@@ -96,13 +96,13 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
@Override
@SuppressWarnings("unchecked")
- public Command getCommand(final Request request) {
+ public Command getCommand(Request request) {
if(request instanceof ReconnectRequest) {
- final Object view = ((ReconnectRequest)request).getConnectionEditPart().getModel();
+ Object view = ((ReconnectRequest)request).getConnectionEditPart().getModel();
if(view instanceof View) {
- final Integer id = new Integer(UMLVisualIDRegistry.getVisualID((View)view));
+ Integer id = new Integer(UMLVisualIDRegistry.getVisualID((View)view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
- request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, view);
+ request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, (View)view);
}
}
return super.getCommand(request);
@@ -113,8 +113,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*
* @generated
*/
- protected int getVisualID(final IEditCommandRequest request) {
- final Object id = request.getParameter(VISUAL_ID_KEY);
+ protected int getVisualID(IEditCommandRequest request) {
+ Object id = request.getParameter(VISUAL_ID_KEY);
return id instanceof Integer ? ((Integer)id).intValue() : -1;
}
@@ -122,12 +122,12 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
@Override
- protected Command getSemanticCommand(final IEditCommandRequest request) {
- final IEditCommandRequest completedRequest = completeRequest(request);
+ protected Command getSemanticCommand(IEditCommandRequest request) {
+ IEditCommandRequest completedRequest = completeRequest(request);
Command semanticCommand = getSemanticCommandSwitch(completedRequest);
semanticCommand = getEditHelperCommand(completedRequest, semanticCommand);
if(completedRequest instanceof DestroyRequest) {
- final DestroyRequest destroyRequest = (DestroyRequest)completedRequest;
+ DestroyRequest destroyRequest = (DestroyRequest)completedRequest;
return shouldProceed(destroyRequest) ? addDeleteViewCommand(semanticCommand, destroyRequest) : null;
}
return semanticCommand;
@@ -136,20 +136,20 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command addDeleteViewCommand(final Command mainCommand, final DestroyRequest completedRequest) {
- final Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
+ protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
+ Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
}
/**
* @generated
*/
- private Command getEditHelperCommand(final IEditCommandRequest request, final Command editPolicyCommand) {
+ private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
if(editPolicyCommand != null) {
- final ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy)editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
+ ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy)editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, command);
}
- final IElementType requestContextElementType = getContextElementType(request);
+ IElementType requestContextElementType = getContextElementType(request);
request.setParameter(GeneratedEditHelperBase.CONTEXT_ELEMENT_TYPE, requestContextElementType);
ICommand command = requestContextElementType.getEditCommand(request);
request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, null);
@@ -166,15 +166,15 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected IElementType getContextElementType(final IEditCommandRequest request) {
- final IElementType requestContextElementType = UMLElementTypes.getElementType(getVisualID(request));
- return requestContextElementType != null ? requestContextElementType : this.myElementType;
+ protected IElementType getContextElementType(IEditCommandRequest request) {
+ IElementType requestContextElementType = UMLElementTypes.getElementType(getVisualID(request));
+ return requestContextElementType != null ? requestContextElementType : myElementType;
}
/**
* @generated
*/
- protected Command getSemanticCommandSwitch(final IEditCommandRequest req) {
+ protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
if(req instanceof CreateRelationshipRequest) {
return getCreateRelationshipCommand((CreateRelationshipRequest)req);
} else if(req instanceof CreateElementRequest) {
@@ -204,22 +204,22 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getConfigureCommand(final ConfigureRequest req) {
+ protected Command getConfigureCommand(ConfigureRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getCreateCommand(final CreateElementRequest req) {
- // no more usage of the extended types here.
+ protected Command getCreateCommand(CreateElementRequest req) {
+ // no more usage of the extended types here.
return null;
}
@@ -227,39 +227,39 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedTypeCreationCommand(final CreateElementRequest request, final IExtendedHintedElementType requestElementType) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
+ protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
- final ICommand createGMFCommand = provider.getEditCommand(request);
+ ICommand createGMFCommand = provider.getEditCommand(request);
return getGEFWrapper(createGMFCommand);
}
/**
* @generated
*/
- protected Command getExtendedStartCreateRelationshipCommand(final CreateElementRequest request, final IExtendedHintedElementType requestElementType) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
+ protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
- final ICommand createGMFCommand = provider.getEditCommand(request);
+ ICommand createGMFCommand = provider.getEditCommand(request);
return getGEFWrapper(createGMFCommand);
}
/**
* @generated
*/
- protected Command getExtendedCompleteCreateRelationshipCommand(final CreateElementRequest request, final IExtendedHintedElementType requestElementType) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
+ protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
- final ICommand createGMFCommand = provider.getEditCommand(request);
+ ICommand createGMFCommand = provider.getEditCommand(request);
return getGEFWrapper(createGMFCommand);
}
@@ -267,48 +267,47 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getSetCommand(final SetRequest req) {
+ protected Command getSetCommand(SetRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getEditContextCommand(final GetEditContextRequest req) {
+ protected Command getEditContextCommand(GetEditContextRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getDestroyReferenceCommand(final DestroyReferenceRequest req) {
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getDuplicateCommand(final DuplicateElementsRequest req) {
+ protected Command getDuplicateCommand(DuplicateElementsRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getMoveCommand(final MoveRequest req) {
-
- final EObject targetCEObject = req.getTargetContainer();
+ protected Command getMoveCommand(MoveRequest req) {
+ EObject targetCEObject = req.getTargetContainer();
if(targetCEObject != null) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
if(provider != null) {
- final ICommand moveCommand = provider.getEditCommand(req);
+ ICommand moveCommand = provider.getEditCommand(req);
if(moveCommand != null) {
return new ICommandProxy(moveCommand);
}
@@ -317,27 +316,26 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
} else {
return getGEFWrapper(new MoveElementsCommand(req));
}
-
}
/**
* @generated
*/
- protected Command getReorientReferenceRelationshipCommand(final ReorientReferenceRelationshipRequest req) {
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
return UnexecutableCommand.INSTANCE;
}
/**
* @generated
*/
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
return UnexecutableCommand.INSTANCE;
}
/**
* @generated
*/
- protected final Command getGEFWrapper(final ICommand cmd) {
+ protected final Command getGEFWrapper(ICommand cmd) {
return new ICommandProxy(cmd);
}
@@ -355,10 +353,10 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*
* @generated
*/
- protected void addDestroyShortcutsCommand(final ICompositeCommand cmd, final View view) {
+ protected void addDestroyShortcutsCommand(ICompositeCommand cmd, View view) {
assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
- for(final Iterator it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
- final View nextView = (View)it.next();
+ for(Iterator it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
+ View nextView = (View)it.next();
if(nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
continue;
}
@@ -392,100 +390,99 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateMessage_3(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_3(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_3(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_4(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_4(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_4(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_41(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_41(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_41(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_44(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_44(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_44(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_47(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_47(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_47(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_50(final Interaction container, final MessageEnd source, final Element target) {
+ public boolean canCreateMessage_50(Interaction container, MessageEnd source, Element target) {
return canExistMessage_50(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_53(final Interaction container, final Element source, final MessageEnd target) {
+ public boolean canCreateMessage_53(Interaction container, Element source, MessageEnd target) {
return canExistMessage_53(container, null, source, target);
}
/**
* @generated
*/
- public boolean canExistMessage_3(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_3(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_4(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_4(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_41(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_41(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_44(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_44(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_47(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_47(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_50(final Interaction container, final Message linkInstance, final MessageEnd source, final Element target) {
+ public boolean canExistMessage_50(Interaction container, Message linkInstance, MessageEnd source, Element target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_53(final Interaction container, final Message linkInstance, final Element source, final MessageEnd target) {
+ public boolean canExistMessage_53(Interaction container, Message linkInstance, Element source, MessageEnd target) {
return true;
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java
index 80bcd5386fd..aa740184aa5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java
@@ -72,7 +72,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
hideSelection();
- addFeedback(this.selectionFeedbackFigure = createSelectionFeedbackFigure());
+ addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
getHostFigure().addFigureListener(getHostPositionListener());
refreshSelectionFeedback();
hideFocus();
@@ -88,10 +88,10 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
((WrappingLabel)getHostFigure()).setSelected(false);
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if(this.selectionFeedbackFigure != null) {
- removeFeedback(this.selectionFeedbackFigure);
+ if(selectionFeedbackFigure != null) {
+ removeFeedback(selectionFeedbackFigure);
getHostFigure().removeFigureListener(getHostPositionListener());
- this.selectionFeedbackFigure = null;
+ selectionFeedbackFigure = null;
}
hideFocus();
}
@@ -106,7 +106,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
((WrappingLabel)getHostFigure()).setFocus(true);
} else {
hideFocus();
- addFeedback(this.focusFeedbackFigure = createFocusFeedbackFigure());
+ addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
refreshFocusFeedback();
}
}
@@ -119,9 +119,9 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
if(getHostFigure() instanceof WrappingLabel) {
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if(this.focusFeedbackFigure != null) {
- removeFeedback(this.focusFeedbackFigure);
- this.focusFeedbackFigure = null;
+ if(focusFeedbackFigure != null) {
+ removeFeedback(focusFeedbackFigure);
+ focusFeedbackFigure = null;
}
}
}
@@ -147,13 +147,13 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
*/
protected IFigure createSelectionFeedbackFigure() {
if(getHostFigure() instanceof Label) {
- final Label feedbackFigure = new Label();
+ Label feedbackFigure = new Label();
feedbackFigure.setOpaque(true);
feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
return feedbackFigure;
} else {
- final RectangleFigure feedbackFigure = new RectangleFigure();
+ RectangleFigure feedbackFigure = new RectangleFigure();
feedbackFigure.setFill(false);
return feedbackFigure;
}
@@ -165,8 +165,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
protected IFigure createFocusFeedbackFigure() {
return new Figure() {
- @Override
- protected void paintFigure(final Graphics graphics) {
+ protected void paintFigure(Graphics graphics) {
graphics.drawFocus(getBounds().getResized(-1, -1));
}
};
@@ -175,8 +174,8 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
/**
* @generated
*/
- protected void updateLabel(final Label target) {
- final Label source = (Label)getHostFigure();
+ protected void updateLabel(Label target) {
+ Label source = (Label)getHostFigure();
target.setText(source.getText());
target.setTextAlignment(source.getTextAlignment());
target.setFont(source.getFont());
@@ -186,12 +185,12 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
protected void refreshSelectionFeedback() {
- if(this.selectionFeedbackFigure != null) {
- if(this.selectionFeedbackFigure instanceof Label) {
- updateLabel((Label)this.selectionFeedbackFigure);
- this.selectionFeedbackFigure.setBounds(getFeedbackBounds());
+ if(selectionFeedbackFigure != null) {
+ if(selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label)selectionFeedbackFigure);
+ selectionFeedbackFigure.setBounds(getFeedbackBounds());
} else {
- this.selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
+ selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
}
}
}
@@ -200,8 +199,8 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
protected void refreshFocusFeedback() {
- if(this.focusFeedbackFigure != null) {
- this.focusFeedbackFigure.setBounds(getFeedbackBounds());
+ if(focusFeedbackFigure != null) {
+ focusFeedbackFigure.setBounds(getFeedbackBounds());
}
}
@@ -217,15 +216,15 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
private FigureListener getHostPositionListener() {
- if(this.hostPositionListener == null) {
- this.hostPositionListener = new FigureListener() {
+ if(hostPositionListener == null) {
+ hostPositionListener = new FigureListener() {
- public void figureMoved(final IFigure source) {
+ public void figureMoved(IFigure source) {
refreshFeedback();
}
};
}
- return this.hostPositionListener;
+ return hostPositionListener;
}
/**
@@ -233,10 +232,9 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
*/
@Override
protected List createSelectionHandles() {
- final MoveHandle moveHandle = new MoveHandle((GraphicalEditPart)getHost());
+ MoveHandle moveHandle = new MoveHandle((GraphicalEditPart)getHost());
moveHandle.setBorder(null);
moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
return Collections.singletonList(moveHandle);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java
index d9f06ea32da..7b2da04390d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java
@@ -66,7 +66,7 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
hideSelection();
- addFeedback(this.selectionFeedbackFigure = createSelectionFeedbackFigure());
+ addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
getHostFigure().addFigureListener(getHostPositionListener());
refreshSelectionFeedback();
hideFocus();
@@ -82,10 +82,10 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
((WrappingLabel)getHostFigure()).setSelected(false);
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if(this.selectionFeedbackFigure != null) {
- removeFeedback(this.selectionFeedbackFigure);
+ if(selectionFeedbackFigure != null) {
+ removeFeedback(selectionFeedbackFigure);
getHostFigure().removeFigureListener(getHostPositionListener());
- this.selectionFeedbackFigure = null;
+ selectionFeedbackFigure = null;
}
hideFocus();
}
@@ -100,7 +100,7 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
((WrappingLabel)getHostFigure()).setFocus(true);
} else {
hideFocus();
- addFeedback(this.focusFeedbackFigure = createFocusFeedbackFigure());
+ addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
refreshFocusFeedback();
}
}
@@ -113,9 +113,9 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
if(getHostFigure() instanceof WrappingLabel) {
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if(this.focusFeedbackFigure != null) {
- removeFeedback(this.focusFeedbackFigure);
- this.focusFeedbackFigure = null;
+ if(focusFeedbackFigure != null) {
+ removeFeedback(focusFeedbackFigure);
+ focusFeedbackFigure = null;
}
}
}
@@ -141,13 +141,13 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
*/
protected IFigure createSelectionFeedbackFigure() {
if(getHostFigure() instanceof Label) {
- final Label feedbackFigure = new Label();
+ Label feedbackFigure = new Label();
feedbackFigure.setOpaque(true);
feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
return feedbackFigure;
} else {
- final RectangleFigure feedbackFigure = new RectangleFigure();
+ RectangleFigure feedbackFigure = new RectangleFigure();
feedbackFigure.setFill(false);
return feedbackFigure;
}
@@ -159,8 +159,7 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
protected IFigure createFocusFeedbackFigure() {
return new Figure() {
- @Override
- protected void paintFigure(final Graphics graphics) {
+ protected void paintFigure(Graphics graphics) {
graphics.drawFocus(getBounds().getResized(-1, -1));
}
};
@@ -169,8 +168,8 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
/**
* @generated
*/
- protected void updateLabel(final Label target) {
- final Label source = (Label)getHostFigure();
+ protected void updateLabel(Label target) {
+ Label source = (Label)getHostFigure();
target.setText(source.getText());
target.setTextAlignment(source.getTextAlignment());
target.setFont(source.getFont());
@@ -180,12 +179,12 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
protected void refreshSelectionFeedback() {
- if(this.selectionFeedbackFigure != null) {
- if(this.selectionFeedbackFigure instanceof Label) {
- updateLabel((Label)this.selectionFeedbackFigure);
- this.selectionFeedbackFigure.setBounds(getFeedbackBounds());
+ if(selectionFeedbackFigure != null) {
+ if(selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label)selectionFeedbackFigure);
+ selectionFeedbackFigure.setBounds(getFeedbackBounds());
} else {
- this.selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
+ selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
}
}
}
@@ -194,8 +193,8 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
protected void refreshFocusFeedback() {
- if(this.focusFeedbackFigure != null) {
- this.focusFeedbackFigure.setBounds(getFeedbackBounds());
+ if(focusFeedbackFigure != null) {
+ focusFeedbackFigure.setBounds(getFeedbackBounds());
}
}
@@ -211,15 +210,14 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
private FigureListener getHostPositionListener() {
- if(this.hostPositionListener == null) {
- this.hostPositionListener = new FigureListener() {
+ if(hostPositionListener == null) {
+ hostPositionListener = new FigureListener() {
- public void figureMoved(final IFigure source) {
+ public void figureMoved(IFigure source) {
refreshFeedback();
}
};
}
- return this.hostPositionListener;
+ return hostPositionListener;
}
-
}

Back to the top