Collection<StructureViewTreeElement> () { PsiClassOwner element = getElement(); if (element == null) return Collections.emptyList(); PsiClass[] classes = element.getClasses(); PsiUnnamedClass unnamedClass = JavaUnnamedClassUtil.getUnnamedClassFor(element); if (unnamedClass != null) { return JavaClassTreeElement.getClassChildren(unnamedClass); } ArrayList<StructureViewTreeElement> result = new ArrayList<>(); for (PsiClass aClass : classes) { result.add(new JavaClassTreeElement(aClass, false)); } return result; }