Skip to content

Commit

Permalink
Merge pull request #5753 from maho7791/master
Browse files Browse the repository at this point in the history
Fixes #5752
  • Loading branch information
pkriens authored Sep 1, 2023
2 parents d689aa3 + db7d145 commit a7a2181
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.ILightweightLabelDecorator;
Expand Down Expand Up @@ -78,7 +79,15 @@ public static void updateDecoration(IProject project, BndProjectInfo model) thro
return; // project is not a java project
}
boolean changed = false;
for (IClasspathEntry cpe : javaProject.getRawClasspath()) {

IClasspathEntry[] cpes = new IClasspathEntry[0];
try {
cpes = javaProject.getRawClasspath();
} catch (JavaModelException jme) {
// project maybe a maven project with no Java nature
}

for (IClasspathEntry cpe : cpes) {
if (cpe.getEntryKind() != IClasspathEntry.CPE_SOURCE) {
continue;
}
Expand Down

0 comments on commit a7a2181

Please sign in to comment.