X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Ftools%2FPluginTools.java;h=296f1a1142545cbe7516aaa56af21c4bc831b270;hb=53d55c24c779745f188bdb18d32f71d20acb61b2;hp=cf48ca3b3c67a3c07f667273e5b54cdd7e865525;hpb=f36217aeeb09c0c46f99886ee99772156ce9cfe6;p=simantics%2F3d.git diff --git a/org.simantics.g3d/src/org/simantics/g3d/tools/PluginTools.java b/org.simantics.g3d/src/org/simantics/g3d/tools/PluginTools.java index cf48ca3b..296f1a11 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/tools/PluginTools.java +++ b/org.simantics.g3d/src/org/simantics/g3d/tools/PluginTools.java @@ -21,19 +21,19 @@ import org.osgi.framework.Bundle; public class PluginTools { - public static String getAbsolutePath(Bundle inBundle, String fullpath) { - IPath path = new Path(fullpath); - URL u = FileLocator.find(inBundle, path, null); - if (u != null) { - try { - u = FileLocator.resolve(u); - if ("file".equals(u.getProtocol())) { - return new File(u.getFile()).getAbsolutePath(); - } - } catch (Exception e) { - } - } - return null; - } + public static String getAbsolutePath(Bundle inBundle, String fullpath) { + IPath path = new Path(fullpath); + URL u = FileLocator.find(inBundle, path, null); + if (u != null) { + try { + u = FileLocator.resolve(u); + if ("file".equals(u.getProtocol())) { + return new File(u.getFile()).getAbsolutePath(); + } + } catch (Exception e) { + } + } + return null; + } }