public static JavaProjectCodeInsightSettings getSettings(@NotNull Project project) {
    return project.getService(JavaProjectCodeInsightSettings.class);
  }
public static JavaProjectCodeInsightSettings getSettings(@NotNull Project project)