void (@Nls @NotNull String typeName, boolean requestFocus) { ThreadingAssertions.assertEventDispatchThread(); Sheet sheet = myType2Sheet.get(typeName); myCurrentSheet.set(sheet); PsiElement element = mySmartPsiElementPointer.getElement(); if (element == null || !isApplicableElement(element)) { return; } if (myContent != null) { Supplier<@Nls String> supplier = myI18nMap.computeIfAbsent(typeName, __ -> () -> typeName); String displayName = getContentDisplayName(supplier.get(), element); if (displayName != null) { myContent.setDisplayName(displayName); } } myCardLayout.show(myTreePanel, typeName); if (sheet.myStructureTreeModel == null) { try { setWaitCursor(); JTree tree = sheet.myTree; HierarchyTreeStructure structure = createHierarchyTreeStructure(typeName, element); if (structure == null) { return; } StructureTreeModel<HierarchyTreeStructure> myModel = new StructureTreeModel<>(structure, getComparator(), sheet); AsyncTreeModel atm = new AsyncTreeModel(myModel, sheet); tree.setModel(atm); sheet.myStructureTreeModel = myModel; sheet.myAsyncTreeModel = atm; selectLater(tree, structure.getBaseDescriptor()); expandLater(tree, structure.getBaseDescriptor()); } finally { restoreCursor(); } } if (requestFocus) { IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(getCurrentTree(), true)); } }