@Override
    public void caretPositionChanged(@NotNull CaretEvent e) {
      if (!available() || myEditor.getSelectionModel().hasSelection()) return;
      PsiElement rootPsiElement = myTreeStructure.getRootPsiElement();
      if (rootPsiElement == null) return;
      PsiElement rootElement = myTreeStructure.getRootPsiElement();
      int baseOffset = rootPsiElement.getTextRange().getStartOffset();
      int offset = myEditor.getCaretModel().getOffset() + baseOffset;
      String progressDialogTitle = DevPsiViewerBundle.message("psi.viewer.progress.dialog.get.element.at.offset");
      Callable<@Nullable PsiElement> finder = () -> InjectedLanguageUtilBase.findElementAtNoCommit(rootElement.getContainingFile(), offset);

      PsiElement element = computeSlowOperationsSafeInBgThread(myProject, progressDialogTitle, finder);

      if (element != null) {
        myBlockTree.selectNodeFromEditor(element);
        myStubTree.selectNodeFromEditor(element);
        selectElement(element);
      }
    }
@Override
    public void caretPositionChanged(@NotNull CaretEvent e)