public static UndoManager getInstance(@NotNull Project project) {
    return project.isDefault() ? getGlobalInstance() : project.getService(UndoManager.class);
  }
public static UndoManager getInstance(@NotNull Project project)