@Override
  public boolean isDocumentLocked(@NotNull Document document) {
    VirtualFile file = FileDocumentManager.getInstance().getFile(document);
    if (file != null && file.isValid()) {
      for (FileViewProvider provider : getContext().myReformatElements.keySet()) {
        if (file.equals(provider.getVirtualFile())) return true;
      }
    }
    return false;
  }
@Override
  public boolean isDocumentLocked(@NotNull Document document)