Merge branch 'master' into upsource-master
authorEvgeny Pasynkov <Evgeny.Pasynkov@jetbrains.com>
Wed, 25 Jul 2012 10:15:47 +0000 (12:15 +0200)
committerEvgeny Pasynkov <Evgeny.Pasynkov@jetbrains.com>
Wed, 25 Jul 2012 10:15:47 +0000 (12:15 +0200)
java/java-indexing-api/src/com/intellij/psi/search/PsiShortNamesCache.java [moved from java/openapi/src/com/intellij/psi/search/PsiShortNamesCache.java with 100% similarity]
java/java-indexing-impl/src/com/intellij/psi/impl/CompositeShortNamesCache.java [moved from java/java-impl/src/com/intellij/psi/impl/CompositeShortNamesCache.java with 100% similarity]
java/java-indexing-impl/src/com/intellij/psi/impl/PsiShortNamesCacheImpl.java [moved from java/java-impl/src/com/intellij/psi/impl/PsiShortNamesCacheImpl.java with 97% similarity]
java/java-indexing-impl/src/com/intellij/psi/impl/java/stubs/index/JavaFieldNameIndex.java [moved from java/java-impl/src/com/intellij/psi/impl/java/stubs/index/JavaFieldNameIndex.java with 100% similarity]
java/java-indexing-impl/src/com/intellij/psi/impl/java/stubs/index/JavaMethodNameIndex.java [moved from java/java-impl/src/com/intellij/psi/impl/java/stubs/index/JavaMethodNameIndex.java with 100% similarity]
java/java-indexing-impl/src/com/intellij/psi/impl/java/stubs/index/JavaShortClassNameIndex.java [moved from java/java-impl/src/com/intellij/psi/impl/java/stubs/index/JavaShortClassNameIndex.java with 100% similarity]
platform/core-impl/src/com/intellij/core/CoreApplicationEnvironment.java
platform/core-impl/src/com/intellij/core/CoreProjectEnvironment.java
platform/indexing-impl/src/com/intellij/psi/search/FilenameIndex.java [moved from platform/lang-impl/src/com/intellij/psi/search/FilenameIndex.java with 100% similarity]
platform/indexing-impl/src/com/intellij/util/indexing/ScalarIndexExtension.java [moved from platform/lang-impl/src/com/intellij/util/indexing/ScalarIndexExtension.java with 100% similarity]
plugins/ui-designer/src/com/intellij/uiDesigner/GuiDesignerConfigurable.java

similarity index 97%
rename from java/java-impl/src/com/intellij/psi/impl/PsiShortNamesCacheImpl.java
rename to java/java-indexing-impl/src/com/intellij/psi/impl/PsiShortNamesCacheImpl.java
index c6989f730f347ccb41812edde0cb2f5082278856..215c9eb22fb5aa7d2f8a2edf3fb5aaaf5144c7f6 100644 (file)
@@ -15,7 +15,7 @@
  */
 package com.intellij.psi.impl;
 
-import com.intellij.openapi.progress.ProgressManager;
+import com.intellij.openapi.progress.ProgressIndicatorProvider;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.*;
 import com.intellij.psi.impl.java.stubs.index.JavaFieldNameIndex;
@@ -42,7 +42,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Set;
 
-class PsiShortNamesCacheImpl extends PsiShortNamesCache {
+public class PsiShortNamesCacheImpl extends PsiShortNamesCache {
   private final PsiManagerEx myManager;
 
   public PsiShortNamesCacheImpl(PsiManagerEx manager) {
@@ -225,7 +225,7 @@ class PsiShortNamesCacheImpl extends PsiShortNamesCache {
     });
 
     for (T member : members) {
-      ProgressManager.checkCanceled();
+      ProgressIndicatorProvider.checkCanceled();
 
       if (!scope.contains(member.getContainingFile().getVirtualFile())) continue;
       if (!set.add(member)) continue;
index b1d7f8dda27c8c6d7c0b09748f261c78edb45031..9602e9463bc25fd5430df47a702b1c0921cca260 100644 (file)
@@ -258,6 +258,7 @@ public class CoreApplicationEnvironment {
     });
   }
 
+
   public static <T> void registerExtensionPoint(final ExtensionsArea area, final ExtensionPointName<T> extensionPointName,
                                                    final Class<? extends T> aClass) {
     final String name = extensionPointName.getName();
index 9c285ef6a2a3d7c560d63259811fe8859e089291..2f1570b4c56b7384c398bfad6bf86cb4d33ae046 100644 (file)
@@ -20,10 +20,12 @@ import com.intellij.mock.MockFileIndexFacade;
 import com.intellij.mock.MockProject;
 import com.intellij.mock.MockResolveScopeManager;
 import com.intellij.openapi.Disposable;
+import com.intellij.openapi.extensions.ExtensionPoint;
 import com.intellij.openapi.extensions.ExtensionPointName;
 import com.intellij.openapi.extensions.Extensions;
 import com.intellij.openapi.project.DumbService;
 import com.intellij.openapi.roots.FileIndexFacade;
+import com.intellij.openapi.util.Disposer;
 import com.intellij.psi.PsiFileFactory;
 import com.intellij.psi.PsiManager;
 import com.intellij.psi.impl.*;
@@ -96,6 +98,18 @@ public class CoreProjectEnvironment {
     CoreApplicationEnvironment.registerExtensionPoint(Extensions.getArea(myProject), extensionPointName, aClass);
   }
 
+  protected <T> void addProjectExtension(final ExtensionPointName<T> name, final T extension) {
+    final ExtensionPoint<T> extensionPoint = Extensions.getArea(myProject).getExtensionPoint(name);
+    extensionPoint.registerExtension(extension);
+    Disposer.register(myParentDisposable, new Disposable() {
+      @Override
+      public void dispose() {
+        extensionPoint.unregisterExtension(extension);
+      }
+    });
+  }
+
+
   public <T> void registerProjectComponent(final Class<T> interfaceClass, final T implementation) {
     CoreApplicationEnvironment.registerComponentInstance(myProject.getPicoContainer(), interfaceClass, implementation);
   }
index fa013d413f70f52831e809e5f7f7cf84ce5e8116..2611a38414b4dbcebfbba2e4fa8bcd3439ae99da 100644 (file)
@@ -16,7 +16,6 @@
 package com.intellij.uiDesigner;
 
 import com.intellij.codeInsight.CodeInsightUtil;
-import com.intellij.icons.AllIcons;
 import com.intellij.ui.ListCellRendererWrapper;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.command.CommandProcessor;