@Override
  public void selectNodeFromPsi(@Nullable PsiElement element) {
    if (myTreeModel == null || element == null) return;
    final PsiFile file = element.getContainingFile();
    if (!(file instanceof PsiFileWithStubSupport)) return;

    final DefaultMutableTreeNode rootNode = getRoot();
    if (rootNode == null) return;

    StubElement<?> stubElement = myNodeToStubs.get(element.getNode());
    if (stubElement != null) {
      selectStubElement(stubElement);
    }
    else {
      myStubTree.clearSelection();
    }
  }
@Override
  public void selectNodeFromPsi(@Nullable PsiElement element)