Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Noyrit2015-03-24 14:17:03 +0000
committerFlorian Noyrit2015-03-24 14:17:03 +0000
commit0ccc883dcc985a6e090d4d9b366853db6793cebe (patch)
tree8780bd1d40454d980f3bd6946658305a3a44685a
parentf9863ff669e7f4b2d7471fed2cd6f25f9e928dd0 (diff)
parent32d10df9853e77638ba1a35ee710af78295ba085 (diff)
downloadorg.eclipse.papyrus-0ccc883dcc985a6e090d4d9b366853db6793cebe.tar.gz
org.eclipse.papyrus-0ccc883dcc985a6e090d4d9b366853db6793cebe.tar.xz
org.eclipse.papyrus-0ccc883dcc985a6e090d4d9b366853db6793cebe.zip
Merge branch 'master' of ssh://fnoyrit@git.eclipse.org:29418/papyrus/org.eclipse.papyrus
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java8
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/org.eclipse.papyrus.uml.diagram.communication.tests.launch91
5 files changed, 259 insertions, 203 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java
index 71623baf2e8..0b02d57bbfe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CommunicationDeferredCreateConnectionViewCommand.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@
*
* Contributors:
* Saadia Dhouib saadia.dhouib@cea.fr - Initial API and Implementation
+ * Christian W. Damus - bug 462958
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication.custom.commands;
@@ -17,6 +17,7 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPartViewer;
@@ -26,8 +27,12 @@ import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
@@ -96,14 +101,32 @@ public class CommunicationDeferredCreateConnectionViewCommand extends CommonDefe
CreateConnectionViewRequest createRequest = new CreateConnectionViewRequest(viewDescriptor);
createConnectionCmd = CreateConnectionViewRequest.getCreateCommand(createRequest, sourceEditPart, targetEditPart);
- if (createConnectionCmd.canExecute()) {
- createConnectionCmd.execute();
+ // Double-check that another drop command didn't already create the edge
+ View messagePath = findCommunicationPath(sourceEditPart, targetEditPart);
+ if (messagePath != null) {
+ // Pretend that we created it
+ createRequest.getConnectionViewDescriptor().setView(messagePath);
+
+ // And create a label, instead
+ if (labelElement != null) {
+ IAdaptable semanticAdapter = new SemanticAdapter(labelElement, null);
+ // Location where the label will be dropped, as in the drop edit policy
+ Point loc = new Point(1, -23);
+ ICommand cmd = new CustomMessageViewCreateCommand(getEditingDomain(), viewer, preferencesHint, loc, semanticAdapter, messagePath);
+ if (cmd.canExecute()) {
+ cmd.execute(null, null);
+ }
+ }
+ } else {
+ if (createConnectionCmd.canExecute()) {
+ createConnectionCmd.execute();
+ }
}
if (labelElement != null) {
/*
* Code Commented to no more set the the semantic element of the connector
- *
+ *
* //Set element of the connector to Interaction !! This has to be changed in the next release, because it is incoherent !!!
* //If setElement(null) , I can not do the reorient anymore !!
* // View temp = (View)(createRequest.getConnectionViewDescriptor().getAdapter(View.class));
@@ -119,20 +142,22 @@ public class CommunicationDeferredCreateConnectionViewCommand extends CommonDefe
* // }
*/
+ messagePath = (View) createRequest.getConnectionViewDescriptor().getAdapter(View.class);
+ if (messagePath == null) {
+ viewer = null;// for garbage collection
+ return CommandResult.newErrorCommandResult("Failed to obtain or create communication-path link.");
+ }
+
// set element of the label of the connector to element
- if (((View) (createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().size() > 1) {
-
- for (int i = 0; i < ((View) (createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().size(); i++) {
- // ---------------------------------------------------------
- // help to debug
- // System.err.println("Child of connector view :" + (((View)(createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().get(i)));
- // System.err.println("VisualID of Child of connector view :" + UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID));
- // System.err.println("VisualID of MessageNameEditPart :" + ((View)(((View)(createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().get(i))).getType());
- // ---------------------------------------------------------
- if (((View) (((View) (createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().get(i))).getType().equals(UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID))) {// this is the label that coresponds to the
- // message
- ((View) (((View) (createRequest.getConnectionViewDescriptor().getAdapter(View.class))).getChildren().get(i))).setElement(labelElement);
- // System.err.println("VisualID of MessageNameEditPart == VisualID of Child of connector view ");
+ if (messagePath.getChildren().size() > 1) {
+
+ for (int i = 0; i < messagePath.getChildren().size(); i++) {
+ View label = (View) (messagePath.getChildren().get(i));
+ if (UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID).equals(label.getType())) {
+ // This is a message label. Is it the one we need to set?
+ if (!label.eIsSet(NotationPackage.Literals.VIEW__ELEMENT) || (label.getElement() == null)) {
+ label.setElement(labelElement);
+ }
}
}
}
@@ -140,6 +165,36 @@ public class CommunicationDeferredCreateConnectionViewCommand extends CommonDefe
}
viewer = null;// for garbage collection
- return CommandResult.newOKCommandResult();
+ return CommandResult.newOKCommandResult(createRequest.getConnectionViewDescriptor());
+ }
+
+ @SuppressWarnings("unchecked")
+ protected View findCommunicationPath(IGraphicalEditPart sourceEditPart, IGraphicalEditPart targetEditPart) {
+ View result = null;
+
+ View sourceView = sourceEditPart.getNotationView();
+ View targetView = targetEditPart.getNotationView();
+
+ if ((sourceView != null) && (targetView != null)) {
+ for (Edge next : (Iterable<? extends Edge>) sourceView.getSourceEdges()) {
+ if ((UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID)).equals(next.getType())
+ && (next.getTarget() == targetView)) {
+ result = next;
+ break;
+ }
+ }
+ if (result == null) {
+ // Try the reverse orientation
+ for (Edge next : (Iterable<? extends Edge>) sourceView.getTargetEdges()) {
+ if ((UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID)).equals(next.getType())
+ && (next.getSource() == targetView)) {
+ result = next;
+ break;
+ }
+ }
+ }
+ }
+
+ return result;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java
index fc5b78c8dd6..6a9c48d4f67 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomMessageViewCreateCommand.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,7 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Saadia Dhouib saadia.dhouib@cea.fr
+ * Saadia Dhouib saadia.dhouib@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 462958
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication.custom.commands;
@@ -24,7 +24,6 @@ import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
@@ -38,7 +37,7 @@ import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
@@ -74,7 +73,7 @@ public class CustomMessageViewCreateCommand extends AbstractTransactionalCommand
private EditPartViewer viewer;
/** The existing link. */
- private ConnectionEditPart existingLink;
+ private View existingLink;
/**
* Instantiates a new custom message view create command.
@@ -94,7 +93,7 @@ public class CustomMessageViewCreateCommand extends AbstractTransactionalCommand
* @param link
* the link
*/
- public CustomMessageViewCreateCommand(TransactionalEditingDomain domain, EditPartViewer viewer, PreferencesHint preferencesHint, Point point, IAdaptable semanticAdapter, ConnectionEditPart link) {
+ public CustomMessageViewCreateCommand(TransactionalEditingDomain domain, EditPartViewer viewer, PreferencesHint preferencesHint, Point point, IAdaptable semanticAdapter, View link) {
super(domain, "MessageClassViewCreateCommand", null); //$NON-NLS-1$
// this.containerView = container;
this.viewer = viewer;
@@ -114,13 +113,10 @@ public class CustomMessageViewCreateCommand extends AbstractTransactionalCommand
* @return
* @throws ExecutionException
*/
- @SuppressWarnings("static-access")
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // IFigure linkEditPart = (IFigure)existingLink.getFigure();
- View linkView = ((IGraphicalEditPart) existingLink).getNotationView();
// Connector linkConnector = linkView.get
- CustomMessageViewCreateCommand.node = customCreateLabel(((EObject) semanticApdater.getAdapter(EObject.class)), linkView, UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID));
+ CustomMessageViewCreateCommand.node = customCreateLabel(((EObject) semanticApdater.getAdapter(EObject.class)), existingLink, UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID));
// put to the good position
Location notationLocation = NotationFactory.eINSTANCE.createLocation();
// notationLocation.setX(location.x);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
index dec8cd5f19f..e310326380b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/CustomDiagramDragDropEditPolicy.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
+ * Copyright (c) 2010, 2015 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,9 +7,10 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
-
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
* Vincent LORENZO (CEA-LIST) vincent.lorenzo@cea.fr
+ * Christian W. Damus - bug 462958
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies;
@@ -46,8 +46,8 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewServiceUtil;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CommunicationDeferredCreateConnectionViewCommand;
import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CustomMessageViewCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.custom.helper.CommunicationLinkMappingHelper;
@@ -90,7 +90,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Gets the UML element type.
*
* @param elementID
- * the element id
+ * the element id
* @return the UML element type {@inheritDoc}
*/
@Override
@@ -102,9 +102,9 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Gets the node visual id.
*
* @param containerView
- * the container view
+ * the container view
* @param domainElement
- * the domain element
+ * the domain element
* @return the node visual id {@inheritDoc}
*/
@Override
@@ -116,7 +116,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Gets the link with class visual id.
*
* @param domainElement
- * the domain element
+ * the domain element
* @return the link with class visual id {@inheritDoc}
*/
@Override
@@ -125,8 +125,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
}
/**
- * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy#getSpecificDropCommand(org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest,
- * org.eclipse.uml2.uml.Element, int, int)
+ * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy#getSpecificDropCommand(org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest, org.eclipse.uml2.uml.Element, int, int)
*
* @param dropRequest
* @param semanticElement
@@ -136,22 +135,22 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
*/
@Override
protected Command getSpecificDropCommand(DropObjectsRequest dropRequest, Element semanticElement, int nodeVISUALID, int linkVISUALID) {
- switch(linkVISUALID) {
+ switch (linkVISUALID) {
case MessageEditPart.VISUAL_ID:
return dropMessage(dropRequest, semanticElement, linkVISUALID);
default:
// Switch test over nodeVISUALID
- switch(nodeVISUALID) {
+ switch (nodeVISUALID) {
case LifelineEditPartCN.VISUAL_ID:
return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
- // case CommentEditPartCN.VISUAL_ID:
- // return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
- // case ConstraintEditPartCN.VISUAL_ID:
- // return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
+ // case CommentEditPartCN.VISUAL_ID:
+ // return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
+ // case ConstraintEditPartCN.VISUAL_ID:
+ // return dropChildNode(dropRequest, semanticElement, nodeVISUALID);
case TimeObservationEditPartCN.VISUAL_ID:
- return dropTimeObservation(dropRequest, (TimeObservation)semanticElement, nodeVISUALID);
+ return dropTimeObservation(dropRequest, (TimeObservation) semanticElement, nodeVISUALID);
case DurationObservationEditPartCN.VISUAL_ID:
- return dropDurationObservation(dropRequest, (DurationObservation)semanticElement, nodeVISUALID);
+ return dropDurationObservation(dropRequest, (DurationObservation) semanticElement, nodeVISUALID);
case CommentEditPartCN.VISUAL_ID:
return dropComment(dropRequest, semanticElement, nodeVISUALID);
case ConstraintEditPartCN.VISUAL_ID:
@@ -166,86 +165,88 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Returns the command to drop the Comment + the link to attach it to its annotated elements
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param nodeVISUALID
- * the node visual id
+ * the node visual id
*
* @return the command
*/
protected Command dropComment(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof Interaction)) {
+ if (!(graphicalParentObject instanceof Interaction)) {
return UnexecutableCommand.INSTANCE;
}
- return getDropCommentCommand((Comment)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView(), (IHintedType)UMLElementTypes.Comment_8005, (IHintedType)UMLElementTypes.CommentAnnotatedElement_8010);
+ return getDropCommentCommand((Comment) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView(), (IHintedType) UMLElementTypes.Comment_8005,
+ (IHintedType) UMLElementTypes.CommentAnnotatedElement_8010);
}
/**
* Returns the command to drop the Constraint + the link to attach it to its contrainted elements
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param nodeVISUALID
- * the node visual id
+ * the node visual id
*
* @return the command
*/
protected Command dropConstraint(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof Interaction)) {
+ if (!(graphicalParentObject instanceof Interaction)) {
return UnexecutableCommand.INSTANCE;
}
- return getDropConstraintCommand((Constraint)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView(), (IHintedType)UMLElementTypes.Constraint_8004, (IHintedType)UMLElementTypes.ConstraintConstrainedElement_8011);
+ return getDropConstraintCommand((Constraint) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView(), (IHintedType) UMLElementTypes.Constraint_8004,
+ (IHintedType) UMLElementTypes.ConstraintConstrainedElement_8011);
}
/**
* Returns the drop command for TimeObservation nodes.
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param droppedElement
- * the element to drop
+ * the element to drop
* @param nodeVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
* @return the drop command
*/
protected Command dropTimeObservation(DropObjectsRequest dropRequest, TimeObservation droppedElement, int nodeVISUALID) {
// Test canvas element
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
return UnexecutableCommand.INSTANCE;
}
TimeObservationHelper timeObservationHelper = new TimeObservationHelper(getEditingDomain());
- return timeObservationHelper.dropTimeObservation(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
+ return timeObservationHelper.dropTimeObservation(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView());
}
/**
* Returns the drop command for ShortCutDiagram nodes.
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param droppedElement
- * the element to drop
+ * the element to drop
* @param nodeVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
* @return the drop command
*/
protected Command dropShortCutDiagram(DropObjectsRequest dropRequest, Diagram droppedElement, int nodeVISUALID) {
// Test canvas element
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
return UnexecutableCommand.INSTANCE;
}
DiagramShortCutHelper diagramShortCutHelper = new DiagramShortCutHelper(getEditingDomain());
- return diagramShortCutHelper.dropDiagramShortCut(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
+ return diagramShortCutHelper.dropDiagramShortCut(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView());
}
/**
@@ -256,18 +257,18 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* </pre>
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticElement
- * the semantic element
+ * the semantic element
* @param nodeVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
*
* @return the drop command
*/
protected Command dropChildNode(DropObjectsRequest dropRequest, Element semanticElement, int nodeVISUALID) {
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction) {
+ if (graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction) {
return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, dropRequest.getLocation(), semanticElement));
}
return UnexecutableCommand.INSTANCE;
@@ -277,59 +278,59 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* Returns the drop command for DurationObservation nodes.
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param droppedElement
- * the element to drop
+ * the element to drop
* @param nodeVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
* @return the drop command
*/
protected Command dropDurationObservation(DropObjectsRequest dropRequest, DurationObservation droppedElement, int nodeVISUALID) {
// Test canvas element
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
return UnexecutableCommand.INSTANCE;
}
DurationObservationHelper durationObservationHelper = new DurationObservationHelper(getEditingDomain());
- return durationObservationHelper.dropDurationObservation(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
+ return durationObservationHelper.dropDurationObservation(droppedElement, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView());
}
/**
* Returns the drop command for Message links.
*
* @param dropRequest
- * the drop request
+ * the drop request
*
* @param semanticLink
- * the link to drop
+ * the link to drop
* @param linkVISUALID
- * the visual identifier of the EditPart of the dropped element
+ * the visual identifier of the EditPart of the dropped element
* @return the drop command
*
*/
public Command dropMessage(DropObjectsRequest dropRequest, Element semanticLink, int linkVISUALID) {
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Interaction)) {
return UnexecutableCommand.INSTANCE;
}
- if(semanticLink instanceof Message) {//if the drop request concerns a UML message
- //1. verify if source and target of the message are already connected
+ if (semanticLink instanceof Message) {// if the drop request concerns a UML message
+ // 1. verify if source and target of the message are already connected
Collection<?> sources = CommunicationLinkMappingHelper.getInstance().getSource(semanticLink);
Collection<?> targets = CommunicationLinkMappingHelper.getInstance().getTarget(semanticLink);
- if(!sources.isEmpty() && !targets.isEmpty()) {
- Element source = (Element)sources.toArray()[0];
- Element target = (Element)targets.toArray()[0];
- if((source instanceof Lifeline) && (target instanceof Lifeline)) {
- Set<Message> messages = CommunicationUtil.verifyUMLLifelinesConnected((Lifeline)source, (Lifeline)target);
- if(!(messages == null) && (messages.size() >= 1)) {//the UML lifelines are already connected by one or more than one more message
- //1. search for the edit parts of the messages
+ if (!sources.isEmpty() && !targets.isEmpty()) {
+ Element source = (Element) sources.toArray()[0];
+ Element target = (Element) targets.toArray()[0];
+ if ((source instanceof Lifeline) && (target instanceof Lifeline)) {
+ Set<Message> messages = CommunicationUtil.verifyUMLLifelinesConnected((Lifeline) source, (Lifeline) target);
+ if (!(messages == null) && (messages.size() >= 1)) {// the UML lifelines are already connected by one or more than one more message
+ // 1. search for the edit parts of the messages
List<EditPart> messagesEP = null;
- for(Message current : messages) {
+ for (Message current : messages) {
EditPart messageEP = lookForEditPart(current);
- if(!(messageEP == null)) {
- if(messagesEP == null) {
+ if (!(messageEP == null)) {
+ if (messagesEP == null) {
messagesEP = new ArrayList<EditPart>();
messagesEP.add(messageEP);
} else {
@@ -337,19 +338,20 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
}
}
}
- //System.err.println("Messages edit parts on the link :" + messagesEP);
- //System.err.println("Semantic messages on the link :" + messages);
- //2. Create the drop commands
- if(messagesEP == null) {//There is no graphical connection between the two lifelines (in this diagram)
- //create a dropMessageAsConnector Command
+ // System.err.println("Messages edit parts on the link :" + messagesEP);
+ // System.err.println("Semantic messages on the link :" + messages);
+ // 2. Create the drop commands
+ if (messagesEP == null) {// There is no graphical connection between the two lifelines (in this diagram)
+ // create a dropMessageAsConnector Command
return new ICommandProxy(dropMessageAsConnector(new CompositeCommand("drop Message"), source, target, linkVISUALID, dropRequest.getLocation(), semanticLink)); //$NON-NLS-1$
- } else {//add the message as a label of the graphical connector
- ConnectionEditPart conEP = (ConnectionEditPart)messagesEP.get(0).getParent();
+ } else {// add the message as a label of the graphical connector
+ ConnectionEditPart conEP = (ConnectionEditPart) messagesEP.get(0).getParent();
IAdaptable linkAdapter = new SemanticAdapter(semanticLink, null);
- //location where the label will be dropped
+ // location where the label will be dropped
Point loc = new Point(1, -23);
- //reuse of the CustomMessageViewCreateCommand
- return new ICommandProxy(new CustomMessageViewCreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), conEP.getViewer(), ((IGraphicalEditPart)conEP).getDiagramPreferencesHint(), loc, linkAdapter, conEP));
+ // reuse of the CustomMessageViewCreateCommand
+ return new ICommandProxy(
+ new CustomMessageViewCreateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), conEP.getViewer(), ((IGraphicalEditPart) conEP).getDiagramPreferencesHint(), loc, linkAdapter, conEP.getNotationView()));
}
}
}
@@ -363,53 +365,55 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
* If the source and the target views do not exist, these views will be created.
*
* @param cc
- * the composite command that will contain the set of command to create the message
+ * the composite command that will contain the set of command to create the message
* @param source
- * the source the element source of the link
+ * the source the element source of the link
* @param target
- * the target the element target of the link
+ * the target the element target of the link
* @param linkVISUALID
- * the link VISUALID used to create the view
+ * the link VISUALID used to create the view
* @param location
- * the location the location where the view will be be created
+ * the location the location where the view will be be created
* @param semanticLink
- * the semantic link that will be attached to the view
+ * the semantic link that will be attached to the view
*
* @return the composite command
*/
public CompositeCommand dropMessageAsConnector(CompositeCommand cc, Element source, Element target, int linkVISUALID, Point location, Element semanticLink) {
// look for editpart
- GraphicalEditPart sourceEditPart = (GraphicalEditPart)lookForEditPart(source);
- GraphicalEditPart targetEditPart = (GraphicalEditPart)lookForEditPart(target);
+ GraphicalEditPart sourceEditPart = (GraphicalEditPart) lookForEditPart(source);
+ GraphicalEditPart targetEditPart = (GraphicalEditPart) lookForEditPart(target);
// descriptor of the link
- CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getUMLElementType(linkVISUALID), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), getDiagramPreferencesHint());
+ CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getUMLElementType(linkVISUALID), ((IHintedType) getUMLElementType(linkVISUALID)).getSemanticHint(),
+ getDiagramPreferencesHint());
IAdaptable sourceAdapter = null;
IAdaptable targetAdapter = null;
- if(sourceEditPart == null) {
+ if (sourceEditPart == null) {
// creation of the node
- ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(source), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint());
+ ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(source), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
// get the command and execute it.
- CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), descriptor, ((View)getHost().getModel()));
+ CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), descriptor, ((View) getHost().getModel()));
cc.compose(nodeCreationCommand);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y + 100)); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y + 100)); //$NON-NLS-1$
cc.compose(setBoundsCommand);
- sourceAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
+ sourceAdapter = (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue();
} else {
sourceAdapter = new SemanticAdapter(null, sourceEditPart.getModel());
}
- if(targetEditPart == null) {
+ if (targetEditPart == null) {
// creation of the node
- ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(target), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint());
+ ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(target), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
// get the command and execute it.
- CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), descriptor, ((View)getHost().getModel()));
+ CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), descriptor, ((View) getHost().getModel()));
cc.compose(nodeCreationCommand);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y - 100)); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y - 100)); //$NON-NLS-1$
cc.compose(setBoundsCommand);
- targetAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
+ targetAdapter = (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue();
} else {
targetAdapter = new SemanticAdapter(null, targetEditPart.getModel());
}
- CommunicationDeferredCreateConnectionViewCommand aLinkCommand = new CommunicationDeferredCreateConnectionViewCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), sourceAdapter, targetAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null, semanticLink);
+ CommunicationDeferredCreateConnectionViewCommand aLinkCommand = new CommunicationDeferredCreateConnectionViewCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), ((IHintedType) getUMLElementType(linkVISUALID)).getSemanticHint(), sourceAdapter,
+ targetAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null, semanticLink);
cc.compose(aLinkCommand);
return cc;
}
@@ -448,55 +452,55 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
// the command for that.
CompositeCommand cc = new CompositeCommand("Drop"); //$NON-NLS-1$
Iterator<?> iter = dropRequest.getObjects().iterator();
- if(dropRequest.getObjects().size() > 0 && dropRequest.getObjects().get(0) instanceof String) {
+ if (dropRequest.getObjects().size() > 0 && dropRequest.getObjects().get(0) instanceof String) {
return getDropFileCommand(dropRequest);
}
Point location = dropRequest.getLocation().getCopy();
- ((GraphicalEditPart)getHost()).getContentPane().translateToRelative(location);
- ((GraphicalEditPart)getHost()).getContentPane().translateFromParent(location);
- location.translate(((GraphicalEditPart)getHost()).getContentPane().getClientArea().getLocation().getNegated());
- while(iter.hasNext()) {
- EObject droppedObject = (EObject)iter.next();
- int nodeVISUALID = getNodeVisualID(((IGraphicalEditPart)getHost()).getNotationView(), droppedObject);
+ ((GraphicalEditPart) getHost()).getContentPane().translateToRelative(location);
+ ((GraphicalEditPart) getHost()).getContentPane().translateFromParent(location);
+ location.translate(((GraphicalEditPart) getHost()).getContentPane().getClientArea().getLocation().getNegated());
+ while (iter.hasNext()) {
+ EObject droppedObject = (EObject) iter.next();
+ int nodeVISUALID = getNodeVisualID(((IGraphicalEditPart) getHost()).getNotationView(), droppedObject);
int linkVISUALID = getLinkWithClassVisualID(droppedObject);
- if(getDroppableElementVisualId().contains(nodeVISUALID) || getDroppableElementVisualId().contains(linkVISUALID)) {
+ if (getDroppableElementVisualId().contains(nodeVISUALID) || getDroppableElementVisualId().contains(linkVISUALID)) {
dropRequest.setLocation(location);
// TODO: add to composite command ?
- if(nodeVISUALID == -1 && linkVISUALID == -1 && (droppedObject instanceof Diagram)) {//if the dropped element is the diagram short cut
- cc.add(new CommandProxy(dropShortCutDiagram(dropRequest, (Diagram)droppedObject, nodeVISUALID)));
+ if (nodeVISUALID == -1 && linkVISUALID == -1 && (droppedObject instanceof Diagram)) {// if the dropped element is the diagram short cut
+ cc.add(new CommandProxy(dropShortCutDiagram(dropRequest, (Diagram) droppedObject, nodeVISUALID)));
} else {
- cc.add(new CommandProxy(getSpecificDropCommand(dropRequest, (Element)droppedObject, nodeVISUALID, linkVISUALID)));
+ cc.add(new CommandProxy(getSpecificDropCommand(dropRequest, (Element) droppedObject, nodeVISUALID, linkVISUALID)));
}
continue;
}
- if(linkVISUALID == -1 && nodeVISUALID != -1) {
+ if (linkVISUALID == -1 && nodeVISUALID != -1) {
// The element to drop is a node
// Retrieve it's expected graphical parent
- EObject graphicalParent = ((GraphicalEditPart)getHost()).resolveSemanticElement();
+ EObject graphicalParent = ((GraphicalEditPart) getHost()).resolveSemanticElement();
// Restrict the default node creation to the following cases:
// . Take the containment relationship into consideration
// . Release the constraint when GraphicalParent is a Package (Canvas for most
// diagrams)
- if(graphicalParent instanceof Package) {
+ if (graphicalParent instanceof Package) {
cc.add(getDefaultDropNodeCommand(nodeVISUALID, location, droppedObject));
} else {
- if((graphicalParent instanceof Element) && ((Element)graphicalParent).getOwnedElements().contains(droppedObject)) {
+ if ((graphicalParent instanceof Element) && ((Element) graphicalParent).getOwnedElements().contains(droppedObject)) {
cc.add(getDefaultDropNodeCommand(nodeVISUALID, location, droppedObject));
} else {
return UnexecutableCommand.INSTANCE;
}
}
} else {
- if(linkVISUALID != -1) {
- Collection<?> sources = linkmappingHelper.getSource((Element)droppedObject);
- Collection<?> targets = linkmappingHelper.getTarget((Element)droppedObject);
- if(sources.size() == 0 || targets.size() == 0) {
+ if (linkVISUALID != -1) {
+ Collection<?> sources = linkmappingHelper.getSource((Element) droppedObject);
+ Collection<?> targets = linkmappingHelper.getTarget((Element) droppedObject);
+ if (sources.size() == 0 || targets.size() == 0) {
return UnexecutableCommand.INSTANCE;
}
// binary association
- Element source = (Element)sources.toArray()[0];
- Element target = (Element)targets.toArray()[0];
- dropBinaryLink(cc, source, target, linkVISUALID, dropRequest.getLocation(), (Element)droppedObject);
+ Element source = (Element) sources.toArray()[0];
+ Element target = (Element) targets.toArray()[0];
+ dropBinaryLink(cc, source, target, linkVISUALID, dropRequest.getLocation(), (Element) droppedObject);
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java
index bb9bba78c8c..4daa3cd3c52 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageHelper.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,7 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Saadia Dhouib saadia.dhouib@cea.fr
+ * Saadia Dhouib saadia.dhouib@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 462958
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
@@ -110,7 +110,7 @@ public class MessageHelper extends ElementHelper {
// 3. Aggregates the create node command
// parentView = (View)((View)sourceEditPart.getModel()).eContainer();
CustomMessageViewCreateCommand nodeCreation = new CustomMessageViewCreateCommand(getEditingDomain(), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), nodeLocation,
- (IAdaptable) ((ICommand) customMessageCreateComand).getCommandResult().getReturnValue(), link);
+ (IAdaptable) ((ICommand) customMessageCreateComand).getCommandResult().getReturnValue(), (View) link.getModel());
((CompoundCommand) command).add(new ICommandProxy(nodeCreation));
// return the command that contains the semantic creation and the view creation
return command;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/org.eclipse.papyrus.uml.diagram.communication.tests.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/org.eclipse.papyrus.uml.diagram.communication.tests.launch
index 9c9b84fa32c..0e51d8019eb 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/org.eclipse.papyrus.uml.diagram.communication.tests.launch
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/org.eclipse.papyrus.uml.diagram.communication.tests.launch
@@ -1,45 +1,46 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<listAttribute key="com.mountainminds.eclemma.core.SCOPE_IDS">
-<listEntry value="=org.eclipse.papyrus.uml.diagram.activity/src"/>
-<listEntry value="=org.eclipse.papyrus.uml.diagram.activity/custom-src"/>
-</listAttribute>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.diagram.communication.tests.AllTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.diagram.communication.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="false"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<listAttribute key="com.mountainminds.eclemma.core.SCOPE_IDS">
+<listEntry value="=org.eclipse.papyrus.uml.diagram.activity/src"/>
+<listEntry value="=org.eclipse.papyrus.uml.diagram.activity/custom-src"/>
+</listAttribute>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.uml.diagram.communication.tests/src/org/eclipse/papyrus/uml/diagram/communication/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.diagram.communication.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.diagram.communication.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>

Back to the top