public static Editor openInEditor(@NotNull PsiElement element) {
    FileEditor editor = openInEditor(element, true);
    return editor instanceof TextEditor ? ((TextEditor)editor).getEditor() : null;
  }
public static Editor openInEditor(@NotNull PsiElement element)