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 56d9f8a7b2ac..a98209593311 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -24,10 +24,7 @@ import com.intellij.openapi.project.*; import com.intellij.openapi.roots.CollectingContentIterator; import com.intellij.openapi.roots.ContentIterator; import com.intellij.openapi.roots.ProjectRootManager; -import com.intellij.openapi.util.Factory; -import com.intellij.openapi.util.Key; -import com.intellij.openapi.util.Pair; -import com.intellij.openapi.util.ShutDownTracker; +import com.intellij.openapi.util.*; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.vfs.*; @@ -1100,6 +1097,8 @@ public class FileBasedIndex implements ApplicationComponent { PsiFile psiFile = null; + final Ref pce = Ref.create(null); + final List tasks = new ArrayList(); for (final ID indexId : myIndices.keySet()) { if (shouldIndexFile(file, indexId)) { @@ -1131,7 +1130,8 @@ public class FileBasedIndex implements ApplicationComponent { try { updateSingleIndex(indexId, file, _fc); } - catch (ProcessCanceledException ignored) { + catch (ProcessCanceledException e) { + pce.set(e); } catch (StorageException e) { requestRebuild(indexId); @@ -1162,6 +1162,10 @@ public class FileBasedIndex implements ApplicationComponent { } } + if (!pce.isNull()) { + throw pce.get(); + } + if (psiFile != null) { psiFile.putUserData(PsiFileImpl.BUILDING_STUB, null); } @@ -1297,14 +1301,8 @@ public class FileBasedIndex implements ApplicationComponent { if (!isTooLarge(file)) { for (ID indexId : myIndices.keySet()) { if (needsFileContentLoading(indexId) && getInputFilter(indexId).acceptInput(file)) { - w.lock(); - try { - myFilesToUpdate.add(file); - break; // no need to iterate further, as the file is already marked - } - finally { - w.unlock(); - } + scheduleForUpdate(file); + break; // no need to iterate further, as the file is already marked } } } @@ -1315,6 +1313,16 @@ public class FileBasedIndex implements ApplicationComponent { IndexingStamp.flushCache(); } + public void scheduleForUpdate(VirtualFile file) { + w.lock(); + try { + myFilesToUpdate.add(file); + } + finally { + w.unlock(); + } + } + void invalidateIndices(final VirtualFile file, final boolean markForReindex) { if (isUnderConfigOrSystem(file)) { return; @@ -1368,13 +1376,7 @@ public class FileBasedIndex implements ApplicationComponent { if (indicesAffected && markForReindex) { iterateIndexableFiles(file, new Processor() { public boolean process(final VirtualFile file) { - w.lock(); - try { - myFilesToUpdate.add(file); - } - finally { - w.unlock(); - } + scheduleForUpdate(file); return true; } }); diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithFormatStringIntention/description.html b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithFormatStringIntention/description.html new file mode 100644 index 000000000000..e502d3b6b1a5 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithFormatStringIntention/description.html @@ -0,0 +1,7 @@ + + +This intention replaces a String concatenation with the equivalent +java format pattern, using java.lang.String.format() or java.io.PrintStream.printf() where applicable. + + + diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceOperatorAssignmentWithAssignmentIntention/description.html b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceOperatorAssignmentWithAssignmentIntention/description.html new file mode 100644 index 000000000000..1396641527e5 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceOperatorAssignmentWithAssignmentIntention/description.html @@ -0,0 +1,7 @@ + + +This intention replaces an operator assignment +expression with an equivalent plain assignment expression. + + + \ No newline at end of file diff --git a/plugins/groovy/Groovy.ipr b/plugins/groovy/Groovy.ipr deleted file mode 100644 index 5a807b3de73c..000000000000 --- a/plugins/groovy/Groovy.ipr +++ /dev/null @@ -1,607 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/groovy/build.xml b/plugins/groovy/build.xml deleted file mode 100644 index aabb7d2b2d54..000000000000 --- a/plugins/groovy/build.xml +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/groovy/groovy.iml b/plugins/groovy/groovy.iml deleted file mode 100644 index 35558279d71c..000000000000 --- a/plugins/groovy/groovy.iml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/groovy/groovy.properties.prototype b/plugins/groovy/groovy.properties.prototype deleted file mode 100644 index 161f3b9d8119..000000000000 --- a/plugins/groovy/groovy.properties.prototype +++ /dev/null @@ -1,15 +0,0 @@ -# Path to Groovy distribution -path.variable.groovy_sdk_path=D:/dev/Groovy-1.5.6 - -# Path to IDEA distribution, used in groovy module SDK -jdk.home.jetgroovy_idea_sdk=C:/Program Files/JetBrains/IntelliJ IDEA 9712 - -# Path to JDK 1.6 (or higher) installation -jdk.home.jetgroovy_compile_with_jdk=D:/dev/jdk1.6 - -# rt module needs to be run against any JDK the user will have in her Groovy project in IntelliJ IDEA. -# So it should compile against JDK 1.4. Ideally, this variable should point to such a JDK. -jdk.home.jetgroovy_runtime_jdk=C:/sdks/j2sdk1.4.2_08 - -# Whether to skip the tests or not -skip.tests=true \ No newline at end of file diff --git a/plugins/groovy/packagePlugin.xml b/plugins/groovy/packagePlugin.xml deleted file mode 100644 index b0781c53318b..000000000000 --- a/plugins/groovy/packagePlugin.xml +++ /dev/null @@ -1,461 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java index 70d64bfe844c..415ef440e132 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java @@ -22,6 +22,7 @@ import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.fileEditor.FileDocumentManager; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileManager; import com.intellij.psi.*; @@ -200,8 +201,8 @@ public class GroovyMoveClassTest extends LightCodeInsightFixtureTestCase { final byte[] bytes1 = contentsToByteArray(f1); final byte[] bytes2 = f2.contentsToByteArray(); - String s1 = new String(bytes1); - String s2 = new String(bytes2); + String s1 = StringUtil.convertLineSeparators(new String(bytes1)); + String s2 = StringUtil.convertLineSeparators(new String(bytes2)); try { assertEquals(s1, s2); diff --git a/plugins/java-i18n/src/com/intellij/codeInspection/duplicateStringLiteral/DuplicateStringLiteralInspection.java b/plugins/java-i18n/src/com/intellij/codeInspection/duplicateStringLiteral/DuplicateStringLiteralInspection.java index e15218697afe..1fe06c495b44 100644 --- a/plugins/java-i18n/src/com/intellij/codeInspection/duplicateStringLiteral/DuplicateStringLiteralInspection.java +++ b/plugins/java-i18n/src/com/intellij/codeInspection/duplicateStringLiteral/DuplicateStringLiteralInspection.java @@ -45,23 +45,7 @@ public class DuplicateStringLiteralInspection extends BaseLocalInspectionTool { private JPanel myPanel; private JCheckBox myIgnorePropertyKeyExpressions; @NonNls private static final String BR = "
"; - - public DuplicateStringLiteralInspection() { - myIgnorePropertyKeyExpressions.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent e) { - IGNORE_PROPERTY_KEYS = myIgnorePropertyKeyExpressions.isSelected(); - } - }); - myMinStringLengthField.getDocument().addDocumentListener(new DocumentAdapter() { - protected void textChanged(final DocumentEvent e) { - try { - MIN_STRING_LENGTH = Integer.parseInt(myMinStringLengthField.getText()); - } - catch (NumberFormatException e1) { - } - } - }); - } + private boolean UIInitialized = false; @NotNull public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, final boolean isOnTheFly) { @@ -277,6 +261,23 @@ public class DuplicateStringLiteralInspection extends BaseLocalInspectionTool { } public JComponent createOptionsPanel() { + if (!UIInitialized) { + UIInitialized = true; + myIgnorePropertyKeyExpressions.addActionListener(new ActionListener() { + public void actionPerformed(final ActionEvent e) { + IGNORE_PROPERTY_KEYS = myIgnorePropertyKeyExpressions.isSelected(); + } + }); + myMinStringLengthField.getDocument().addDocumentListener(new DocumentAdapter() { + protected void textChanged(final DocumentEvent e) { + try { + MIN_STRING_LENGTH = Integer.parseInt(myMinStringLengthField.getText()); + } + catch (NumberFormatException e1) { + } + } + }); + } myIgnorePropertyKeyExpressions.setSelected(IGNORE_PROPERTY_KEYS); myMinStringLengthField.setText(Integer.toString(MIN_STRING_LENGTH)); return myPanel;