add ProjectFileIndex.getInstance(Project) to simplify clients
[idea/community.git] / platform / projectModel-api / src / com / intellij / openapi / roots / ProjectFileIndex.java
index 369866a3fa57c43a64ca4e076aca125a8d42e9fb..0ffe24353db675c10b95e363fa4cadb0a9f39a88 100644 (file)
@@ -34,11 +34,19 @@ public interface ProjectFileIndex extends FileIndex {
   class SERVICE {
     private SERVICE() { }
 
+    /**
+     * @deprecated use {@link ProjectFileIndex#getInstance(Project)} instead
+     */
     public static ProjectFileIndex getInstance(Project project) {
-      return ServiceManager.getService(project, ProjectFileIndex.class);
+      return ProjectFileIndex.getInstance(project);
     }
   }
 
+  @NotNull
+  static ProjectFileIndex getInstance(@NotNull Project project) {
+    return ServiceManager.getService(project, ProjectFileIndex.class);
+  }
+
   /**
    * Returns module to which content the specified file belongs or null if the file does not belong to content of any module.
    */