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/LifelineItemSemanticEditPolicy.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java30
1 files changed, 13 insertions, 17 deletions
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);
}
-
}

Back to the top