HierarchyTreeStructure (@NotNull String typeName, @NotNull PsiElement psiElement) { if (getCallerType().equals(typeName)) { return new CallerMethodsTreeStructure(myProject, (PsiMember)psiElement, getCurrentScopeType()); } if (getCalleeType().equals(typeName)) { return new CalleeMethodsTreeStructure(myProject, (PsiMember)psiElement, getCurrentScopeType()); } else { LOG.error("unexpected type: " + typeName); return null; } }