private @Nullable SmartPsiElementPointer<?> createPsiPointer(int offset) {
      PsiElement element = findElementInTreeWithFormatterEnabled(myFile, offset);
      if (element != null) {
        if (!element.isValid()) {
          LOG.error("Invalid element " + element + "; file: " + myFile.getName());
        }
        return SmartPointerManager.getInstance(myFile.getProject()).createSmartPsiElementPointer(element);
      }
      return null;
    }
private @Nullable SmartPsiElementPointer<?> createPsiPointer(int offset)