Skip to content

Commit 0139af7

Browse files
committed
If the target of the extra classpath is a project add CPE_PROJECT entry
Fix #1605
1 parent 86b18e7 commit 0139af7

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,17 @@ protected void addExtraClasspathEntries(List<IClasspathEntry> entries, String[]
544544
}
545545
}
546546
} else {
547-
IFile file = underlyingResource.getProject().getFile(path);
548-
if (file.exists()) {
549-
addExtraLibrary(file.getFullPath(), model, entries);
547+
if (path.segmentCount() == 0) {
548+
IProject p = underlyingResource.getProject();
549+
IClasspathEntry clsEntry = JavaCore.newProjectEntry(p.getFullPath());
550+
if (!entries.contains(clsEntry)) {
551+
entries.add(clsEntry);
552+
}
553+
} else {
554+
IFile file = underlyingResource.getProject().getFile(path);
555+
if (file.exists()) {
556+
addExtraLibrary(file.getFullPath(), model, entries);
557+
}
550558
}
551559
}
552560
}

0 commit comments

Comments
 (0)