diff --git a/platform/platform-impl/src/com/intellij/openapi/project/DumbServiceImpl.java b/platform/platform-impl/src/com/intellij/openapi/project/DumbServiceImpl.java index 0fab1c658353..87fa5fd658ff 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/DumbServiceImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/project/DumbServiceImpl.java @@ -119,10 +119,12 @@ public class DumbServiceImpl extends DumbService { if (application.isUnitTestMode() || application.isHeadlessEnvironment()) { // no dumb mode for tests EmptyProgressIndicator i = new EmptyProgressIndicator(); - runner.queryNeededFiles(i); + final int size = runner.queryNeededFiles(i); try { HeavyProcessLatch.INSTANCE.processStarted(); - runner.processFiles(i, false); + if (size > 0) { + runner.processFiles(i, false); + } runner.updatingDone(); } finally { @@ -146,7 +148,7 @@ public class DumbServiceImpl extends DumbService { final int size = runner.queryNeededFiles(indicator); if (application.isHeadlessEnvironment() || (size + runner.getNumberOfPendingUpdateJobs(indicator)) < 50) { // If not that many files found, process them on the spot, avoiding entering dumb mode - // Consider number of pending tasks as well, becase they may take noticeable time to process even if the number of files is small + // Consider number of pending tasks as well, because they may take noticeable time to process even if the number of files is small try { HeavyProcessLatch.INSTANCE.processStarted(); if (size > 0) { @@ -356,8 +358,10 @@ public class DumbServiceImpl extends DumbService { myTotalItems += count; indicator.setIndeterminate(false); - indicator.setText(IdeBundle.message("progress.indexing.updaing")); - updateRunner.processFiles(indicator, true); + indicator.setText(IdeBundle.message("progress.indexing.updating")); + if (count > 0) { + updateRunner.processFiles(indicator, true); + } updateRunner.updatingDone(); } finally { diff --git a/platform/platform-resources-en/src/messages/IdeBundle.properties b/platform/platform-resources-en/src/messages/IdeBundle.properties index 4858630ba6d7..364ee3d3931b 100644 --- a/platform/platform-resources-en/src/messages/IdeBundle.properties +++ b/platform/platform-resources-en/src/messages/IdeBundle.properties @@ -561,7 +561,7 @@ node.projectview.library={0} library node.projectview.jdk=JDK progress.indexing=Updating indices... progress.indexing.scanning=Scanning files to index... -progress.indexing.updaing=Indexing... +progress.indexing.updating=Indexing... action.structureview.show.fields=Show Fields action.structureview.show.inherited=Show Inherited action.structureview.show.properties=Show Properties