\r
public class PluginTools {\r
\r
- public static String getAbsolutePath(Bundle inBundle, String fullpath) {\r
- IPath path = new Path(fullpath);\r
- URL u = FileLocator.find(inBundle, path, null);\r
- if (u != null) {\r
- try {\r
- u = FileLocator.resolve(u);\r
- if ("file".equals(u.getProtocol())) {\r
- return new File(u.getFile()).getAbsolutePath();\r
- }\r
- } catch (Exception e) {\r
- }\r
- }\r
- return null;\r
- }\r
+ public static String getAbsolutePath(Bundle inBundle, String fullpath) {\r
+ IPath path = new Path(fullpath);\r
+ URL u = FileLocator.find(inBundle, path, null);\r
+ if (u != null) {\r
+ try {\r
+ u = FileLocator.resolve(u);\r
+ if ("file".equals(u.getProtocol())) {\r
+ return new File(u.getFile()).getAbsolutePath();\r
+ }\r
+ } catch (Exception e) {\r
+ }\r
+ }\r
+ return null;\r
+ }\r
\r
}\r