Merge remote-tracking branch 'remotes/origin/master' into upsource-master
authorEvgeny Pasynkov <Evgeny.Pasynkov@jetbrains.com>
Mon, 21 May 2012 12:36:34 +0000 (14:36 +0200)
committerEvgeny Pasynkov <Evgeny.Pasynkov@jetbrains.com>
Mon, 21 May 2012 12:36:34 +0000 (14:36 +0200)
20 files changed:
build/scripts/layouts.gant
java/idea-ui/src/com/intellij/ide/util/projectWizard/ProjectNameStep.java
platform/core-api/src/com/intellij/openapi/fileTypes/InternalFileType.java [moved from platform/platform-api/src/com/intellij/ide/highlighter/InternalFileType.java with 94% similarity]
platform/core-api/src/com/intellij/openapi/project/ProjectCoreUtil.java [new file with mode: 0644]
platform/indexing-impl/src/com/intellij/psi/impl/cache/impl/id/IdIndex.java [moved from platform/lang-impl/src/com/intellij/psi/impl/cache/impl/id/IdIndex.java with 96% similarity]
platform/indexing-impl/src/com/intellij/psi/impl/cache/impl/id/IdTableBuilding.java
platform/lang-api/src/com/intellij/analysis/AnalysisScope.java
platform/lang-api/src/com/intellij/openapi/project/ProjectUtil.java
platform/lang-impl/src/com/intellij/codeEditor/printing/PrintManager.java
platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightLevelUtil.java
platform/lang-impl/src/com/intellij/find/impl/FindInProjectUtil.java
platform/lang-impl/src/com/intellij/psi/impl/cache/impl/todo/TodoIndex.java
platform/platform-api/src/com/intellij/ide/highlighter/ModuleFileType.java
platform/platform-api/src/com/intellij/ide/highlighter/ProjectFileType.java
platform/platform-api/src/com/intellij/ide/highlighter/WorkspaceFileType.java
platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java
platform/platform-impl/src/com/intellij/ide/impl/ProjectUtil.java
platform/platform-impl/src/com/intellij/openapi/diff/impl/mergeTool/MergeVersion.java
plugins/copyright/src/com/maddyhome/idea/copyright/util/FileTypeUtil.java
xml/impl/src/com/intellij/xml/util/XIncludeProvider.java

index 19c53fae82b750f5390221467b296a6b1c3d4310..3aaf9596a8e21612cbbe3bc59b0056526a6a936b 100644 (file)
@@ -496,6 +496,8 @@ def layout_core(String home, String target) {
       module("core-impl")
       module("boot")
       module("extensions")
+      module("indexing-api")
+      module("indexing-impl")
       module("java-psi-api")
       module("java-psi-impl")
     }
index e5c2be752ee5b5aecd083d5d6de569897d5bbc15..8429763d75b2a09eef761714df7f1621dd9bf8a8 100644 (file)
@@ -21,7 +21,7 @@ import com.intellij.ide.highlighter.ProjectFileType;
 import com.intellij.openapi.application.ApplicationInfo;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.options.ConfigurationException;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.openapi.ui.Messages;
 import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.util.text.StringUtil;
