Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2016-04-11 09:15:00 +0000
committerPierre-Charles David2016-04-13 09:46:48 +0000
commite7db12d5b124a33ec7cc9bf986b39d923ecae829 (patch)
tree7e9ba9a6672bd62a9a9f34806a4e2b4b56979388
parent7a5b79b6415e87b1bffc071440bf2ce2f679c3b6 (diff)
downloadorg.eclipse.sirius-e7db12d5b124a33ec7cc9bf986b39d923ecae829.tar.gz
org.eclipse.sirius-e7db12d5b124a33ec7cc9bf986b39d923ecae829.tar.xz
org.eclipse.sirius-e7db12d5b124a33ec7cc9bf986b39d923ecae829.zip
[442268] Relax Batik version ranges to allow for 1.7
Also add an explicit default SAX parser class name to work with Batik 1.7. Batik seems to have a lot of trouble with even simple SVGs which can cause TranscodingException. Assuming more recent versions have less of these bugs/limitations, allow for 1.7 to be used when available instead of limiting us to the older 1.6. Bug: 442268 Change-Id: I3c48ee211432edbaf0f990b02ef49654d9613804 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/figure/SVGFigure.java6
2 files changed, 9 insertions, 9 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF
index f731c1d7bd..172e386877 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF
@@ -8,12 +8,12 @@ Bundle-Activator: org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin$Impleme
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: com.google.guava;bundle-version="[11.0.2,16.0)",
- org.apache.batik.bridge;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.transcoder;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.bridge;bundle-version="[1.6.0,1.8.0)",
+ org.apache.batik.dom;bundle-version="[1.6.0,1.8.0)",
+ org.apache.batik.dom.svg;bundle-version="[1.6.0,1.8.0)",
+ org.apache.batik.svggen;bundle-version="[1.6.0,1.8.0)",
+ org.apache.batik.transcoder;bundle-version="[1.6.0,1.8.0)",
+ org.apache.batik.util;bundle-version="[1.6.0,1.8.0)",
org.eclipse.core.databinding.property;bundle-version="1.4.100",
org.eclipse.core.expressions;bundle-version="3.4.400",
org.eclipse.emf.databinding;bundle-version="1.2.0",
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/figure/SVGFigure.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/figure/SVGFigure.java
index a777027e7e..e3c77826a9 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/figure/SVGFigure.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/figure/SVGFigure.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2008, 2015 Borland Software Corporation and others.
+ * Copyright (c) 2008, 2016 Borland Software Corporation and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -34,6 +34,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.w3c.dom.Document;
+import com.google.common.base.Objects;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.RemovalListener;
@@ -217,7 +218,7 @@ public class SVGFigure extends Figure implements StyledFigure, ITransparentFigur
}
private Document createDocument() {
- String parser = XMLResourceDescriptor.getXMLParserClassName();
+ String parser = Objects.firstNonNull(XMLResourceDescriptor.getXMLParserClassName(), "org.apache.xerces.parsers.SAXParser"); //$NON-NLS-1$
SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(parser);
return createDocument(factory, false);
}
@@ -352,7 +353,6 @@ public class SVGFigure extends Figure implements StyledFigure, ITransparentFigur
}
}
-
/**
* Remove all entries whose key begins with the given key. Remove from the
* document map, the entries with the given keys to force to re-read the

Back to the top