Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaModelStatusConstants;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
Expand Down Expand Up @@ -199,7 +200,15 @@ private void verifyProject(IPluginModelBase modelImported, boolean isJava) throw

private void assertSourceAttached(IJavaProject jProject) throws CoreException {
for (IPackageFragmentRoot root : jProject.getPackageFragmentRoots()) {
IClasspathEntry entry = root.getRawClasspathEntry();
IClasspathEntry entry;
try {
entry = root.getRawClasspathEntry();
} catch (JavaModelException e) {
if (e.getStatus().getCode() == IJavaModelStatusConstants.ELEMENT_NOT_ON_CLASSPATH) {
continue;
}
throw e;
}
if (entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY
|| (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER)
&& !entry.getPath().equals(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH)) {
Expand Down
Loading