@@ -118,7 +118,7 @@ public class ProjectNameStep extends ModuleWizardStep {
     boolean shouldContinue = true;
 
     final String path = myWizardContext.isCreatingNewProject() && myWizardContext.getProjectStorageFormat() == DIRECTORY_BASED
-                        ? getProjectFileDirectory() + "/" + ProjectUtil.DIRECTORY_BASED_PROJECT_DIR
+                        ? getProjectFileDirectory() + "/" + ProjectCoreUtil.DIRECTORY_BASED_PROJECT_DIR
                         : getProjectFilePath();
     final File projectFile = new File(path);
     if (projectFile.exists()) {
@@ -126,7 +126,7 @@ public class ProjectNameStep extends ModuleWizardStep {
                            ? IdeBundle.message("title.new.project")
                            : IdeBundle.message("title.add.module");
       final String message = myWizardContext.isCreatingNewProject() && myWizardContext.getProjectStorageFormat() == DIRECTORY_BASED
-                             ? IdeBundle.message("prompt.overwrite.project.folder", ProjectUtil.DIRECTORY_BASED_PROJECT_DIR,
+                             ? IdeBundle.message("prompt.overwrite.project.folder", ProjectCoreUtil.DIRECTORY_BASED_PROJECT_DIR,
                                                  projectFile.getParentFile().getAbsolutePath())
                              : IdeBundle.message("prompt.overwrite.project.file", projectFile.getAbsolutePath(),
                                                  myWizardContext.getPresentationName());
similarity index 94%
rename from platform/platform-api/src/com/intellij/ide/highlighter/InternalFileType.java
rename to platform/core-api/src/com/intellij/openapi/fileTypes/InternalFileType.java
index 337b92e6af6d7860aef2bf829f4233fe9254ef5d..fb61d44013f19574008aa8b6dcdd8656a466edbd 100644 (file)
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.intellij.ide.highlighter;
+package com.intellij.openapi.fileTypes;
 
 import com.intellij.openapi.fileTypes.FileType;
 
diff --git a/platform/core-api/src/com/intellij/openapi/project/ProjectCoreUtil.java b/platform/core-api/src/com/intellij/openapi/project/ProjectCoreUtil.java
new file mode 100644 (file)
index 0000000..e981b54
--- /dev/null
@@ -0,0 +1,23 @@
+package com.intellij.openapi.project;
+
+import com.intellij.openapi.fileTypes.FileType;
+import com.intellij.openapi.fileTypes.InternalFileType;
+import com.intellij.openapi.vfs.VirtualFile;
+import org.jetbrains.annotations.NonNls;
+
+/**
+ * Author: dmitrylomov
+ */
+public class ProjectCoreUtil {
+  @NonNls public static final String DIRECTORY_BASED_PROJECT_DIR = ".idea";
+
+  public static boolean isProjectOrWorkspaceFile(final VirtualFile file) {
+    return isProjectOrWorkspaceFile(file, file.getFileType());
+  }
+
+  public static boolean isProjectOrWorkspaceFile(final VirtualFile file,
+                                                 final FileType fileType) {
+    if (fileType instanceof InternalFileType) return true;
+    return file.getPath().contains("/"+ DIRECTORY_BASED_PROJECT_DIR +"/");
+  }
+}
similarity index 96%
rename from platform/lang-impl/src/com/intellij/psi/impl/cache/impl/id/IdIndex.java
rename to platform/indexing-impl/src/com/intellij/psi/impl/cache/impl/id/IdIndex.java
index 62706a9764b3d731493cc5593db3a2ecbadc7aa2..2b5f5e9c05e6d6eef62952036d708a67394b8962 100644 (file)
@@ -20,7 +20,7 @@ import com.intellij.lang.cacheBuilder.CacheBuilderRegistry;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.fileTypes.LanguageFileType;
 import com.intellij.openapi.fileTypes.impl.CustomSyntaxTableFileType;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.util.indexing.*;
 import com.intellij.util.io.DataExternalizer;
@@ -46,7 +46,7 @@ public class IdIndex extends FileBasedIndexExtension<IdIndexEntry, Integer> {
     @Override
     public boolean acceptInput(final VirtualFile file) {
       final FileType fileType = file.getFileType();
-      return isIndexable(fileType) && !ProjectUtil.isProjectOrWorkspaceFile(file, fileType);
+      return isIndexable(fileType) && !ProjectCoreUtil.isProjectOrWorkspaceFile(file, fileType);
     }
   };
 
index dda845796bd0372acf977a262fd402c03691c1f8..e8cc0d0ba8805a3c7ba9bbfd6e57308a06cb8349 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 7607d7b32b03e9a7d1ae2e7b97aacbf3d1c75f87..a1c765404cb4400dc58c170909c14a3c5c96cb27 100644 (file)
@@ -26,6 +26,7 @@ import com.intellij.openapi.module.ModuleManager;
 import com.intellij.openapi.progress.ProgressIndicator;
 import com.intellij.openapi.progress.ProgressManager;
 import com.intellij.openapi.project.Project;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.openapi.project.ProjectUtil;
 import com.intellij.openapi.roots.*;
 import com.intellij.openapi.roots.impl.FileIndexImplUtil;
@@ -335,7 +336,7 @@ public class AnalysisScope {
                               @NotNull final PsiManager psiManager,
                               final boolean needReadAction) {
     if (fileOrDir.isDirectory()) return true;
-    if (ProjectUtil.isProjectOrWorkspaceFile(fileOrDir)) return true;
+    if (ProjectCoreUtil.isProjectOrWorkspaceFile(fileOrDir)) return true;
     if (projectFileIndex.isInContent(fileOrDir) && (myIncludeTestSource || !projectFileIndex.isInTestSourceContent(fileOrDir))) {
       return processFile(fileOrDir, visitor, psiManager, needReadAction);
     }
index 189f0d112d1c637436465be43d4efd0e1ac38cb6..8d2fcbcf2eaf7a601c4defe50e37b02860880970 100644 (file)
@@ -16,7 +16,7 @@
 package com.intellij.openapi.project;
 
 import com.intellij.ide.DataManager;
-import com.intellij.ide.highlighter.InternalFileType;
+import com.intellij.openapi.fileTypes.InternalFileType;
 import com.intellij.openapi.actionSystem.DataContext;
 import com.intellij.openapi.actionSystem.PlatformDataKeys;
 import com.intellij.openapi.fileEditor.UniqueVFilePathBuilder;
@@ -40,8 +40,7 @@ import javax.swing.*;
 /**
  * @author max
  */
-public class ProjectUtil {
-  @NonNls public static final String DIRECTORY_BASED_PROJECT_DIR = ".idea";
+public class ProjectUtil extends ProjectCoreUtil {
 
   private ProjectUtil() { }
 
@@ -122,16 +121,6 @@ public class ProjectUtil {
     return ProjectLocator.getInstance().guessProjectForFile(file);
   }
 
-  public static boolean isProjectOrWorkspaceFile(final VirtualFile file) {
-    return isProjectOrWorkspaceFile(file, file.getFileType());
-  }
-
-  public static boolean isProjectOrWorkspaceFile(final VirtualFile file,
-                                                 final FileType fileType) {
-    if (fileType instanceof InternalFileType) return true;
-    return file.getPath().contains("/"+ DIRECTORY_BASED_PROJECT_DIR +"/");
-  }
-
   @NotNull
   public static Project guessCurrentProject(JComponent component) {
     Project project = null;
index aa7faeb2a35989999195dd3739a1ed2bcbf43912..482517a0d1fd96f445f13ab201aaa39e21c217e6 100644 (file)
@@ -28,7 +28,7 @@ import com.intellij.openapi.editor.highlighter.EditorHighlighter;
 import com.intellij.openapi.fileTypes.FileTypes;
 import com.intellij.openapi.progress.*;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.psi.PsiDirectory;
 import com.intellij.psi.PsiDocumentManager;
 import com.intellij.psi.PsiElement;
@@ -168,7 +168,7 @@ class PrintManager {
     if(isRecursive) {
       PsiDirectory[] directories = psiDirectory.getSubdirectories();
       for (PsiDirectory directory : directories) {
-        if (!ProjectUtil.DIRECTORY_BASED_PROJECT_DIR.equals(directory.getName())) {
+        if (!ProjectCoreUtil.DIRECTORY_BASED_PROJECT_DIR.equals(directory.getName())) {
           addToPsiFileList(directory, filesList, isRecursive);
         }
       }
index e425084a869cb51cce67b8da8d273d9299bb31ca..ac76aeb4d84dcc5702a323920c7fa2f7e7989a8f 100644 (file)
@@ -18,7 +18,7 @@ package com.intellij.codeInsight.daemon.impl.analysis;
 
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.openapi.roots.ProjectFileIndex;
 import com.intellij.openapi.roots.ProjectRootManager;
 import com.intellij.openapi.vfs.VirtualFile;
@@ -54,7 +54,7 @@ public class HighlightLevelUtil {
     final VirtualFile virtualFile = psiRoot.getContainingFile().getVirtualFile();
     if (virtualFile == null || !virtualFile.isValid()) return false;
 
-    if (ProjectUtil.isProjectOrWorkspaceFile(virtualFile)) return false;
+    if (ProjectCoreUtil.isProjectOrWorkspaceFile(virtualFile)) return false;
 
     final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex();
     if (ProjectScope.getLibrariesScope(project).contains(virtualFile) && !fileIndex.isInContent(virtualFile)) return false;
index bf5c3a07dc4fb67af2571a661d6306029dafb700..771bd0e36846ffc5dff4c8a0908993a10646544a 100644 (file)
@@ -34,10 +34,7 @@ import com.intellij.openapi.module.ModuleManager;
 import com.intellij.openapi.progress.ProcessCanceledException;
 import com.intellij.openapi.progress.ProgressIndicator;
 import com.intellij.openapi.progress.ProgressManager;
-import com.intellij.openapi.project.DumbService;
-import com.intellij.openapi.project.IndexNotReadyException;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.*;
 import com.intellij.openapi.roots.*;
 import com.intellij.openapi.roots.impl.FileIndexImplUtil;
 import com.intellij.openapi.ui.MessageType;
@@ -226,7 +223,7 @@ public class FindInProjectUtil {
         long fileLength = getFileLength(virtualFile);
         if (fileLength == -1) continue; // Binary or invalid
 
-        if (ProjectUtil.isProjectOrWorkspaceFile(virtualFile) && !Registry.is("find.search.in.project.files")) continue;
+        if (ProjectCoreUtil.isProjectOrWorkspaceFile(virtualFile) && !Registry.is("find.search.in.project.files")) continue;
 
         if (fileLength > SINGLE_FILE_SIZE_LIMIT) {
           largeFiles.add(psiFile);
index 6488c66368926d0adf4e5b2bfea5ea662a0239b3..1998ac33fc83c2d8b40349d060ca6aaeaebded52 100644 (file)
@@ -22,7 +22,7 @@ import com.intellij.lang.ParserDefinition;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.fileTypes.LanguageFileType;
 import com.intellij.openapi.fileTypes.impl.CustomSyntaxTableFileType;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.openapi.vfs.LocalFileSystem;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.impl.cache.impl.id.IdTableBuilding;
@@ -119,7 +119,7 @@ public class TodoIndex extends FileBasedIndexExtension<TodoIndexEntry, Integer>
       }
 
       final FileType fileType = file.getFileType();
-      if (ProjectUtil.isProjectOrWorkspaceFile(file, fileType)) {
+      if (ProjectCoreUtil.isProjectOrWorkspaceFile(file, fileType)) {
         return false;
       }
       
index 3219149fce4c9626835561a9c179251783e7d2b4..718da71533f834114a9c529c01fc957b9a00c734 100644 (file)
@@ -16,6 +16,7 @@
 package com.intellij.ide.highlighter;
 
 import com.intellij.ide.IdeBundle;
+import com.intellij.openapi.fileTypes.InternalFileType;
 import com.intellij.openapi.util.IconLoader;
 import com.intellij.openapi.vfs.CharsetToolkit;
 import com.intellij.openapi.vfs.VirtualFile;
index 0d2fea455b3360ab27e5124ad1f95150f5be8e10..aadd1ee96020352da1869c32668fe0d5df877c61 100644 (file)
@@ -16,6 +16,7 @@
 package com.intellij.ide.highlighter;
 
 import com.intellij.ide.IdeBundle;
+import com.intellij.openapi.fileTypes.InternalFileType;
 import com.intellij.openapi.util.IconLoader;
 import com.intellij.openapi.vfs.CharsetToolkit;
 import com.intellij.openapi.vfs.VirtualFile;
index 9bd8dc42ebec5f6319ed2eaac248cc308a446ad1..19e10ffc05dab5c55dc2e2c2cb1d98cb6f1fdd66 100644 (file)
@@ -16,6 +16,7 @@
 package com.intellij.ide.highlighter;
 
 import com.intellij.ide.IdeBundle;
+import com.intellij.openapi.fileTypes.InternalFileType;
 import com.intellij.openapi.util.IconLoader;
 import com.intellij.openapi.vfs.CharsetToolkit;
 import com.intellij.openapi.vfs.VirtualFile;
index ceeec0f3c3e20156888167ce2aeb1ee5921557b1..32bbb17a7969842ac2801226b1f67e74bea9c3a0 100644 (file)
@@ -21,10 +21,7 @@ import com.intellij.openapi.actionSystem.PlatformDataKeys;
 import com.intellij.openapi.actionSystem.Separator;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.project.ProjectManager;
-import com.intellij.openapi.project.ProjectManagerAdapter;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.*;
 import com.intellij.openapi.ui.Messages;
 import com.intellij.openapi.util.Ref;
 import com.intellij.openapi.util.SystemInfo;
@@ -77,7 +74,7 @@ public abstract class RecentProjectsManagerBase implements PersistentStateCompon
     }
     if (myState.lastPath != null) {
       File lastFile = new File(myState.lastPath);
-      if (lastFile.isDirectory() && !new File(lastFile, ProjectUtil.DIRECTORY_BASED_PROJECT_DIR).exists()) {
+      if (lastFile.isDirectory() && !new File(lastFile, ProjectCoreUtil.DIRECTORY_BASED_PROJECT_DIR).exists()) {
         myState.lastPath = null;
       }
     }
@@ -246,7 +243,7 @@ public abstract class RecentProjectsManagerBase implements PersistentStateCompon
 
   public static boolean isValidProjectPath(String projectPath) {
     final File file = new File(projectPath);
-    return file.exists() && (!file.isDirectory() || new File(file, ProjectUtil.DIRECTORY_BASED_PROJECT_DIR).exists());
+    return file.exists() && (!file.isDirectory() || new File(file, ProjectCoreUtil.DIRECTORY_BASED_PROJECT_DIR).exists());
   }
 
   private class MyProjectManagerListener extends ProjectManagerAdapter {
index 8d1732e88c5a7eeaf4f26b27327218ea8c5c9ad5..fb7fe752e57cde85360f8f8141dcbeaa0f8dc53e 100644 (file)
@@ -25,6 +25,7 @@ import com.intellij.openapi.components.StorageScheme;
 import com.intellij.openapi.components.impl.stores.IProjectStore;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.Project;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.openapi.project.ProjectManager;
 import com.intellij.openapi.project.ex.ProjectEx;
 import com.intellij.openapi.project.ex.ProjectManagerEx;
@@ -102,7 +103,7 @@ public class ProjectUtil {
     }
 
     if (path.endsWith(ProjectFileType.DOT_DEFAULT_EXTENSION) ||
-        virtualFile.isDirectory() && virtualFile.findChild(com.intellij.openapi.project.ProjectUtil.DIRECTORY_BASED_PROJECT_DIR) != null) {
+        virtualFile.isDirectory() && virtualFile.findChild(ProjectCoreUtil.DIRECTORY_BASED_PROJECT_DIR) != null) {
       return openProject(path, projectToClose, forceOpenInNewFrame);
     }
 
@@ -145,8 +146,8 @@ public class ProjectUtil {
       return null;
     }
 
-    if (file.isDirectory() && !new File(file, com.intellij.openapi.project.ProjectUtil.DIRECTORY_BASED_PROJECT_DIR).exists()) {
-      Messages.showErrorDialog(IdeBundle.message("error.project.file.does.not.exist", new File(file, com.intellij.openapi.project.ProjectUtil.DIRECTORY_BASED_PROJECT_DIR).getPath()), CommonBundle.getErrorTitle());
+    if (file.isDirectory() && !new File(file, ProjectCoreUtil.DIRECTORY_BASED_PROJECT_DIR).exists()) {
+      Messages.showErrorDialog(IdeBundle.message("error.project.file.does.not.exist", new File(file, ProjectCoreUtil.DIRECTORY_BASED_PROJECT_DIR).getPath()), CommonBundle.getErrorTitle());
       return null;
     }
 
@@ -268,10 +269,10 @@ public class ProjectUtil {
   }
 
   /**
-   * @deprecated use {@linkplain com.intellij.openapi.project.ProjectUtil#isProjectOrWorkspaceFile(com.intellij.openapi.vfs.VirtualFile)} (to remove in IDEA 13)
+   * @deprecated use {@linkplain com.intellij.openapi.project.ProjectCoreUtil#isProjectOrWorkspaceFile(com.intellij.openapi.vfs.VirtualFile)} (to remove in IDEA 13)
    */
   @SuppressWarnings("UnusedDeclaration")
   public static boolean isProjectOrWorkspaceFile(final VirtualFile file) {
-    return com.intellij.openapi.project.ProjectUtil.isProjectOrWorkspaceFile(file);
+    return ProjectCoreUtil.isProjectOrWorkspaceFile(file);
   }
 }
index a6c976b61c5437391757351bc4a94c98899e433c..f07f133cfe86f019b108a7836a3a3822f46ab955 100644 (file)
@@ -27,7 +27,7 @@ import com.intellij.openapi.fileEditor.FileDocumentManager;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.fileTypes.FileTypes;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.openapi.project.ex.ProjectManagerEx;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.VirtualFile;
@@ -105,7 +105,7 @@ public interface MergeVersion {
 
     public static void reportProjectFileChangeIfNeeded(Project project, VirtualFile file) {
       if (file != null && ! file.isDirectory()) {
-        if (ProjectUtil.isProjectOrWorkspaceFile(file) || isProjectFile(file)) {
+        if (ProjectCoreUtil.isProjectOrWorkspaceFile(file) || isProjectFile(file)) {
           ProjectManagerEx.getInstanceEx().saveChangedProjectFile(file, project);
         }
       }
@@ -116,7 +116,7 @@ public interface MergeVersion {
       final Set<VirtualFile> vfs = new HashSet<VirtualFile>();
       for (VirtualFile vf : files) {
         if (vf != null && ! vf.isDirectory()) {
-          if (ProjectUtil.isProjectOrWorkspaceFile(vf) || isProjectFile(vf)) {
+          if (ProjectCoreUtil.isProjectOrWorkspaceFile(vf) || isProjectFile(vf)) {
             vfs.add(vf);
           }
         }
index 970560eb49319480fa7bd247af71e23ef4b76d85..52e918a150810d4197cc360c97c833bb9df3fd3a 100644 (file)
@@ -21,7 +21,7 @@ import com.intellij.lang.LanguageCommenters;
 import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.fileTypes.*;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiDirectory;
@@ -226,7 +226,7 @@ public class FileTypeUtil
             return false;
         }
 
-        if (ProjectUtil.isProjectOrWorkspaceFile(file)) return false;
+        if (ProjectCoreUtil.isProjectOrWorkspaceFile(file)) return false;
       FileType type = file.getFileType();
 
         return types.get(type.getName()) != null;
@@ -240,7 +240,7 @@ public class FileTypeUtil
         }
         final VirtualFile virtualFile = file.getVirtualFile();
         if (virtualFile == null) return false;
-        if (ProjectUtil.isProjectOrWorkspaceFile(virtualFile)) return false;
+        if (ProjectCoreUtil.isProjectOrWorkspaceFile(virtualFile)) return false;
         return isSupportedType(virtualFile.getFileType());
     }
 
index a0708fbd4c6f6fd59a6b6ad418ba909c65edcb82..5edaecaffaa3cf9f49f27178e636aef80a444500 100644 (file)
@@ -17,7 +17,7 @@ package com.intellij.xml.util;
 
 import com.intellij.ide.highlighter.XmlFileType;
 import com.intellij.openapi.fileTypes.FileType;
-import com.intellij.openapi.project.ProjectUtil;
+import com.intellij.openapi.project.ProjectCoreUtil;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.impl.include.FileIncludeInfo;
 import com.intellij.psi.impl.include.FileIncludeProvider;
@@ -41,7 +41,7 @@ public class XIncludeProvider extends FileIncludeProvider {
   @Override
   public boolean acceptFile(VirtualFile file) {
     final FileType fileType = file.getFileType();
-    return fileType == XmlFileType.INSTANCE && !ProjectUtil.isProjectOrWorkspaceFile(file, fileType);
+    return fileType == XmlFileType.INSTANCE && !ProjectCoreUtil.isProjectOrWorkspaceFile(file, fileType);
   }
 
   @NotNull