Skip to content

Commit

Permalink
Fix duplication of class members in case of selected Java packages
Browse files Browse the repository at this point in the history
If a Java package was selected, the field and methods of the package children (classes, interfaces) were drawn multiple times. That's fixed now.
  • Loading branch information
travkin79 committed Jul 13, 2023
1 parent a85f7d4 commit 9387287
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected void addJavaElements(final IJavaElement javaElement, final Collection<
if (javaElement instanceof ICompilationUnit) {
try {
final IType[] types = ((ICompilationUnit) javaElement).getTypes();
if (types != null && types.length > 0) {
if (types != null && types.length > 0 && !javaElements.contains(types[0])) {
javaElements.add(types[0]);
}
} catch (final JavaModelException e) {
Expand Down

0 comments on commit 9387287

Please sign in to comment.