Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfullbright2010-07-30 15:14:59 -0400
committerpfullbright2010-07-30 15:14:59 -0400
commit59ea89a6bee44901dd93ee7790b6df06ea535ef1 (patch)
tree8e430f8e8dde6d277e0f492e8327d364c923468a
parent1b54c142e7fec9ac5b8d4dab2d04d2929c6b0a81 (diff)
downloadwebtools.dali-59ea89a6bee44901dd93ee7790b6df06ea535ef1.tar.gz
webtools.dali-59ea89a6bee44901dd93ee7790b6df06ea535ef1.tar.xz
webtools.dali-59ea89a6bee44901dd93ee7790b6df06ea535ef1.zip
made getResourcePath consistent with getDefaultResourceLocation
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/SimpleJavaResourceLocator.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/SimpleJavaResourceLocator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/SimpleJavaResourceLocator.java
index 4a82530061..b08fa4c8fe 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/SimpleJavaResourceLocator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/SimpleJavaResourceLocator.java
@@ -15,7 +15,6 @@ import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
@@ -105,9 +104,10 @@ public class SimpleJavaResourceLocator
IJavaProject javaProject = getJavaProject(project);
IPath firstResourcePath = null;
try {
- for (IClasspathEntry entry : javaProject.getRawClasspath()) {
- if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
- IPath resourcePath = entry.getPath().append(runtimePath);
+ for (IPackageFragmentRoot root : javaProject.getPackageFragmentRoots()) {
+ if (root.getKind() == IPackageFragmentRoot.K_SOURCE) {
+ IContainer rootContainer = (IContainer) root.getUnderlyingResource();
+ IPath resourcePath = rootContainer.getFullPath().append(runtimePath);
if (firstResourcePath == null) {
firstResourcePath = resourcePath;
}

Back to the top