From e36425e76a35c43c591cc11848636b339d422b86 Mon Sep 17 00:00:00 2001 From: Gregory Shrago Date: Thu, 21 Jan 2010 20:05:25 +0300 Subject: [PATCH 1/6] IDEA-27144 Spring 3.0 API added;generics & vararg support fix --- .../intellij/patterns/PsiMethodPattern.java | 23 ++++++++--- .../src/LanguageInjectionConfiguration.xml | 39 +++++++++++++++++-- 2 files changed, 54 insertions(+), 8 deletions(-) diff --git a/java/openapi/src/com/intellij/patterns/PsiMethodPattern.java b/java/openapi/src/com/intellij/patterns/PsiMethodPattern.java index 741c4a321c47..ac3ecf5d4209 100644 --- a/java/openapi/src/com/intellij/patterns/PsiMethodPattern.java +++ b/java/openapi/src/com/intellij/patterns/PsiMethodPattern.java @@ -18,12 +18,10 @@ package com.intellij.patterns; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Ref; -import com.intellij.psi.PsiClass; -import com.intellij.psi.PsiMethod; -import com.intellij.psi.PsiParameter; -import com.intellij.psi.PsiParameterList; +import com.intellij.psi.*; import com.intellij.psi.search.searches.SuperMethodsSearch; import com.intellij.psi.util.MethodSignatureBackedByPsiMethod; +import com.intellij.psi.util.TypeConversionUtil; import com.intellij.util.ProcessingContext; import com.intellij.util.Processor; import org.jetbrains.annotations.NonNls; @@ -67,13 +65,28 @@ public class PsiMethodPattern extends PsiMemberPattern 0) { final PsiParameter[] psiParameters = parameterList.getParameters(); for (int i = 0; i < dotsIndex; i++) { - if (!Comparing.equal("?", types[i]) && !types[i].equals(psiParameters[i].getType().getCanonicalText())) { + if (!Comparing.equal("?", types[i]) && !typeEquivalent(psiParameters[i].getType(), types[i])) { return false; } } } return true; } + + private boolean typeEquivalent(PsiType type, String expectedText) { + final PsiType erasure = TypeConversionUtil.erasure(type); + final String text; + if (erasure instanceof PsiEllipsisType && expectedText.endsWith("[]")) { + text = ((PsiEllipsisType)erasure).getComponentType().getCanonicalText() + "[]"; + } + else if (erasure instanceof PsiArrayType && expectedText.endsWith("...")) { + text = ((PsiArrayType)erasure).getComponentType().getCanonicalText() +"..."; + } + else { + text = erasure.getCanonicalText(); + } + return expectedText.equals(text); + } }); } diff --git a/plugins/IntelliLang/src/LanguageInjectionConfiguration.xml b/plugins/IntelliLang/src/LanguageInjectionConfiguration.xml index 2b18e260f1ec..40a0e9177876 100644 --- a/plugins/IntelliLang/src/LanguageInjectionConfiguration.xml +++ b/plugins/IntelliLang/src/LanguageInjectionConfiguration.xml @@ -111,6 +111,7 @@ + @@ -220,14 +221,40 @@ SimpleJdbcOperations (org.springframework.jdbc.core.simple) - ", "java.lang.Object...").definedInClass("org.springframework.jdbc.core.simple.SimpleJdbcOperations"))]]> + + + + + + + + + + + + + + + + - ", "java.lang.Object...").definedInClass("org.springframework.jdbc.core.simple.SimpleJdbcOperations"))]]> - ", "java.lang.Object...").definedInClass("org.springframework.jdbc.core.simple.SimpleJdbcOperations"))]]> + + + + + + + + + + + + + SqlCall.SqlCall (org.springframework.jdbc.object) @@ -239,6 +266,12 @@ + + SqlFunction.SqlFunction (org.springframework.jdbc.object) + + + + SqlOperation.newPreparedStatementCreator (org.springframework.jdbc.object) From de2165d1d65ac6e6c9e3f979ab7d7bfa4f2e27cf Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Thu, 21 Jan 2010 20:52:27 +0300 Subject: [PATCH 2/6] eliminate Cyclic Dependency: FileBasedIndex()->StubUpdatingIndex()->StubIndexImpl()->[requestRebuild()]FileBasedIndex() --- .../com/intellij/util/indexing/FileBasedIndex.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java index 5acac5338994..224831a0bf30 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -223,6 +223,10 @@ public class FileBasedIndex implements ApplicationComponent { } }); + myChangedFilesCollector = new ChangedFilesCollector(); + } + + public void initComponent() { final File workInProgressFile = getMarkerFile(); if (workInProgressFile.exists()) { // previous IDEA session was closed incorrectly, so drop all indices @@ -256,11 +260,13 @@ public class FileBasedIndex implements ApplicationComponent { } } - myChangedFilesCollector = new ChangedFilesCollector(); - vfManager.addVirtualFileListener(myChangedFilesCollector); + myVfManager.addVirtualFileListener(myChangedFilesCollector); registerIndexableSet(new AdditionalIndexableFileSet()); } + catch (IOException e) { + throw new RuntimeException(e); + } finally { ShutDownTracker.getInstance().registerShutdownTask(new Runnable() { public void run() { @@ -432,9 +438,6 @@ public class FileBasedIndex implements ApplicationComponent { return "FileBasedIndex"; } - public void initComponent() { - } - public void disposeComponent() { performShutdown(); } From d856d111bdb002fca228f5acaede9c1636b238f1 Mon Sep 17 00:00:00 2001 From: Gregory Shrago Date: Thu, 21 Jan 2010 23:38:58 +0300 Subject: [PATCH 3/6] managed beans --- .../src/com/intellij/semantic/SemKey.java | 4 ++++ .../com/intellij/semantic/SemServiceImpl.java | 19 ++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/platform/lang-api/src/com/intellij/semantic/SemKey.java b/platform/lang-api/src/com/intellij/semantic/SemKey.java index 1c117cae80f9..448334db6db6 100644 --- a/platform/lang-api/src/com/intellij/semantic/SemKey.java +++ b/platform/lang-api/src/com/intellij/semantic/SemKey.java @@ -35,6 +35,10 @@ public class SemKey { myUniqueId = counter.getAndIncrement(); } + public SemKey[] getSupers() { + return mySupers; + } + public boolean isKindOf(SemKey another) { if (another == this) return true; for (final SemKey superKey : mySupers) { diff --git a/platform/lang-impl/src/com/intellij/semantic/SemServiceImpl.java b/platform/lang-impl/src/com/intellij/semantic/SemServiceImpl.java index 571c108e1d81..1cbd7e0d39fd 100644 --- a/platform/lang-impl/src/com/intellij/semantic/SemServiceImpl.java +++ b/platform/lang-impl/src/com/intellij/semantic/SemServiceImpl.java @@ -25,6 +25,7 @@ import com.intellij.psi.impl.PsiManagerEx; import com.intellij.psi.util.PsiModificationTracker; import com.intellij.util.ConcurrencyUtil; import com.intellij.util.NullableFunction; +import com.intellij.util.Processor; import com.intellij.util.SmartList; import com.intellij.util.containers.ConcurrentHashMap; import com.intellij.util.containers.ContainerUtil; @@ -130,13 +131,17 @@ public class SemServiceImpl extends SemService{ SemKey[] allKeys = map.keySet().toArray(new SemKey[map.size()]); for (final SemKey key : allKeys) { myProducers.put(key, map.get(key)); - for (final SemKey concrete : allKeys) { - if (concrete.isKindOf(key)) { - myInheritors.putValue(key, concrete); - } - } } - + ContainerUtil.process(allKeys, new Processor() { + public boolean process(SemKey key) { + myInheritors.putValue(key, key); + for (SemKey parent : key.getSupers()) { + myInheritors.putValue(parent, key); + process(parent); + } + return true; + } + }); for (final SemKey each : myInheritors.keySet()) { final List inheritors = new ArrayList(myInheritors.get(each)); Collections.sort(inheritors, KEY_COMPARATOR); @@ -172,7 +177,7 @@ public class SemServiceImpl extends SemService{ private List createSemElements(SemKey key, PsiElement psi) { List result = null; final Collection> producers = myProducers.get(key); - if (!producers.isEmpty()) { + if (producers != null && !producers.isEmpty()) { for (final NullableFunction producer : producers) { final SemElement element = producer.fun(psi); if (element != null) { From 26ebe725e433c47b96121caccbc11ca92d176aa5 Mon Sep 17 00:00:00 2001 From: irengrig Date: Fri, 22 Jan 2010 00:02:25 +0300 Subject: [PATCH 4/6] IDEA-50684 (CVS: should not be possible to import to cvs if connection fails) --- .../actions/BrowseCvsRepositoryAction.java | 29 +++++++++++++++---- .../cvsoperations/common/LoginPerformer.java | 8 ++++- .../ui/experts/SelectCvsElementStep.java | 27 +++++++++++++++++ 3 files changed, 58 insertions(+), 6 deletions(-) diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/actions/BrowseCvsRepositoryAction.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/actions/BrowseCvsRepositoryAction.java index 2cec9827f79b..eec61112bc1e 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/actions/BrowseCvsRepositoryAction.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/actions/BrowseCvsRepositoryAction.java @@ -16,24 +16,26 @@ package com.intellij.cvsSupport2.actions; import com.intellij.CvsBundle; -import com.intellij.util.Consumer; import com.intellij.cvsSupport2.actions.cvsContext.CvsContext; import com.intellij.cvsSupport2.actions.cvsContext.CvsContextWrapper; import com.intellij.cvsSupport2.config.CvsRootConfiguration; import com.intellij.cvsSupport2.config.ui.SelectCvsConfigurationDialog; +import com.intellij.cvsSupport2.connections.CvsEnvironment; import com.intellij.cvsSupport2.cvsBrowser.ui.BrowserPanel; import com.intellij.cvsSupport2.cvsExecution.ModalityContext; +import com.intellij.cvsSupport2.cvsExecution.ModalityContextImpl; import com.intellij.cvsSupport2.cvshandlers.AbstractCvsHandler; import com.intellij.cvsSupport2.cvshandlers.CvsHandler; import com.intellij.cvsSupport2.cvshandlers.FileSetToBeUpdated; import com.intellij.cvsSupport2.cvsoperations.common.LoginPerformer; import com.intellij.cvsSupport2.ui.CvsTabbedWindow; -import com.intellij.cvsSupport2.connections.CvsEnvironment; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.Presentation; +import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.actions.VcsContext; import com.intellij.openapi.vcs.VcsException; +import com.intellij.openapi.vcs.actions.VcsContext; +import com.intellij.util.Consumer; import java.util.Collections; @@ -75,6 +77,12 @@ public class BrowseCvsRepositoryAction extends AbstractAction{ CvsTabbedWindow tabbedWindow, boolean successfully, CvsHandler handler) { + if (! loginImpl(context.getProject(), new ModalityContextImpl(ModalityState.NON_MODAL, false), + new Consumer() { + public void consume(VcsException e) { + // + } + })) return; super.onActionPerformed(context, tabbedWindow, successfully, handler); if (successfully){ Project project = context.getProject(); @@ -105,14 +113,25 @@ public class BrowseCvsRepositoryAction extends AbstractAction{ } public boolean login(ModalityContext executor) throws Exception { - final LoginPerformer.MyProjectKnown performer = + return loginImpl(myProject, executor, new Consumer() { + public void consume(VcsException e) { + myErrors.add(e); + } + }); + /*final LoginPerformer.MyProjectKnown performer = new LoginPerformer.MyProjectKnown(myProject, Collections.singletonList(mySelectedConfiguration), new Consumer() { public void consume(VcsException e) { myErrors.add(e); } }); - return performer.loginAll(executor); + return performer.loginAll(executor, false);*/ } } + + public boolean loginImpl(final Project project, final ModalityContext executor, final Consumer exceptionConsumer) { + final LoginPerformer.MyProjectKnown performer = + new LoginPerformer.MyProjectKnown(project, Collections.singletonList(mySelectedConfiguration), exceptionConsumer); + return performer.loginAll(executor, false); + } } diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/common/LoginPerformer.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/common/LoginPerformer.java index 451786643f89..15d476a7687c 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/common/LoginPerformer.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/common/LoginPerformer.java @@ -51,6 +51,10 @@ public abstract class LoginPerformer { protected abstract Project getProject(T root); public boolean loginAll(final ModalityContext executor) { + return loginAll(executor, true); + } + + public boolean loginAll(final ModalityContext executor, final boolean goOffline) { for (T root : myRoots) { final Project project = getProject(root); @@ -59,7 +63,9 @@ public abstract class LoginPerformer { final ThreeState checkResult = checkLoginWorker(worker, executor, project, myForceCheck); if (! ThreeState.YES.equals(checkResult)) { if (ThreeState.UNSURE.equals(checkResult)) { - worker.goOffline(); + if (goOffline) { + worker.goOffline(); + } myExceptionConsumer.consume(new CvsException("Authentication canceled", root.getCvsRootAsString())); } return false; diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/SelectCvsElementStep.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/SelectCvsElementStep.java index 6aebdad0d074..b6fc9148afd9 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/SelectCvsElementStep.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/SelectCvsElementStep.java @@ -16,14 +16,22 @@ package com.intellij.cvsSupport2.ui.experts; import com.intellij.cvsSupport2.config.CvsRootConfiguration; +import com.intellij.cvsSupport2.connections.CvsEnvironment; import com.intellij.cvsSupport2.cvsBrowser.CvsElement; import com.intellij.cvsSupport2.cvsBrowser.CvsTree; import com.intellij.cvsSupport2.cvsBrowser.LoginAbortedException; +import com.intellij.cvsSupport2.cvsExecution.ModalityContextImpl; +import com.intellij.cvsSupport2.cvsoperations.common.LoginPerformer; +import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Comparing; +import com.intellij.openapi.util.Ref; +import com.intellij.openapi.vcs.VcsException; +import com.intellij.util.Consumer; import javax.swing.*; import java.awt.*; +import java.util.Collections; import java.util.Observable; import java.util.Observer; @@ -60,9 +68,28 @@ public class SelectCvsElementStep extends WizardStep { return myCvsTree.getCurrentSelection().length > 0; } + private boolean isLogged(final CvsRootConfiguration selectedConfiguration) { + final Ref errors = new Ref(); + final LoginPerformer.MyProjectKnown performer = new LoginPerformer.MyProjectKnown( + myProject, Collections.singletonList(selectedConfiguration), + new Consumer() { + public void consume(VcsException e) { + errors.set(Boolean.TRUE); + } + }); + final boolean logged = performer.loginAll( + new ModalityContextImpl(ModalityState.stateForComponent(mySelectCVSConfigurationStep.getComponent()), false), false); + if ((! logged) || (! errors.isNull())) { + return false; + } + return true; + } + public boolean setActive() { CvsRootConfiguration selectedConfiguration = mySelectCVSConfigurationStep.getSelectedConfiguration(); + if (! isLogged(selectedConfiguration)) return false; + if (myCvsTree == null || !Comparing.equal(myConfiguration, selectedConfiguration)) { myConfiguration = selectedConfiguration; if (myConfiguration == null) return false; From 76f27efbbfab697d2b1bc97a54c1a641419156a5 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 9 Dec 2009 15:14:40 +0000 Subject: [PATCH 5/6] lazier groovy icons loading --- .../src/org/jetbrains/plugins/groovy/GroovyFileType.java | 3 +-- .../src/org/jetbrains/plugins/groovy/GroovyIconProvider.java | 2 +- .../jetbrains/plugins/groovy/extensions/GroovyScriptType.java | 4 ++-- .../plugins/groovy/lang/psi/impl/GroovyFileImpl.java | 3 ++- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/GroovyFileType.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/GroovyFileType.java index 4408387c76bf..c3c6633a94bc 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/GroovyFileType.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/GroovyFileType.java @@ -38,7 +38,6 @@ public class GroovyFileType extends LanguageFileType { public static final GroovyFileType GROOVY_FILE_TYPE = new GroovyFileType(); public static final Language GROOVY_LANGUAGE = GROOVY_FILE_TYPE.getLanguage(); - public static final Icon GROOVY_LOGO = GroovyIcons.GROOVY_ICON_16x16; @NonNls public static final String DEFAULT_EXTENSION = "groovy"; private GroovyFileType() { @@ -64,7 +63,7 @@ public class GroovyFileType extends LanguageFileType { } public Icon getIcon() { - return GROOVY_LOGO; + return GroovyIcons.GROOVY_ICON_16x16; } public boolean isJVMDebuggingSupported() { diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/GroovyIconProvider.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/GroovyIconProvider.java index 13fe248e6ebf..c9f86f15e299 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/GroovyIconProvider.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/GroovyIconProvider.java @@ -40,7 +40,7 @@ public class GroovyIconProvider extends IconProvider implements DumbAware { if (typeDefinitions.length > 0) { return typeDefinitions[0].getIcon(flags); } - return GroovyFileType.GROOVY_LOGO; + return GroovyIcons.GROOVY_ICON_16x16; } return GroovyScriptType.getScriptType(file).getScriptIcon(); diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/extensions/GroovyScriptType.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/extensions/GroovyScriptType.java index f737d7d10e9d..7010ebd865d7 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/extensions/GroovyScriptType.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/extensions/GroovyScriptType.java @@ -20,7 +20,7 @@ import com.intellij.openapi.extensions.ExtensionPointName; import com.intellij.psi.search.GlobalSearchScope; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.plugins.groovy.GroovyFileType; +import org.jetbrains.plugins.groovy.GroovyIcons; import org.jetbrains.plugins.groovy.lang.psi.GroovyFile; import org.jetbrains.plugins.groovy.runner.GroovyScriptRunConfiguration; import org.jetbrains.plugins.groovy.runner.GroovyScriptRunner; @@ -44,7 +44,7 @@ public abstract class GroovyScriptType { @NotNull @Override public Icon getScriptIcon() { - return GroovyFileType.GROOVY_LOGO; + return GroovyIcons.GROOVY_ICON_16x16; } @Override diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyFileImpl.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyFileImpl.java index 95a470b7d738..5dfdad8d70ae 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyFileImpl.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyFileImpl.java @@ -36,6 +36,7 @@ import gnu.trove.THashSet; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.groovy.GroovyFileType; +import org.jetbrains.plugins.groovy.GroovyIcons; import org.jetbrains.plugins.groovy.dsl.GroovyDslFileIndex; import org.jetbrains.plugins.groovy.dsl.GroovyScriptDescriptor; import org.jetbrains.plugins.groovy.extensions.GroovyScriptType; @@ -300,7 +301,7 @@ public class GroovyFileImpl extends GroovyFileBaseImpl implements GroovyFile { if (isScript()) { return GroovyScriptType.getScriptType(this).getScriptIcon(); } - return GroovyFileType.GROOVY_LOGO; + return GroovyIcons.GROOVY_ICON_16x16; } public GrImportStatement addImportForClass(PsiClass aClass) { From 5f5abb6b2b972122b0b7e7c96bf1775972f6eec7 Mon Sep 17 00:00:00 2001 From: irengrig Date: Fri, 22 Jan 2010 09:15:14 +0300 Subject: [PATCH 6/6] SVN: load branches on start inside one short; will produce ordered authorization requests --- .../svn/SvnBranchConfigurationManager.java | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnBranchConfigurationManager.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnBranchConfigurationManager.java index a1ede315e7a7..bfdf5dc73226 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnBranchConfigurationManager.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnBranchConfigurationManager.java @@ -142,22 +142,26 @@ public class SvnBranchConfigurationManager implements PersistentStateComponent oldUrls = (prev == null) ? Collections.emptySet() : new HashSet(prev.getBranchUrls()); final Application application = ApplicationManager.getApplication(); application.executeOnPooledThread(new Runnable() { public void run() { - final SvnVcs vcs = SvnVcs.getInstance(myProject); - if (! vcs.isVcsBackgroundOperationsAllowed(myRoot)) return; - - for (String newBranchUrl : next.getBranchUrls()) { - if (myAll || (! oldUrls.contains(newBranchUrl))) { - new NewRootBunch.BranchesLoadRunnable(myProject, myBunch, newBranchUrl, InfoReliability.defaultValues, myRoot, null).run(); - } - } + loadImpl(prev, next); } }); } + protected void loadImpl(final SvnBranchConfigurationNew prev, final SvnBranchConfigurationNew next) { + final Set oldUrls = (prev == null) ? Collections.emptySet() : new HashSet(prev.getBranchUrls()); + final SvnVcs vcs = SvnVcs.getInstance(myProject); + if (! vcs.isVcsBackgroundOperationsAllowed(myRoot)) return; + + for (String newBranchUrl : next.getBranchUrls()) { + if (myAll || (! oldUrls.contains(newBranchUrl))) { + new NewRootBunch.BranchesLoadRunnable(myProject, myBunch, newBranchUrl, InfoReliability.defaultValues, myRoot, null).run(); + } + } + } + public void setAll(boolean all) { myAll = all; } @@ -200,11 +204,15 @@ public class SvnBranchConfigurationManager implements PersistentStateComponent pair : whatToInit) { - final BranchesPreloader branchesPreloader = new BranchesPreloader(myProject, myBunch, pair.getFirst()); - branchesPreloader.setAll(true); - branchesPreloader.consume(null, pair.getSecond()); - } + ApplicationManager.getApplication().executeOnPooledThread(new Runnable() { + public void run() { + for (Pair pair : whatToInit) { + final BranchesPreloader branchesPreloader = new BranchesPreloader(myProject, myBunch, pair.getFirst()); + branchesPreloader.setAll(true); + branchesPreloader.loadImpl(null, pair.getSecond()); + } + } + }); } }); object.myConfigurationMap.clear();