Skip to content

Commit 5dcf9d7

Browse files
Stephane DrapeauStephane Drapeau
Stephane Drapeau
authored and
Stephane Drapeau
committed
Remove unused method
Change-Id: I7f9f55766021d1e43bdb333e861364251adaf56d
1 parent 0645702 commit 5dcf9d7

File tree

1 file changed

+2
-43
lines changed

1 file changed

+2
-43
lines changed

plugins/org.obeonetwork.dsl.bpmn2.design/src/org/obeonetwork/bpmn2/design/ElementsPositionService.java

+2-43
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,16 @@
1111
*/
1212
package org.obeonetwork.bpmn2.design;
1313

14-
import java.util.Set;
15-
1614
import org.eclipse.core.runtime.NullProgressMonitor;
1715
import org.eclipse.emf.common.util.EList;
1816
import org.eclipse.emf.ecore.EObject;
1917
import org.eclipse.emf.ecore.EStructuralFeature;
2018
import org.eclipse.gmf.runtime.notation.Bounds;
2119
import org.eclipse.gmf.runtime.notation.Node;
22-
import org.eclipse.gmf.runtime.notation.View;
2320
import org.eclipse.sirius.business.api.dialect.DialectManager;
2421
import org.eclipse.sirius.diagram.DDiagramElement;
2522
import org.eclipse.sirius.diagram.DDiagramElementContainer;
26-
import org.eclipse.sirius.diagram.DNode;
27-
import org.eclipse.sirius.diagram.business.api.refresh.CanonicalSynchronizer;
28-
import org.eclipse.sirius.diagram.business.api.refresh.CanonicalSynchronizerFactory;
2923
import org.eclipse.sirius.diagram.ui.business.api.view.SiriusGMFHelper;
30-
import org.eclipse.sirius.diagram.ui.business.api.view.SiriusLayoutDataManager;
3124
import org.obeonetwork.dsl.bpmn2.Lane;
3225
import org.obeonetwork.dsl.bpmn2.LaneSet;
3326

@@ -53,40 +46,6 @@ public void down(Lane lane) {
5346
}
5447
}
5548

56-
/**
57-
* This method fix the position of a new element created from contextual menu.
58-
*
59-
* @param currentNode the node where the contextual menu displayed
60-
* @param newNode the new element to create
61-
*
62-
* @author atakarabt
63-
*/
64-
public void positionRelativeToCurrent(EObject currentNode, EObject newNode) {
65-
if (currentNode instanceof DNode && newNode instanceof DNode) {
66-
DNode currentDNode = (DNode) currentNode;
67-
DNode newDNode = (DNode) newNode;
68-
// Retrieve GMF nodes associated with our graphical nodes
69-
Node firstNode = SiriusGMFHelper.getGmfNode(currentDNode);
70-
Bounds firstBounds = (Bounds) firstNode.getLayoutConstraint();
71-
// Launch refresh so that GMF view corresponding to the newDNode are created
72-
CanonicalSynchronizer canonicalSynchronizer = CanonicalSynchronizerFactory.INSTANCE
73-
.createCanonicalSynchronizer(firstNode.getDiagram());
74-
canonicalSynchronizer.synchronize();
75-
Node secondNode = SiriusGMFHelper.getGmfNode(newDNode);
76-
Bounds secondBounds = (Bounds) secondNode.getLayoutConstraint();
77-
// Make sure that the created view will never be arranged
78-
Set<View> createdViewsToArrange = SiriusLayoutDataManager.INSTANCE.getCreatedViewWithCenterLayout()
79-
.get(secondNode.getDiagram());
80-
if (createdViewsToArrange != null) {
81-
createdViewsToArrange.remove(secondNode);
82-
}
83-
// Set bounds for this new node
84-
secondBounds.setX(firstBounds.getX() + 150);
85-
secondBounds.setY(firstBounds.getY());
86-
87-
}
88-
}
89-
9049
public DDiagramElementContainer lanesAutoSize(final DDiagramElementContainer laneSetContainer) {
9150
Node laneSetNode = SiriusGMFHelper.getGmfNode(laneSetContainer);
9251
Bounds laneSetBounds = (Bounds) laneSetNode.getLayoutConstraint();
@@ -116,11 +75,11 @@ public EObject moveElement(EObject referenceOwner, String referenceName, final E
11675

11776
int relativeIndex = list.indexOf(relativeElement);
11877

119-
list.move(relativeIndex+1, element);
78+
list.move(relativeIndex + 1, element);
12079

12180
return referenceOwner;
12281
}
123-
82+
12483
public EObject moveElementFirstPosition(EObject referenceOwner, String referenceName, final EObject element) {
12584
EStructuralFeature feature = referenceOwner.eClass().getEStructuralFeature(referenceName);
12685
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)