From 94ce4c900dea361fa21b69541824e2c7bbd30295 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 19 Nov 2010 16:20:26 +0300 Subject: [PATCH 1/5] NPE --- .../codeInspection/ui/InspectionToolsConfigurable.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/InspectionToolsConfigurable.java b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/InspectionToolsConfigurable.java index d9c66679e357..0b1b2ce26043 100644 --- a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/InspectionToolsConfigurable.java +++ b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/InspectionToolsConfigurable.java @@ -368,7 +368,9 @@ public abstract class InspectionToolsConfigurable extends BaseConfigurable imple panel.disposeUI(); } myPanels.clear(); - Disposer.dispose(mySelectionAlarm); + if (mySelectionAlarm != null) { + Disposer.dispose(mySelectionAlarm); + } } public void selectProfile(String name) { From b87da9a6107b1d0607e824cafafc10419c015e75 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 19 Nov 2010 19:33:11 +0300 Subject: [PATCH 2/5] compact descriptive name (IDEA-51805) --- .../src/com/intellij/lang/java/JavaFindUsagesProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/lang/java/JavaFindUsagesProvider.java b/java/java-impl/src/com/intellij/lang/java/JavaFindUsagesProvider.java index 378476e0b9da..d52838f024b0 100644 --- a/java/java-impl/src/com/intellij/lang/java/JavaFindUsagesProvider.java +++ b/java/java-impl/src/com/intellij/lang/java/JavaFindUsagesProvider.java @@ -158,7 +158,7 @@ public class JavaFindUsagesProvider implements FindUsagesProvider { PsiMethod psiMethod = (PsiMethod)element; String formatted = PsiFormatUtil.formatMethod(psiMethod, PsiSubstitutor.EMPTY, PsiFormatUtil.SHOW_NAME | PsiFormatUtil.SHOW_PARAMETERS, - PsiFormatUtil.SHOW_TYPE); + PsiFormatUtil.SHOW_TYPE|PsiFormatUtil.SHOW_RAW_NON_TOP_TYPE); PsiClass psiClass = psiMethod.getContainingClass(); if (psiClass != null) { return getContainingClassDescription(psiClass, formatted); From 8786c7aab3d22ab02ad1a490927e70554fa31ab2 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 19 Nov 2010 19:49:20 +0300 Subject: [PATCH 3/5] process IndexNotReady gracefully (IDEA-54373) --- .../ex/GlobalInspectionContextImpl.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java index b85ca9b32fbd..44c60489aafa 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java @@ -36,6 +36,8 @@ import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.progress.Task; import com.intellij.openapi.progress.impl.ProgressManagerImpl; import com.intellij.openapi.progress.util.ProgressWrapper; +import com.intellij.openapi.project.DumbService; +import com.intellij.openapi.project.IndexNotReadyException; import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ProjectUtil; import com.intellij.openapi.ui.Messages; @@ -459,6 +461,11 @@ public class GlobalInspectionContextImpl implements GlobalInspectionContext { cleanup((InspectionManagerEx)manager); throw e; } + catch (IndexNotReadyException e) { + cleanup((InspectionManagerEx)manager); + DumbService.getInstance(myProject).showDumbModeNotification("Usage search is not available until indices are ready"); + throw new ProcessCanceledException(); + } catch (Exception e) { LOG.error(e); } @@ -489,6 +496,9 @@ public class GlobalInspectionContextImpl implements GlobalInspectionContext { catch (ProcessCanceledException e) { throw e; } + catch (IndexNotReadyException e) { + throw e; + } catch (Exception e) { LOG.error(e); } @@ -501,6 +511,9 @@ public class GlobalInspectionContextImpl implements GlobalInspectionContext { catch (ProcessCanceledException e) { throw e; } + catch (IndexNotReadyException e) { + throw e; + } catch (Exception e) { LOG.error(e); } @@ -534,6 +547,9 @@ public class GlobalInspectionContextImpl implements GlobalInspectionContext { catch (ProcessCanceledException e) { throw e; } + catch (IndexNotReadyException e) { + throw e; + } catch (Exception e) { LOG.error(e); } From 1265ac998c0c8ba4d40910d0e76ad76115d3c8db Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Fri, 19 Nov 2010 19:56:31 +0300 Subject: [PATCH 4/5] finally block --- .../util/src/com/intellij/util/io/PagedFileStorage.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/util/src/com/intellij/util/io/PagedFileStorage.java b/platform/util/src/com/intellij/util/io/PagedFileStorage.java index d2d66a0421bb..5a985cceabf7 100644 --- a/platform/util/src/com/intellij/util/io/PagedFileStorage.java +++ b/platform/util/src/com/intellij/util/io/PagedFileStorage.java @@ -215,8 +215,12 @@ public class PagedFileStorage implements Forceable { } public void close() { - force(); - unmapAll(); + try { + force(); + } + finally { + unmapAll(); + } } private void unmapAll() { From 30cc6ef74d4e579ffb22a15cb9e39924a4bf0a83 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 19 Nov 2010 20:20:49 +0300 Subject: [PATCH 5/5] mnemonic changed --- .../src/messages/RefactoringBundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-resources-en/src/messages/RefactoringBundle.properties b/platform/platform-resources-en/src/messages/RefactoringBundle.properties index a6ff7b45c3da..70047687e105 100644 --- a/platform/platform-resources-en/src/messages/RefactoringBundle.properties +++ b/platform/platform-resources-en/src/messages/RefactoringBundle.properties @@ -559,7 +559,7 @@ directory.chooser.hide.non.existent.checkBox.text=&Hide non-existent 0.will.be.inaccessible.from.1={0} will be inaccessible from {1} move.classes.command=Moving {0} to package {1} safe.delete.command=Deleting {0} -select.all.button=&Select all +select.all.button=Select &all unselect.all.button=&Unselect all automatic.renamer.enity.name.column={0} name automatic.renamer.rename.to.column=Rename To