diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java b/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java index c43bbd4bc3fb..aebb7357ad7e 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java @@ -112,6 +112,7 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent { public TIntObjectHashMap> createValue(Integer key) { TIntObjectHashMap> map = null; try { + ensureOutputStorageInitialized(); map = myOutputRootsStorage.get(key); } catch (IOException e) { @@ -385,6 +386,14 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent { myOutputsToDelete.clear(); FileUtil.delete(file); } + + ensureOutputStorageInitialized(); + } + + private void ensureOutputStorageInitialized() { + if (myOutputRootsStorage != null) { + return; + } final File rootsFile = new File(CompilerPaths.getCompilerSystemDirectory(), OUTPUT_ROOTS_FILENAME); try { initOutputRootsFile(rootsFile); diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/javac/JavacCompiler.java b/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/javac/JavacCompiler.java index 63d7f2baa30c..774035bf7b29 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/javac/JavacCompiler.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/javac/JavacCompiler.java @@ -307,7 +307,12 @@ public class JavacCompiler extends ExternalCompiler { StringTokenizer optionsTokenizer = new StringTokenizer(options, " ", false); while (optionsTokenizer.hasMoreTokens()) { final String token = optionsTokenizer.nextToken(); - additionalOptions.add("-A"+token); + if (token.startsWith("-A")) { + additionalOptions.add(token.substring("-A".length())); + } + else { + additionalOptions.add("-A" + token); + } } } } diff --git a/java/compiler/impl/src/com/intellij/compiler/options/AnnotationProcessorsConfigurable.java b/java/compiler/impl/src/com/intellij/compiler/options/AnnotationProcessorsConfigurable.java index 9d4d0cb91c8b..314e1a1dc6be 100644 --- a/java/compiler/impl/src/com/intellij/compiler/options/AnnotationProcessorsConfigurable.java +++ b/java/compiler/impl/src/com/intellij/compiler/options/AnnotationProcessorsConfigurable.java @@ -263,7 +263,7 @@ public class AnnotationProcessorsConfigurable implements Configurable{ public String getColumnName(int column) { switch (column) { case ProcessorTableRow.NAME_COLUMN: return "Processor FQ Name"; - case ProcessorTableRow.OPTIONS_COLUMN : return "Processor Run Options"; + case ProcessorTableRow.OPTIONS_COLUMN : return "Processor Run Options (space-separated \"key=value\" pairs)"; } return super.getColumnName(column); } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryTableEditor.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryTableEditor.java index 45f8960ccd97..2c5cb87bf993 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryTableEditor.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryTableEditor.java @@ -799,6 +799,8 @@ public class LibraryTableEditor implements Disposable, LibraryEditorListener { super(parent, true); setTitle(myLibraryTableProvider.getLibraryTablePresentation().getLibraryTableEditorTitle()); init(); + + Disposer.register(getDisposable(), LibraryTableEditor.this); } @SuppressWarnings({"RefusedBequest"}) @@ -838,11 +840,6 @@ public class LibraryTableEditor implements Disposable, LibraryEditorListener { } commitChanges(); super.doOKAction(); - ApplicationManager.getApplication().invokeLater(new Runnable(){ - public void run() { - Disposer.dispose(LibraryTableEditor.this); - } - }); } protected JComponent createNorthPanel() { diff --git a/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionIntention.java b/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionIntention.java index 2c66fe95830a..987b8b6bf7fb 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionIntention.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionIntention.java @@ -24,7 +24,6 @@ import com.intellij.codeInsight.daemon.HighlightDisplayKey; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.codeInspection.InspectionProfileEntry; import com.intellij.codeInspection.InspectionsBundle; -import com.intellij.codeInspection.LocalInspectionTool; import com.intellij.codeInspection.ex.*; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.module.Module; @@ -45,7 +44,7 @@ public class RunInspectionIntention implements IntentionAction { private final String myShortName; private final String myDisplayName; - public RunInspectionIntention(final LocalInspectionTool tool) { + public RunInspectionIntention(final InspectionProfileEntry tool) { myShortName = tool.getShortName(); myDisplayName = tool.getDisplayName(); } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/InspectionsOptionsToolbarAction.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/InspectionsOptionsToolbarAction.java index cc0bf00b70ed..3dd346628ffa 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/InspectionsOptionsToolbarAction.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/InspectionsOptionsToolbarAction.java @@ -100,7 +100,7 @@ public class InspectionsOptionsToolbarAction extends AnAction { result.add(new DisableInspectionAction(key)); - final RunInspectionIntention runInspectionIntention = new RunInspectionIntention(key); + final RunInspectionIntention runInspectionIntention = new RunInspectionIntention(tool); result.add(new AnAction(runInspectionIntention.getText()) { public void actionPerformed(final AnActionEvent e) { final RefEntity[] selectedElements = tree.getSelectedElements(); diff --git a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.java b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.java index 4ab79a4c9cc3..b5791d5a3d3b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.java +++ b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.java @@ -452,7 +452,8 @@ public final class UpdateChecker { InputStream in = null; OutputStream out = null; - String patchFileName = "jetbrains.patch.jar." + productCode; + String platform = System.getProperty("idea.platform.prefix", "idea"); + String patchFileName = "jetbrains.patch.jar." + platform; File patchFile = new File(FileUtil.getTempDirectory(), patchFileName); try { diff --git a/platform/util/src/com/intellij/util/io/PersistentHashMapValueStorage.java b/platform/util/src/com/intellij/util/io/PersistentHashMapValueStorage.java index 8f3acc104222..625c1dcbbd48 100644 --- a/platform/util/src/com/intellij/util/io/PersistentHashMapValueStorage.java +++ b/platform/util/src/com/intellij/util/io/PersistentHashMapValueStorage.java @@ -19,14 +19,11 @@ */ package com.intellij.util.io; -import com.intellij.openapi.util.SystemInfo; -import com.intellij.openapi.util.io.FileUtil; import com.intellij.util.containers.SLRUCache; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.*; -import java.util.Locale; import java.util.concurrent.atomic.AtomicInteger; public class PersistentHashMapValueStorage { @@ -60,8 +57,7 @@ public class PersistentHashMapValueStorage { }; public PersistentHashMapValueStorage(String path) throws IOException { - myPath = SystemInfo.isFileSystemCaseSensitive? FileUtil.toSystemDependentName(path) : FileUtil.toSystemDependentName(path).toLowerCase(Locale.US); - + myPath = path; myFile = new File(path); mySize = myFile.length(); diff --git a/plugins/eclipse/src/org/jetbrains/idea/eclipse/conversion/EclipseClasspathWriter.java b/plugins/eclipse/src/org/jetbrains/idea/eclipse/conversion/EclipseClasspathWriter.java index 8d7ed74b6543..012a3915606a 100644 --- a/plugins/eclipse/src/org/jetbrains/idea/eclipse/conversion/EclipseClasspathWriter.java +++ b/plugins/eclipse/src/org/jetbrains/idea/eclipse/conversion/EclipseClasspathWriter.java @@ -69,7 +69,10 @@ public class EclipseClasspathWriter { outputPath = getRelativePath(output.getUrl()); } else if (output == null) { - outputPath = getRelativePath(myModel.getModuleExtension(CompilerModuleExtension.class).getCompilerOutputUrl()); + final String url = myModel.getModuleExtension(CompilerModuleExtension.class).getCompilerOutputUrl(); + if (url != null) { + outputPath = getRelativePath(url); + } } } final Element orderEntry = addOrderEntry(EclipseXml.OUTPUT_KIND, outputPath, classpathElement, oldRoot); diff --git a/plugins/eclipse/testData/iml/allProps/expected/expected.iml b/plugins/eclipse/testData/iml/allProps/expected/expected.iml index ffde935b8e84..65739ef6be31 100644 --- a/plugins/eclipse/testData/iml/allProps/expected/expected.iml +++ b/plugins/eclipse/testData/iml/allProps/expected/expected.iml @@ -101,7 +101,7 @@ - + diff --git a/xml/impl/src/com/intellij/xml/util/AnchorPathReferenceProvider.java b/xml/impl/src/com/intellij/xml/util/AnchorPathReferenceProvider.java index ec2847a7d610..212c3d47a52e 100644 --- a/xml/impl/src/com/intellij/xml/util/AnchorPathReferenceProvider.java +++ b/xml/impl/src/com/intellij/xml/util/AnchorPathReferenceProvider.java @@ -55,7 +55,13 @@ public class AnchorPathReferenceProvider implements PathReferenceProvider { } } final int pos = elementText.indexOf('?', anchorOffset); - final String anchor = elementText.substring(anchorOffset + 1, pos == -1 ? range.getEndOffset() : pos); + final String anchor; + try { + anchor = elementText.substring(anchorOffset + 1, pos == -1 ? range.getEndOffset() : pos); + } + catch (StringIndexOutOfBoundsException e) { + throw new RuntimeException(elementText, e); + } final AnchorReference anchorReference = new AnchorReference(anchor, fileReference, psiElement, anchorOffset + 1, soft); references.add(anchorReference); return false;