void (TreeSelectionEvent e) { if (myTreeModel == null) return; final StubTreeNode rootNode = (StubTreeNode)getRoot().getUserObject(); StubElement<?> topLevelStub = rootNode == null ? null : rootNode.getStub(); if (!(topLevelStub instanceof PsiFileStub)) return; StubElement<?> stub = getSelectedStub(); if (stub == null) return; PsiElement result = getPsiElementForStub(stub); if (result != null) { myUpdater.updatePsiTree(result, myStubTree.hasFocus() ? result.getTextRange() : null); myStubDetailsViewer.valueChanged(stub); } }