Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfullbright2010-08-04 14:24:13 +0000
committerpfullbright2010-08-04 14:24:13 +0000
commit5a8582a314a04efe6ab2884df7da9eb5a87d115c (patch)
tree1c1750f50135bfdb449c6f90f6b4d5bec7be10cc
parent1b5335b1735980c52401427de26a102b105d57d7 (diff)
downloadwebtools.dali-5a8582a314a04efe6ab2884df7da9eb5a87d115c.tar.gz
webtools.dali-5a8582a314a04efe6ab2884df7da9eb5a87d115c.tar.xz
webtools.dali-5a8582a314a04efe6ab2884df7da9eb5a87d115c.zip
added getFile(IPath) (absolute path)
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/PlatformTools.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/PlatformTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/PlatformTools.java
index 9e7209ec0e..e11d339c2b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/PlatformTools.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/PlatformTools.java
@@ -36,6 +36,14 @@ public class PlatformTools {
}
/**
+ * Return the {@link IFile} with the workspace relative "full" path
+ */
+ public static IFile getFile(IPath fullFilePath) {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ return root.getFileForLocation(root.getLocation().append(fullFilePath));
+ }
+
+ /**
* Return the specified file's content type,
* using the Eclipse platform's content type manager.
*/

Back to the top