Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-11-23 10:52:23 +0000
committercletavernie2012-11-23 10:52:23 +0000
commit6424abf6e7e922c90a56eec84fd3f9b2de9dfae5 (patch)
tree8d3239a03710422cba8493b4dbe9ee2bb9aeda71 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/DiagramDecorationAdapter.java
parentc7ed19562dfcf443385c0213765c98ffc841409f (diff)
downloadorg.eclipse.papyrus-6424abf6e7e922c90a56eec84fd3f9b2de9dfae5.tar.gz
org.eclipse.papyrus-6424abf6e7e922c90a56eec84fd3f9b2de9dfae5.tar.xz
org.eclipse.papyrus-6424abf6e7e922c90a56eec84fd3f9b2de9dfae5.zip
391945: [Refactoring] Part 2: Refactoring on Kepler (0.10)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=391945
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/DiagramDecorationAdapter.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/DiagramDecorationAdapter.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/DiagramDecorationAdapter.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/DiagramDecorationAdapter.java
index 9bd01a2c2fa..fae86a714fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/DiagramDecorationAdapter.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/DiagramDecorationAdapter.java
@@ -13,6 +13,8 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.providers;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.Locator;
@@ -20,7 +22,6 @@ import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PrecisionRectangle;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.handles.HandleBounds;
@@ -47,9 +48,9 @@ public class DiagramDecorationAdapter {
/** The decoration. */
- protected EList<IDecoration> decorations;
+ protected List<IDecoration> decorations;
- protected EList<IPapyrusDecoration> pDecorations;
+ protected List<IPapyrusDecoration> pDecorations;
/** The decoration image. */
protected Image decorationImage;
@@ -132,7 +133,7 @@ public class DiagramDecorationAdapter {
* the is volatile
* @return the set of JFace decorations
*/
- public EList<IDecoration> setDecorations(EList<IPapyrusDecoration> pDecorations, int percentageFromSource, int margin, boolean isVolatile) {
+ public List<IDecoration> setDecorations(List<IPapyrusDecoration> pDecorations, int percentageFromSource, int margin, boolean isVolatile) {
final int distBetweenIconsPercent = 20;
final int percentageMin = 10;
@@ -321,10 +322,7 @@ public class DiagramDecorationAdapter {
}
public void relocate(IFigure target) {
- Rectangle bounds =
- reference instanceof HandleBounds
- ? new PrecisionRectangle(((HandleBounds)reference).getHandleBounds())
- : new PrecisionRectangle(reference.getBounds());
+ Rectangle bounds = reference instanceof HandleBounds ? new PrecisionRectangle(((HandleBounds)reference).getHandleBounds()) : new PrecisionRectangle(reference.getBounds());
reference.translateToAbsolute(bounds);
target.translateToRelative(bounds);
@@ -337,8 +335,7 @@ public class DiagramDecorationAdapter {
if(decorationX > pTL.x) {
// only set position, if it is inside the figure, i.e. bigger than left margin
pDecoration.setX(decorationX);
- }
- else {
+ } else {
pDecoration.setX(pTL.x);
}
target.setLocation(pDecoration);

Back to the top