Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfullbright2011-04-22 22:00:30 +0000
committerpfullbright2011-04-22 22:00:30 +0000
commit4f3ace0356dcc93d45845c59bed1e38a16edf36c (patch)
tree5a6c1069408eacb4557b174687e262eb537f8cdd /common/plugins/org.eclipse.jpt.common.core
parent3093dbb2567933308d0fe551ada924b7127602f2 (diff)
downloadwebtools.dali-4f3ace0356dcc93d45845c59bed1e38a16edf36c.tar.gz
webtools.dali-4f3ace0356dcc93d45845c59bed1e38a16edf36c.tar.xz
webtools.dali-4f3ace0356dcc93d45845c59bed1e38a16edf36c.zip
Fixed class gen for files in other projects and catalog entries.
Diffstat (limited to 'common/plugins/org.eclipse.jpt.common.core')
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/PlatformTools.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/PlatformTools.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/PlatformTools.java
index a63855b794..44183a9b68 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/PlatformTools.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/PlatformTools.java
@@ -48,7 +48,11 @@ public class PlatformTools {
*/
public static IFile getFile(IPath fullFilePath) {
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- return root.getFileForLocation(root.getLocation().append(fullFilePath));
+ // changed to handle non-workspace projects
+ String projectName = fullFilePath.segment(0).toString();
+ IPath projectRelativePath = fullFilePath.removeFirstSegments(1);
+ IProject project = root.getProject(projectName);
+ return project.getFile(projectRelativePath);
}
/**

Back to the top