Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2018-04-19 09:02:16 -0400
committerQuentin Le Menez2018-04-20 11:27:59 -0400
commit0bdf62f7a9968d362c762f84a5a3e6da34f9f7a9 (patch)
tree06a5ffe07d36d156da570028a5b59cba288d2930 /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse
parent85563b6891ef31d88c9df1a916a51dbcbc537494 (diff)
downloadorg.eclipse.papyrus-0bdf62f7a9968d362c762f84a5a3e6da34f9f7a9.tar.gz
org.eclipse.papyrus-0bdf62f7a9968d362c762f84a5a3e6da34f9f7a9.tar.xz
org.eclipse.papyrus-0bdf62f7a9968d362c762f84a5a3e6da34f9f7a9.zip
Bug 533804 - [Diagram] Update batik dependencies for 1.9.1
- Update tests and dependencies to the new architecture and version - Update the targetplatforms to set the required dependency to 1.9.1 from the latest M6 Orbit repository Change-Id: I07824370934a51062038d382597330833e5ee801 Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/AbstractShapeProvider.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/AbstractShapeProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/AbstractShapeProvider.java
index 555f65cfdd5..4a4af7a6634 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/AbstractShapeProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/AbstractShapeProvider.java
@@ -20,7 +20,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.WeakHashMap;
-import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
+import org.apache.batik.anim.dom.SAXSVGDocumentFactory;
import org.apache.batik.dom.util.DOMUtilities;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.draw2d.PositionConstants;
@@ -165,12 +165,12 @@ public abstract class AbstractShapeProvider extends AbstractProvider implements
*/
protected synchronized SVGDocument getSVGDocument(EObject view, String location) {
if (relativePaths == null) {
- relativePaths = new WeakHashMap<Resource, Map<String, String>>();
+ relativePaths = new WeakHashMap<>();
}
- if (location.contains("/" + POSITION_KEY) || location.contains("." + POSITION_KEY)) { //$NON-NLS-1$//$NON-NLS-2$
+ if (location.contains("/" + POSITION_KEY) || location.contains("." + POSITION_KEY)) { //$NON-NLS-1$//$NON-NLS-2$
// load a specific variant of a symbol (with a different orientation) if the file name
// contains a specific "magic" key. The motivation is that symbols on the border of a parent
- // (e.g. a port symbol) could always point into the parent shape depending on its position
+ // (e.g. a port symbol) could always point into the parent shape depending on its position
try {
IMultiDiagramEditor editor = ServiceUtilsForEObject.getInstance().getService(IMultiDiagramEditor.class, view);
@@ -201,7 +201,9 @@ public abstract class AbstractShapeProvider extends AbstractProvider implements
/**
* Get a position key (enumeration) from the bit-vector representation of the position
- * @param side the binary encoded position
+ *
+ * @param side
+ * the binary encoded position
* @return the position key
*/
protected PositionEnum getPositionKey(int side) {
@@ -216,6 +218,7 @@ public abstract class AbstractShapeProvider extends AbstractProvider implements
return PositionEnum.SOUTH;
}
}
+
/**
* Loads a SVG document from the given location.
* This method uses a cache so that any given document is only loaded once.
@@ -226,7 +229,7 @@ public abstract class AbstractShapeProvider extends AbstractProvider implements
*/
protected synchronized SVGDocument getSVGDocument(String location) {
if (cache == null) {
- cache = new HashMap<String, SVGDocument>();
+ cache = new HashMap<>();
}
if (cache.containsKey(location)) {
return cache.get(location);
@@ -285,7 +288,7 @@ public abstract class AbstractShapeProvider extends AbstractProvider implements
Map<String, String> resMap = relativePaths.get(model.eResource());
if (resMap == null) {
- resMap = new HashMap<String, String>();
+ resMap = new HashMap<>();
relativePaths.put(model.eResource(), resMap);
}
String canonical = resMap.get(uri);

Back to the top