Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-02-05 14:45:31 +0000
committercletavernie2013-02-05 14:45:31 +0000
commit84baf24596d65b2dadb575aff03913a737d1ed29 (patch)
tree35c1ee89e17dee94e4a843f6c305d9c8b8acb260
parentc4d29185219fb491d62e5c2db9465af5f76231a5 (diff)
downloadorg.eclipse.papyrus-84baf24596d65b2dadb575aff03913a737d1ed29.tar.gz
org.eclipse.papyrus-84baf24596d65b2dadb575aff03913a737d1ed29.tar.xz
org.eclipse.papyrus-84baf24596d65b2dadb575aff03913a737d1ed29.zip
397389: [Timing Diagram] Papyrus shall support UML2 timing diagram
https://bugs.eclipse.org/bugs/show_bug.cgi?id=397389 Remove JRE 1.6 dependencies (Calls to TreeMap#firstEntry())
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/GenericListCompartmentLayoutEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/utils/EditPartUtils.java4
2 files changed, 2 insertions, 6 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/GenericListCompartmentLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/GenericListCompartmentLayoutEditPolicy.java
index ceeb6eed568..e3b62d23bf1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/GenericListCompartmentLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/GenericListCompartmentLayoutEditPolicy.java
@@ -10,7 +10,6 @@ package org.eclipse.papyrus.uml.diagram.timing.custom.edit.policies;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map.Entry;
import java.util.TreeMap;
import org.eclipse.draw2d.ColorConstants;
@@ -159,8 +158,7 @@ public class GenericListCompartmentLayoutEditPolicy extends ConstrainedToolbarLa
final int distance = Math.abs(offset - insertionPoint.getLocation());
distanceMap.put(Integer.valueOf(distance), insertionPoint);
}
- final Entry<Integer, InsertionPoint> firstEntry = distanceMap.firstEntry();
- return firstEntry.getValue();
+ return distanceMap.values().iterator().next();
}
protected int getMarginBeforeFirst() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/utils/EditPartUtils.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/utils/EditPartUtils.java
index 08242a8b577..3f8ef7b34a4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/utils/EditPartUtils.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/utils/EditPartUtils.java
@@ -12,7 +12,6 @@ package org.eclipse.papyrus.uml.diagram.timing.custom.utils;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map.Entry;
import java.util.TreeMap;
import org.eclipse.draw2d.IFigure;
@@ -97,8 +96,7 @@ public class EditPartUtils {
final int distance = Math.abs(posY - ordinate);
distanceMap.put(Integer.valueOf(distance), editPart);
}
- final Entry<Integer, GraphicalEditPart> firstEntry = distanceMap.firstEntry();
- return firstEntry.getValue();
+ return distanceMap.values().iterator().next();
}
public static boolean isEditPartFor(final EditPart editPart, final EClass... eClasses) {

Back to the top