Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyCompositeDropEditPolicy.java')
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyCompositeDropEditPolicy.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyCompositeDropEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyCompositeDropEditPolicy.java
index 11b2d73ecd1..0f4522e9c93 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyCompositeDropEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyCompositeDropEditPolicy.java
@@ -37,7 +37,7 @@ import org.eclipse.uml2.uml.Property;
/**
* <pre>
- * Customization of the DND edit policy for BlockPropertyComposite that enables
+ * Customization of the DND edit policy for BlockPropertyComposite that enables
* type modification, or creation of new Port and FlowPort by a drop on target.
* </pre>
*/
@@ -68,7 +68,7 @@ public class CustomBlockPropertyCompositeDropEditPolicy extends CustomDragDropEd
protected ICommand getSpecificDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject, String nodeType, String edgeType) {
if (UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID.equals(nodeType)) {
ConstraintParameterDropHelper constraintParameterDropHelper = new ConstraintParameterDropHelper(getEditingDomain());
- Command commandParameterDropCommand = constraintParameterDropHelper.getDropConstraintParameterOnPart((Property)droppedEObject, dropRequest.getLocation().getCopy(), (GraphicalEditPart)getHost());
+ Command commandParameterDropCommand = constraintParameterDropHelper.getDropConstraintParameterOnPart((Property) droppedEObject, dropRequest.getLocation().getCopy(), (GraphicalEditPart) getHost());
return new CommandProxy(commandParameterDropCommand);
}
@@ -83,26 +83,26 @@ public class CustomBlockPropertyCompositeDropEditPolicy extends CustomDragDropEd
TypeDropHelper helper = new TypeDropHelper(getEditingDomain());
// Single drop management possible drop action list can be proposed
- if(dropRequest.getObjects().size() == 1) {
+ if (dropRequest.getObjects().size() == 1) {
// List of available drop commands
final List<Command> commandChoice = new ArrayList<Command>();
// 1. Try to set the target element type with dropped object
- Command dropAsSetType = helper.getDropAsTypedElementType(dropRequest, (GraphicalEditPart)getHost());
- if((dropAsSetType != null) && (dropAsSetType.canExecute())) {
+ Command dropAsSetType = helper.getDropAsTypedElementType(dropRequest, (GraphicalEditPart) getHost());
+ if ((dropAsSetType != null) && (dropAsSetType.canExecute())) {
commandChoice.add(dropAsSetType);
}
// 2. Build default drop command (show view of the dropped object)
Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
- if((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
commandChoice.add(defaultDropCommand);
}
// Prepare the selection command (if several command are available) or return the drop command
- if(commandChoice.size() > 1) {
+ if (commandChoice.size() > 1) {
RunnableWithResult<ICommand> runnable;
Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
@@ -114,7 +114,7 @@ public class CustomBlockPropertyCompositeDropEditPolicy extends CustomDragDropEd
ICommand selectCommand = runnable.getResult();
return new ICommandProxy(selectCommand);
- } else if(commandChoice.size() == 1) {
+ } else if (commandChoice.size() == 1) {
return commandChoice.get(0);
}

Back to the top