public static boolean requestWriting(@NotNull Editor editor) {
    FileDocumentManager.WriteAccessStatus writeAccess =
      FileDocumentManager.getInstance().requestWritingStatus(editor.getDocument(), editor.getProject());
    if (!writeAccess.hasWriteAccess()) {
      HintManager.getInstance().showInformationHint(editor, writeAccess.getReadOnlyMessage(), writeAccess.getHyperlinkListener());
      return false;
    }
    return true;
  }
public static boolean requestWriting(@NotNull Editor editor)