From 9f6ada3f3f4b8a9141def89481bd6f5abcd3d81d Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Fri, 14 Feb 2014 12:18:44 +0400 Subject: [PATCH] IDEA-119615 Find in path mixes "occurrences" and "usages" terminology --- .../safeDelete/OverridingMethodsDialog.java | 12 ++++++---- .../src/com/intellij/slicer/SlicePanel.java | 5 ++-- .../UsageContextDataflowFromPanel.java | 9 ++++---- .../UsageContextDataflowToPanel.java | 17 +++++++------- .../com/intellij/find/FindManagerTest.java | 8 +++---- .../intellij/usageView/UsageViewBundle.java | 4 ++-- .../intellij/find/impl/FindInProjectUtil.java | 11 +++++---- .../src/com/intellij/ide/todo/TodoPanel.java | 6 +++-- .../ide/util/gotoByName/ChooseByNameBase.java | 4 ++-- .../rename/AutomaticRenamingDialog.java | 5 ++-- .../impl/UsageContextCallHierarchyPanel.java | 15 +++++------- .../src/messages/DomBundle.properties | 2 +- .../src/messages/FindBundle.properties | 4 +++- .../src/messages/UsageView.properties | 10 ++++---- .../usages/FindUsagesProcessPresentation.java | 10 +++++++- .../com/intellij/usages/UsageLimitUtil.java | 19 ++++++++++----- .../usages/impl/PreviewUsageAction.java | 5 ++-- .../usages/impl/UsageContextPanelBase.java | 7 ++++-- .../usages/impl/UsagePreviewPanel.java | 11 +++++---- .../intellij/usages/impl/UsageViewImpl.java | 2 +- .../usages/impl/UsageViewManagerImpl.java | 23 +++++++++---------- .../intellij/usages/impl/rules/UsageType.java | 16 +++++++++++-- .../impl/rules/UsageTypeGroupingRule.java | 13 +++++------ .../IconsReferencesContributor.java | 3 ++- .../src/messages/UIDesignerBundle.properties | 2 +- .../plugins/xpathView/XPathEvalAction.java | 2 +- .../xpathView/search/FindByXPathAction.java | 2 +- 27 files changed, 133 insertions(+), 94 deletions(-) diff --git a/java/java-impl/src/com/intellij/refactoring/safeDelete/OverridingMethodsDialog.java b/java/java-impl/src/com/intellij/refactoring/safeDelete/OverridingMethodsDialog.java index 8bdcddbc44ad..427e669d06d2 100644 --- a/java/java-impl/src/com/intellij/refactoring/safeDelete/OverridingMethodsDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/safeDelete/OverridingMethodsDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import com.intellij.openapi.ui.Splitter; import com.intellij.openapi.util.Disposer; import com.intellij.psi.PsiSubstitutor; import com.intellij.psi.util.PsiFormatUtil; +import com.intellij.psi.util.PsiFormatUtilBase; import com.intellij.refactoring.HelpID; import com.intellij.refactoring.RefactoringBundle; import com.intellij.refactoring.safeDelete.usageInfo.SafeDeleteOverridingMethodUsageInfo; @@ -30,6 +31,7 @@ import com.intellij.ui.BooleanTableCellRenderer; import com.intellij.ui.ScrollPaneFactory; import com.intellij.ui.TableUtil; import com.intellij.usageView.UsageInfo; +import com.intellij.usages.UsageViewPresentation; import com.intellij.usages.impl.UsagePreviewPanel; import com.intellij.util.ui.Table; import org.jetbrains.annotations.NonNls; @@ -72,12 +74,12 @@ class OverridingMethodsDialog extends DialogWrapper { for (int i = 0; i < myMethodText.length; i++) { myMethodText[i] = PsiFormatUtil.formatMethod( ((SafeDeleteOverridingMethodUsageInfo) myOverridingMethods.get(i)).getOverridingMethod(), - PsiSubstitutor.EMPTY, PsiFormatUtil.SHOW_CONTAINING_CLASS - | PsiFormatUtil.SHOW_NAME | PsiFormatUtil.SHOW_PARAMETERS | PsiFormatUtil.SHOW_TYPE, - PsiFormatUtil.SHOW_TYPE + PsiSubstitutor.EMPTY, PsiFormatUtilBase.SHOW_CONTAINING_CLASS + | PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_PARAMETERS | PsiFormatUtilBase.SHOW_TYPE, + PsiFormatUtilBase.SHOW_TYPE ); } - myUsagePreviewPanel = new UsagePreviewPanel(project); + myUsagePreviewPanel = new UsagePreviewPanel(project, new UsageViewPresentation()); setTitle(RefactoringBundle.message("unused.overriding.methods.title")); init(); } diff --git a/java/java-impl/src/com/intellij/slicer/SlicePanel.java b/java/java-impl/src/com/intellij/slicer/SlicePanel.java index 09f90e409d24..4c7866edd361 100644 --- a/java/java-impl/src/com/intellij/slicer/SlicePanel.java +++ b/java/java-impl/src/com/intellij/slicer/SlicePanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,6 +37,7 @@ import com.intellij.ui.treeStructure.Tree; import com.intellij.usageView.UsageInfo; import com.intellij.usageView.UsageViewBundle; import com.intellij.usages.Usage; +import com.intellij.usages.UsageViewPresentation; import com.intellij.usages.UsageViewSettings; import com.intellij.usages.impl.UsagePreviewPanel; import com.intellij.util.EditSourceOnDoubleClickHandler; @@ -156,7 +157,7 @@ public abstract class SlicePanel extends JPanel implements TypeSafeDataProvider, boolean vertical = myToolWindow.getAnchor() == ToolWindowAnchor.LEFT || myToolWindow.getAnchor() == ToolWindowAnchor.RIGHT; Splitter splitter = new Splitter(vertical, UsageViewSettings.getInstance().PREVIEW_USAGES_SPLITTER_PROPORTIONS); splitter.setFirstComponent(pane); - myUsagePreviewPanel = new UsagePreviewPanel(myProject); + myUsagePreviewPanel = new UsagePreviewPanel(myProject, new UsageViewPresentation()); myUsagePreviewPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT)); Disposer.register(this, myUsagePreviewPanel); diff --git a/java/java-impl/src/com/intellij/usageView/UsageContextDataflowFromPanel.java b/java/java-impl/src/com/intellij/usageView/UsageContextDataflowFromPanel.java index 1896243bc6e8..bce3bf4e9f1c 100644 --- a/java/java-impl/src/com/intellij/usageView/UsageContextDataflowFromPanel.java +++ b/java/java-impl/src/com/intellij/usageView/UsageContextDataflowFromPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ package com.intellij.usageView; import com.intellij.openapi.project.Project; import com.intellij.usages.UsageContextPanel; import com.intellij.usages.UsageView; +import com.intellij.usages.UsageViewPresentation; import com.intellij.usages.impl.UsageViewImpl; import org.jetbrains.annotations.NotNull; @@ -27,7 +28,7 @@ public class UsageContextDataflowFromPanel extends UsageContextDataflowToPanel { @NotNull @Override public UsageContextPanel create(@NotNull UsageView usageView) { - return new UsageContextDataflowFromPanel(((UsageViewImpl)usageView).getProject()); + return new UsageContextDataflowFromPanel(((UsageViewImpl)usageView).getProject(), usageView.getPresentation()); } @NotNull @@ -37,8 +38,8 @@ public class UsageContextDataflowFromPanel extends UsageContextDataflowToPanel { } } - public UsageContextDataflowFromPanel(@NotNull Project project) { - super(project); + public UsageContextDataflowFromPanel(@NotNull Project project, @NotNull UsageViewPresentation presentation) { + super(project, presentation); } diff --git a/java/java-impl/src/com/intellij/usageView/UsageContextDataflowToPanel.java b/java/java-impl/src/com/intellij/usageView/UsageContextDataflowToPanel.java index de31282b0cca..38804dda3051 100644 --- a/java/java-impl/src/com/intellij/usageView/UsageContextDataflowToPanel.java +++ b/java/java-impl/src/com/intellij/usageView/UsageContextDataflowToPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,10 +28,7 @@ import com.intellij.psi.PsiFile; import com.intellij.psi.PsiJavaFile; import com.intellij.psi.PsiVariable; import com.intellij.slicer.*; -import com.intellij.usages.PsiElementUsageTarget; -import com.intellij.usages.UsageContextPanel; -import com.intellij.usages.UsageTarget; -import com.intellij.usages.UsageView; +import com.intellij.usages.*; import com.intellij.usages.impl.UsageContextPanelBase; import com.intellij.usages.impl.UsageViewImpl; import org.jetbrains.annotations.NotNull; @@ -42,13 +39,14 @@ import java.awt.*; import java.util.List; public class UsageContextDataflowToPanel extends UsageContextPanelBase { + @NotNull private final UsageViewPresentation myPresentation; private JComponent myPanel; public static class Provider implements UsageContextPanel.Provider { @NotNull @Override public UsageContextPanel create(@NotNull UsageView usageView) { - return new UsageContextDataflowToPanel(((UsageViewImpl)usageView).getProject()); + return new UsageContextDataflowToPanel(((UsageViewImpl)usageView).getProject(), usageView.getPresentation()); } @Override @@ -70,8 +68,9 @@ public class UsageContextDataflowToPanel extends UsageContextPanelBase { } } - public UsageContextDataflowToPanel(@NotNull Project project) { - super(project); + public UsageContextDataflowToPanel(@NotNull Project project, @NotNull UsageViewPresentation presentation) { + super(project, presentation); + myPresentation = presentation; } @Override @@ -84,7 +83,7 @@ public class UsageContextDataflowToPanel extends UsageContextPanelBase { public void updateLayoutLater(@Nullable final List infos) { if (infos == null) { removeAll(); - JComponent titleComp = new JLabel(UsageViewBundle.message("select.the.usage.to.preview"), SwingConstants.CENTER); + JComponent titleComp = new JLabel(UsageViewBundle.message("select.the.usage.to.preview", myPresentation.getUsagesWord()), SwingConstants.CENTER); add(titleComp, BorderLayout.CENTER); revalidate(); } diff --git a/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java b/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java index 166652f4b081..1b116032002a 100644 --- a/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java +++ b/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import com.intellij.find.impl.FindInProjectUtil; import com.intellij.find.replaceInProject.ReplaceInProjectManager; import com.intellij.lang.properties.IProperty; import com.intellij.lang.properties.psi.PropertiesFile; -import com.intellij.openapi.Disposable; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ex.PathManagerEx; import com.intellij.openapi.command.CommandProcessor; @@ -49,6 +48,7 @@ import com.intellij.util.ArrayUtil; import com.intellij.util.CommonProcessors; import com.intellij.util.ThrowableRunnable; import com.intellij.util.WaitFor; +import org.jetbrains.annotations.NotNull; import java.io.File; import java.util.ArrayList; @@ -185,11 +185,11 @@ public class FindManagerTest extends DaemonAnalyzerTestCase { assertEquals(expectedResults, usages.size()); } - private List findUsages(final FindModel findModel) { + private List findUsages(@NotNull FindModel findModel) { PsiDirectory psiDirectory = FindInProjectUtil.getPsiDirectory(findModel, myProject); List result = new ArrayList(); final CommonProcessors.CollectProcessor collector = new CommonProcessors.CollectProcessor(result); - FindInProjectUtil.findUsages(findModel, psiDirectory, myProject, true, collector, new FindUsagesProcessPresentation()); + FindInProjectUtil.findUsages(findModel, psiDirectory, myProject, true, collector, new FindUsagesProcessPresentation(FindInProjectUtil.setupViewPresentation(true, findModel))); return result; } diff --git a/platform/lang-api/src/com/intellij/usageView/UsageViewBundle.java b/platform/lang-api/src/com/intellij/usageView/UsageViewBundle.java index 866d6319a9df..9e4d1f1f4669 100644 --- a/platform/lang-api/src/com/intellij/usageView/UsageViewBundle.java +++ b/platform/lang-api/src/com/intellij/usageView/UsageViewBundle.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,7 @@ public class UsageViewBundle { return " (" + message("occurence.info.reference", usagesCount, filesCount) + ")"; } - private static ResourceBundle getBundle() { + public static ResourceBundle getBundle() { ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle); if (bundle == null) { bundle = ResourceBundle.getBundle(BUNDLE); diff --git a/platform/lang-impl/src/com/intellij/find/impl/FindInProjectUtil.java b/platform/lang-impl/src/com/intellij/find/impl/FindInProjectUtil.java index 3aad2a0f4bac..48fe5db1ecf7 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/FindInProjectUtil.java +++ b/platform/lang-impl/src/com/intellij/find/impl/FindInProjectUtil.java @@ -205,7 +205,7 @@ public class FindInProjectUtil { return Pattern.compile(pattern, Pattern.CASE_INSENSITIVE); } - public static void findUsages(@NotNull final FindModel findModel, + public static void findUsages(@NotNull FindModel findModel, final PsiDirectory psiDirectory, @NotNull final Project project, boolean showWarnings, @@ -253,9 +253,10 @@ public class FindInProjectUtil { totalFilesSize += fileLength; if (totalFilesSize > FILES_SIZE_LIMIT && !warningShown[0]) { warningShown[0] = true; - String message = FindBundle.message("find.excessive.total.size.prompt", UsageViewManagerImpl.presentableSize(totalFilesSize), + String message = FindBundle.message("find.excessive.total.size.prompt", + UsageViewManagerImpl.presentableSize(totalFilesSize), ApplicationNamesInfo.getInstance().getProductName()); - UsageLimitUtil.showAndCancelIfAborted(project, message); + UsageLimitUtil.showAndCancelIfAborted(project, message, processPresentation.getUsageViewPresentation()); } } } @@ -656,6 +657,8 @@ public class FindInProjectUtil { presentation.setTabText(FindBundle.message("find.usage.view.tab.text", stringToFind)); presentation.setToolwindowTitle(FindBundle.message("find.usage.view.toolwindow.title", stringToFind, scope)); presentation.setUsagesString(FindBundle.message("find.usage.view.usages.text", stringToFind)); + presentation.setUsagesWord(FindBundle.message("occurrence")); + presentation.setCodeUsagesString(FindBundle.message("found.occurrences")); } presentation.setOpenInNewTab(toOpenInNewTab); presentation.setCodeUsages(false); @@ -667,7 +670,7 @@ public class FindInProjectUtil { public static FindUsagesProcessPresentation setupProcessPresentation(final Project project, final boolean showPanelIfOnlyOneUsage, @NotNull final UsageViewPresentation presentation) { - FindUsagesProcessPresentation processPresentation = new FindUsagesProcessPresentation(); + FindUsagesProcessPresentation processPresentation = new FindUsagesProcessPresentation(presentation); processPresentation.setShowNotFoundMessage(true); processPresentation.setShowPanelIfOnlyOneUsage(showPanelIfOnlyOneUsage); processPresentation.setProgressIndicatorFactory( diff --git a/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java b/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java index d3d607e287f6..e29c622a4d57 100644 --- a/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ package com.intellij.ide.todo; +import com.intellij.find.FindModel; +import com.intellij.find.impl.FindInProjectUtil; import com.intellij.icons.AllIcons; import com.intellij.ide.*; import com.intellij.ide.actions.ContextHelpAction; @@ -151,7 +153,7 @@ abstract class TodoPanel extends SimpleToolWindowPanel implements OccurenceNavig ); - myUsagePreviewPanel = new UsagePreviewPanel(myProject); + myUsagePreviewPanel = new UsagePreviewPanel(myProject, FindInProjectUtil.setupViewPresentation(false, new FindModel())); myUsagePreviewPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT)); Disposer.register(this, myUsagePreviewPanel); myUsagePreviewPanel.setVisible(mySettings.isShowPreview()); diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java index 254a545deaca..d37328039e1f 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1698,7 +1698,7 @@ public abstract class ChooseByNameBase { protected boolean isOverflow(@NotNull Set elementsArray) { if (elementsArray.size() > UsageLimitUtil.USAGES_LIMIT - myMaximumListSizeLimit && !userAskedToAbort.getAndSet(true)) { final UsageLimitUtil.Result ret = UsageLimitUtil.showTooManyUsagesWarning(myProject, UsageViewBundle - .message("find.excessive.usage.count.prompt", elementsArray.size() + myMaximumListSizeLimit)); + .message("find.excessive.usage.count.prompt", elementsArray.size() + myMaximumListSizeLimit, StringUtil.pluralize(presentation.getUsagesWord())), presentation); if (ret == UsageLimitUtil.Result.ABORT) { overFlow[0] = true; return true; diff --git a/platform/lang-impl/src/com/intellij/refactoring/rename/AutomaticRenamingDialog.java b/platform/lang-impl/src/com/intellij/refactoring/rename/AutomaticRenamingDialog.java index 844fe60ac29d..ef9150a52fd0 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/rename/AutomaticRenamingDialog.java +++ b/platform/lang-impl/src/com/intellij/refactoring/rename/AutomaticRenamingDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,6 +39,7 @@ import com.intellij.ui.PopupHandler; import com.intellij.ui.TableUtil; import com.intellij.ui.table.JBTable; import com.intellij.usageView.UsageInfo; +import com.intellij.usages.UsageViewPresentation; import com.intellij.usages.impl.UsagePreviewPanel; import org.jetbrains.annotations.Nullable; @@ -83,7 +84,7 @@ public class AutomaticRenamingDialog extends DialogWrapper { super(project, true); myProject = project; myRenamer = renamer; - myUsagePreviewPanel = new UsagePreviewPanel(myProject); + myUsagePreviewPanel = new UsagePreviewPanel(myProject, new UsageViewPresentation()); myUsageFileLabel = new JLabel(); populateData(); myTableModel = new MyTableModel(renamer.allowChangeSuggestedName()); diff --git a/platform/lang-impl/src/com/intellij/usageView/impl/UsageContextCallHierarchyPanel.java b/platform/lang-impl/src/com/intellij/usageView/impl/UsageContextCallHierarchyPanel.java index 21e87427e6b3..ed41617db47c 100644 --- a/platform/lang-impl/src/com/intellij/usageView/impl/UsageContextCallHierarchyPanel.java +++ b/platform/lang-impl/src/com/intellij/usageView/impl/UsageContextCallHierarchyPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,10 +28,7 @@ import com.intellij.openapi.util.Disposer; import com.intellij.psi.PsiElement; import com.intellij.usageView.UsageInfo; import com.intellij.usageView.UsageViewBundle; -import com.intellij.usages.PsiElementUsageTarget; -import com.intellij.usages.UsageContextPanel; -import com.intellij.usages.UsageTarget; -import com.intellij.usages.UsageView; +import com.intellij.usages.*; import com.intellij.usages.impl.UsageContextPanelBase; import com.intellij.usages.impl.UsageViewImpl; import org.jetbrains.annotations.NotNull; @@ -48,7 +45,7 @@ public class UsageContextCallHierarchyPanel extends UsageContextPanelBase { @NotNull @Override public UsageContextPanel create(@NotNull UsageView usageView) { - return new UsageContextCallHierarchyPanel(((UsageViewImpl)usageView).getProject()); + return new UsageContextCallHierarchyPanel(((UsageViewImpl)usageView).getProject(), usageView.getPresentation()); } @Override @@ -75,8 +72,8 @@ public class UsageContextCallHierarchyPanel extends UsageContextPanelBase { } } - public UsageContextCallHierarchyPanel(@NotNull Project project) { - super(project); + public UsageContextCallHierarchyPanel(@NotNull Project project, @NotNull UsageViewPresentation presentation) { + super(project, presentation); } @Override @@ -101,7 +98,7 @@ public class UsageContextCallHierarchyPanel extends UsageContextPanelBase { removeAll(); if (element == null) { - JComponent titleComp = new JLabel(UsageViewBundle.message("select.the.usage.to.preview"), SwingConstants.CENTER); + JComponent titleComp = new JLabel(UsageViewBundle.message("select.the.usage.to.preview", myPresentation.getUsagesWord()), SwingConstants.CENTER); add(titleComp, BorderLayout.CENTER); revalidate(); } diff --git a/platform/platform-resources-en/src/messages/DomBundle.properties b/platform/platform-resources-en/src/messages/DomBundle.properties index d262608747f4..149323413ab0 100644 --- a/platform/platform-resources-en/src/messages/DomBundle.properties +++ b/platform/platform-resources-en/src/messages/DomBundle.properties @@ -7,7 +7,7 @@ remove.element.fix.name=Remove <{0}> element remove.attribute.fix.name=Remove "{0}" attribute message.invalid.value.quotation=Bad quotation for ''{0}'' -dom.usage.type=Usage in XML descriptor +dom.usage.type={0} in XML descriptor create.new.element=Create new {0} ''{1}'' choose.file=Choose file diff --git a/platform/platform-resources-en/src/messages/FindBundle.properties b/platform/platform-resources-en/src/messages/FindBundle.properties index 0151999e5eb7..20ec7830472d 100644 --- a/platform/platform-resources-en/src/messages/FindBundle.properties +++ b/platform/platform-resources-en/src/messages/FindBundle.properties @@ -97,7 +97,7 @@ find.origin.from.cursor.radio=Fro&m cursor find.origin.entire.scope.radio=E&ntire scope find.searching.for.string.in.file.progress=Searching for ''{0}'' in {1}... find.searching.for.string.in.file.occurrences.progress={0,choice,0#No|1#{0}} {0,choice,0#occurrences|1#occurrence|2#occurrences} found so far -find.excessive.total.size.prompt=Usages in files of total size {0} found. {1} may become unresponsive or even fail with OutOfMemoryError if you continue. Continue? +find.excessive.total.size.prompt=Occurrences in files of total size {0} found. {1} may become unresponsive or even fail with OutOfMemoryError if you continue. Continue? find.progress.search.completed=Search completed find.scope.project.title=Project find.scope.module.title=Module ''{0}'' @@ -124,3 +124,5 @@ find.replace.occurrences.in.read.only.files.title=Read-only Files Found find.scope.custom.radio=Cu&stom: find.usages.ambiguous.title=Find Usages Of {0} 0.occurrences.replaced={0,choice,0#No|1#{0}} {0,choice,0#occurrences|1#occurrence|2#occurrences} replaced +found.occurrences=Found Occurrences +occurrence=occurrence \ No newline at end of file diff --git a/platform/platform-resources-en/src/messages/UsageView.properties b/platform/platform-resources-en/src/messages/UsageView.properties index 134c2577f6ca..ab294845a2cd 100644 --- a/platform/platform-resources-en/src/messages/UsageView.properties +++ b/platform/platform-resources-en/src/messages/UsageView.properties @@ -44,7 +44,7 @@ usage.type.catch.declaration=Catch clause parameter declaration usage.type.return=Method return type usage.type.string.constant=Usage in string constants usage.type.comment=Usage in comments -usage.type.unclassified=Unclassified usage +usage.type.unclassified=Unclassified {0} occurence.info.usage={0,choice, 0#Not Found|1#1 usage|2#{0,number} usages}{1,choice, 0#|1# in 1 file|2# in {1,number} files} occurence.info.occurence={0,choice, 0#Not Found|1#1 occurrence|2#{0,number} occurrences}{1,choice, 0#|1# in 1 file|2# in {1,number} files} occurence.info.reference={0,choice, 0#Not Found|1#1 reference|2#{0,number} references}{1,choice, 0#|1# in 1 file|2# in {1,number} files} @@ -60,8 +60,8 @@ usage.type.annotation=Annotation usage.type.type.parameter=Type parameter usage.type.read=Value read usage.type.write=Value write -preview.usages.action.text=Preview Usages -select.the.usage.to.preview=Select the usage to preview +preview.usages.action.text=Preview {0} +select.the.usage.to.preview=Select {0} to preview usages.were.filtered.out={0,number} {0,choice, 1#usage was|2#usages were} filtered out show.usages.only.usage=It''s the only usage in {0} all.usages.are.in.this.line=All {0} usages in {1} are in this line @@ -69,8 +69,8 @@ no.usages.found.in=No usages found in {0} sort.alphabetically.action.text=Sort Members Alphabetically button.text.continue=Continue button.text.abort=Abort -find.excessive.usages.title=Too Many Usages -find.excessive.usage.count.prompt={0} usages found so far. Are you sure you wish to continue? +find.excessive.usages.title=Too Many {0} +find.excessive.usage.count.prompt={0} {1} found so far. Are you sure you wish to continue? find.file.size.megabytes={0} megabytes large.files.were.ignored={0,choice, 0#No|1#1 too large file was ignored|2#{0,number} too large files were ignored} usage.excluded=excluded diff --git a/platform/usageView/src/com/intellij/usages/FindUsagesProcessPresentation.java b/platform/usageView/src/com/intellij/usages/FindUsagesProcessPresentation.java index 70bad8f859b0..d608303eec09 100644 --- a/platform/usageView/src/com/intellij/usages/FindUsagesProcessPresentation.java +++ b/platform/usageView/src/com/intellij/usages/FindUsagesProcessPresentation.java @@ -33,6 +33,7 @@ import java.util.List; public class FindUsagesProcessPresentation { @NonNls public static final String NAME_WITH_MNEMONIC_KEY = "NameWithMnemonic"; + private final UsageViewPresentation myUsageViewPresentation; private List myNotFoundActions; private boolean myShowPanelIfOnlyOneUsage; @@ -41,7 +42,8 @@ public class FindUsagesProcessPresentation { private Collection myLargeFiles; private boolean myShowFindOptionsPrompt = true; - public FindUsagesProcessPresentation() { + public FindUsagesProcessPresentation(@NotNull UsageViewPresentation presentation) { + myUsageViewPresentation = presentation; } public void addNotFoundAction(@NotNull Action action) { @@ -91,8 +93,14 @@ public class FindUsagesProcessPresentation { return myShowFindOptionsPrompt; } + @NotNull + public UsageViewPresentation getUsageViewPresentation() { + return myUsageViewPresentation; + } + public void setShowFindOptionsPrompt(boolean showFindOptionsPrompt) { myShowFindOptionsPrompt = showFindOptionsPrompt; } } + diff --git a/platform/usageView/src/com/intellij/usages/UsageLimitUtil.java b/platform/usageView/src/com/intellij/usages/UsageLimitUtil.java index 85bf70da46f1..61fd1d91abd7 100644 --- a/platform/usageView/src/com/intellij/usages/UsageLimitUtil.java +++ b/platform/usageView/src/com/intellij/usages/UsageLimitUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.Computable; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.GuiUtils; import com.intellij.usageView.UsageViewBundle; import org.jetbrains.annotations.NotNull; @@ -29,8 +30,10 @@ import org.jetbrains.annotations.NotNull; public class UsageLimitUtil { public static final int USAGES_LIMIT = 1000; - public static void showAndCancelIfAborted(final Project project, final String message) { - Result retCode = showTooManyUsagesWarning(project, message); + public static void showAndCancelIfAborted(@NotNull Project project, + @NotNull String message, + @NotNull UsageViewPresentation usageViewPresentation) { + Result retCode = showTooManyUsagesWarning(project, message, usageViewPresentation); if (retCode != Result.CONTINUE) { throw new ProcessCanceledException(); @@ -42,19 +45,23 @@ public class UsageLimitUtil { } @NotNull - public static Result showTooManyUsagesWarning(@NotNull final Project project, @NotNull final String message) { + public static Result showTooManyUsagesWarning(@NotNull final Project project, + @NotNull final String message, + @NotNull final UsageViewPresentation usageViewPresentation) { final String[] buttons = {UsageViewBundle.message("button.text.continue"), UsageViewBundle.message("button.text.abort")}; int result = runOrInvokeAndWait(new Computable() { @Override public Integer compute() { - return Messages.showOkCancelDialog(project, message, UsageViewBundle.message("find.excessive.usages.title"), buttons[0], buttons[1], + String title = UsageViewBundle.message("find.excessive.usages.title", StringUtil.capitalize(StringUtil.pluralize(usageViewPresentation.getUsagesWord()))); + return Messages.showOkCancelDialog(project, message, + title, buttons[0], buttons[1], Messages.getWarningIcon()); } }); return result == Messages.OK ? Result.CONTINUE : Result.ABORT; } - private static int runOrInvokeAndWait(final Computable f) { + private static int runOrInvokeAndWait(@NotNull final Computable f) { final int[] answer = new int[1]; try { GuiUtils.runOrInvokeAndWait(new Runnable() { diff --git a/platform/usageView/src/com/intellij/usages/impl/PreviewUsageAction.java b/platform/usageView/src/com/intellij/usages/impl/PreviewUsageAction.java index d06f93619f4f..107e1572578e 100644 --- a/platform/usageView/src/com/intellij/usages/impl/PreviewUsageAction.java +++ b/platform/usageView/src/com/intellij/usages/impl/PreviewUsageAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package com.intellij.usages.impl; import com.intellij.icons.AllIcons; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.usageView.UsageViewBundle; import com.intellij.usages.UsageView; import com.intellij.usages.UsageViewSettings; @@ -26,7 +27,7 @@ import org.jetbrains.annotations.NotNull; */ class PreviewUsageAction extends RuleAction { PreviewUsageAction(@NotNull UsageView usageView) { - super(usageView, UsageViewBundle.message("preview.usages.action.text"), AllIcons.Actions.PreviewDetails); + super(usageView, UsageViewBundle.message("preview.usages.action.text", StringUtil.capitalize(StringUtil.pluralize(usageView.getPresentation().getUsagesWord()))), AllIcons.Actions.PreviewDetails); } @Override diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageContextPanelBase.java b/platform/usageView/src/com/intellij/usages/impl/UsageContextPanelBase.java index e1cb6367a48c..d807c5b80e45 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageContextPanelBase.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageContextPanelBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import com.intellij.openapi.project.Project; import com.intellij.ui.IdeBorderFactory; import com.intellij.usageView.UsageInfo; import com.intellij.usages.UsageContextPanel; +import com.intellij.usages.UsageViewPresentation; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -33,10 +34,12 @@ import java.util.List; */ public abstract class UsageContextPanelBase extends JPanel implements UsageContextPanel { protected final Project myProject; + @NotNull protected final UsageViewPresentation myPresentation; protected volatile boolean isDisposed; - public UsageContextPanelBase(@NotNull Project project) { + public UsageContextPanelBase(@NotNull Project project, @NotNull UsageViewPresentation presentation) { myProject = project; + myPresentation = presentation; setLayout(new BorderLayout()); setBorder(IdeBorderFactory.createBorder()); } diff --git a/platform/usageView/src/com/intellij/usages/impl/UsagePreviewPanel.java b/platform/usageView/src/com/intellij/usages/impl/UsagePreviewPanel.java index a9f48312cb07..e2c023d360bc 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsagePreviewPanel.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsagePreviewPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,7 @@ import com.intellij.usageView.UsageInfo; import com.intellij.usageView.UsageViewBundle; import com.intellij.usages.UsageContextPanel; import com.intellij.usages.UsageView; +import com.intellij.usages.UsageViewPresentation; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -45,15 +46,15 @@ public class UsagePreviewPanel extends UsageContextPanelBase { private static final Logger LOG = Logger.getInstance("#com.intellij.usages.impl.UsagePreviewPanel"); private Editor myEditor; - public UsagePreviewPanel(@NotNull Project project) { - super(project); + public UsagePreviewPanel(@NotNull Project project, @NotNull UsageViewPresentation presentation) { + super(project, presentation); } public static class Provider implements UsageContextPanel.Provider { @NotNull @Override public UsageContextPanel create(@NotNull UsageView usageView) { - return new UsagePreviewPanel(((UsageViewImpl)usageView).getProject()); + return new UsagePreviewPanel(((UsageViewImpl)usageView).getProject(), usageView.getPresentation()); } @Override @@ -189,7 +190,7 @@ public class UsagePreviewPanel extends UsageContextPanelBase { if (infos == null) { releaseEditor(); removeAll(); - JComponent titleComp = new JLabel(UsageViewBundle.message("select.the.usage.to.preview"), SwingConstants.CENTER); + JComponent titleComp = new JLabel(UsageViewBundle.message("select.the.usage.to.preview", myPresentation.getUsagesWord()), SwingConstants.CENTER); add(titleComp, BorderLayout.CENTER); revalidate(); } diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java index c8b631d2b626..35463f0837d9 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java @@ -856,7 +856,7 @@ public class UsageViewImpl implements UsageView, UsageModelTracker.UsageModelTra if (usageCount > UsageLimitUtil.USAGES_LIMIT) { if (tooManyUsagesStatus.switchTooManyUsagesStatus()) { UsageViewManagerImpl - .showTooManyUsagesWarning(project, tooManyUsagesStatus, indicator, usageCountWithoutDefinition.get(), UsageViewImpl.this); + .showTooManyUsagesWarning(project, tooManyUsagesStatus, indicator, getPresentation(), usageCountWithoutDefinition.get(), UsageViewImpl.this); } } ApplicationManager.getApplication().runReadAction(new Runnable() { diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageViewManagerImpl.java b/platform/usageView/src/com/intellij/usages/impl/UsageViewManagerImpl.java index b8aef667f0e6..0e7bae22d452 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageViewManagerImpl.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageViewManagerImpl.java @@ -137,7 +137,7 @@ public class UsageViewManagerImpl extends UsageViewManager { @Nullable final UsageViewStateListener listener) { final AtomicReference usageViewRef = new AtomicReference(); - final FindUsagesProcessPresentation processPresentation = new FindUsagesProcessPresentation(); + final FindUsagesProcessPresentation processPresentation = new FindUsagesProcessPresentation(presentation); processPresentation.setShowNotFoundMessage(showNotFoundMessage); processPresentation.setShowPanelIfOnlyOneUsage(showPanelIfOnlyOneUsage); @@ -238,17 +238,18 @@ public class UsageViewManagerImpl extends UsageViewManager { } - public static void showTooManyUsagesWarning(@NotNull final Project project, - @NotNull final TooManyUsagesStatus tooManyUsagesStatus, - @NotNull final ProgressIndicator indicator, - final int usageCount, - final UsageViewImpl usageView) { + static void showTooManyUsagesWarning(@NotNull final Project project, + @NotNull final TooManyUsagesStatus tooManyUsagesStatus, + @NotNull final ProgressIndicator indicator, + @NotNull final UsageViewPresentation presentation, + final int usageCount, + final UsageViewImpl usageView) { UIUtil.invokeLaterIfNeeded(new Runnable() { @Override public void run() { if (usageView != null && usageView.searchHasBeenCancelled() || indicator.isCanceled()) return; - String message = UsageViewBundle.message("find.excessive.usage.count.prompt", usageCount); - UsageLimitUtil.Result ret = UsageLimitUtil.showTooManyUsagesWarning(project, message); + String message = UsageViewBundle.message("find.excessive.usage.count.prompt", usageCount, StringUtil.pluralize(presentation.getUsagesWord())); + UsageLimitUtil.Result ret = UsageLimitUtil.showTooManyUsagesWarning(project, message, presentation); if (ret == UsageLimitUtil.Result.ABORT && usageView != null) { usageView.cancelCurrentSearch(); indicator.cancel(); @@ -366,10 +367,8 @@ public class UsageViewManagerImpl extends UsageViewManager { final UsageViewImpl usageView = getUsageView(indicator); - if (usageCount > UsageLimitUtil.USAGES_LIMIT) { - if (tooManyUsagesStatus.switchTooManyUsagesStatus()) { - showTooManyUsagesWarning(myProject, tooManyUsagesStatus, indicator, myUsageCountWithoutDefinition.get(), usageView); - } + if (usageCount > UsageLimitUtil.USAGES_LIMIT && tooManyUsagesStatus.switchTooManyUsagesStatus()) { + showTooManyUsagesWarning(myProject, tooManyUsagesStatus, indicator, myPresentation, usageCount, usageView); } if (usageView != null) { diff --git a/platform/usageView/src/com/intellij/usages/impl/rules/UsageType.java b/platform/usageView/src/com/intellij/usages/impl/rules/UsageType.java index c8b2932e014c..6df467710854 100644 --- a/platform/usageView/src/com/intellij/usages/impl/rules/UsageType.java +++ b/platform/usageView/src/com/intellij/usages/impl/rules/UsageType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,11 @@ */ package com.intellij.usages.impl.rules; +import com.intellij.BundleBase; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.usageView.UsageViewBundle; +import com.intellij.usages.UsageViewPresentation; +import org.jetbrains.annotations.NotNull; public final class UsageType { public static final UsageType CLASS_INSTANCE_OF = new UsageType(UsageViewBundle.message("usage.type.instanceof")); @@ -43,6 +47,7 @@ public final class UsageType { public static final UsageType LITERAL_USAGE = new UsageType(UsageViewBundle.message("usage.type.string.constant")); public static final UsageType COMMENT_USAGE = new UsageType(UsageViewBundle.message("usage.type.comment")); + @SuppressWarnings("UnresolvedPropertyKey") public static final UsageType UNCLASSIFIED = new UsageType(UsageViewBundle.message("usage.type.unclassified")); public static final UsageType RECURSION = new UsageType("Recursion"); @@ -53,10 +58,17 @@ public final class UsageType { private final String myName; - public UsageType(String name) { + public UsageType(@NotNull String name) { myName = name; } + @NotNull + public String toString(@NotNull UsageViewPresentation presentation) { + String word = presentation.getUsagesWord(); + String usageWord = StringUtil.startsWithChar(myName, '{') ? StringUtil.capitalize(word) : word; + return BundleBase.format(myName, usageWord); + } + public String toString() { return myName; } diff --git a/platform/usageView/src/com/intellij/usages/impl/rules/UsageTypeGroupingRule.java b/platform/usageView/src/com/intellij/usages/impl/rules/UsageTypeGroupingRule.java index b741a227913c..b182bc31bceb 100644 --- a/platform/usageView/src/com/intellij/usages/impl/rules/UsageTypeGroupingRule.java +++ b/platform/usageView/src/com/intellij/usages/impl/rules/UsageTypeGroupingRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,7 +81,7 @@ public class UsageTypeGroupingRule implements UsageGroupingRuleEx { return null; } - private class UsageTypeGroup implements UsageGroup { + private static class UsageTypeGroup implements UsageGroup { private final UsageType myUsageType; private UsageTypeGroup(@NotNull UsageType usageType) { @@ -99,8 +99,8 @@ public class UsageTypeGroupingRule implements UsageGroupingRuleEx { @Override @NotNull - public String getText(UsageView view) { - return myUsageType.toString(); + public String getText(@Nullable UsageView view) { + return view == null ? myUsageType.toString() : myUsageType.toString(view.getPresentation()); } @Override @@ -129,12 +129,11 @@ public class UsageTypeGroupingRule implements UsageGroupingRuleEx { if (this == o) return true; if (!(o instanceof UsageTypeGroup)) return false; final UsageTypeGroup usageTypeGroup = (UsageTypeGroup)o; - if (myUsageType != null ? !myUsageType.equals(usageTypeGroup.myUsageType) : usageTypeGroup.myUsageType != null) return false; - return true; + return myUsageType.equals(usageTypeGroup.myUsageType); } public int hashCode() { - return myUsageType != null ? myUsageType.hashCode() : 0; + return myUsageType.hashCode(); } } } diff --git a/plugins/devkit/src/references/IconsReferencesContributor.java b/plugins/devkit/src/references/IconsReferencesContributor.java index f07c23840e0b..74d258783660 100644 --- a/plugins/devkit/src/references/IconsReferencesContributor.java +++ b/plugins/devkit/src/references/IconsReferencesContributor.java @@ -43,6 +43,7 @@ import com.intellij.psi.xml.XmlAttribute; import com.intellij.psi.xml.XmlAttributeValue; import com.intellij.usageView.UsageInfo; import com.intellij.usages.FindUsagesProcessPresentation; +import com.intellij.usages.UsageViewPresentation; import com.intellij.util.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -326,7 +327,7 @@ public class IconsReferencesContributor extends PsiReferenceContributor implemen }); return true; } - }, new FindUsagesProcessPresentation()); + }, new FindUsagesProcessPresentation(new UsageViewPresentation())); } } return true; diff --git a/plugins/ui-designer/src/messages/UIDesignerBundle.properties b/plugins/ui-designer/src/messages/UIDesignerBundle.properties index c330d3e58673..9fabc533616f 100644 --- a/plugins/ui-designer/src/messages/UIDesignerBundle.properties +++ b/plugins/ui-designer/src/messages/UIDesignerBundle.properties @@ -478,7 +478,7 @@ inspection.i18n.message.in.form=Hard coded string literal in form: ''{0}'' command.paste=Paste add.component.error.qualified.name.required=Please enter a qualified class name add.component.error.component.required=Please select a class derived from JComponent -form.usage.type=Usage in GUI form +form.usage.type={0} in GUI form unsupported.component.class.version=Unsupported component class version field.is.overwritten.by.generated.code=Field ''{0}'' is overwritten by generated code bound.field.type.mismatch=Types of GUI component (''{0}'') and bound field (''{1}'') do not match diff --git a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/XPathEvalAction.java b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/XPathEvalAction.java index 9f3af51d4857..dd1469437633 100644 --- a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/XPathEvalAction.java +++ b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/XPathEvalAction.java @@ -310,7 +310,7 @@ public class XPathEvalAction extends XPathAction { presentation.setOpenInNewTab(XPathAppComponent.getInstance().getConfig().OPEN_NEW_TAB); - final FindUsagesProcessPresentation processPresentation = new FindUsagesProcessPresentation(); + final FindUsagesProcessPresentation processPresentation = new FindUsagesProcessPresentation(presentation); processPresentation.setProgressIndicatorFactory(new Factory() { @Override public ProgressIndicator create() { diff --git a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/search/FindByXPathAction.java b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/search/FindByXPathAction.java index 109e267fbddd..4231f2cf42b9 100644 --- a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/search/FindByXPathAction.java +++ b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/search/FindByXPathAction.java @@ -89,7 +89,7 @@ public class FindByXPathAction extends AnAction { presentation.setOpenInNewTab(settings.OPEN_NEW_TAB); - final FindUsagesProcessPresentation processPresentation = new FindUsagesProcessPresentation(); + final FindUsagesProcessPresentation processPresentation = new FindUsagesProcessPresentation(presentation); processPresentation.setProgressIndicatorFactory(new Factory() { public ProgressIndicator create() { return new FindProgressIndicator(project, scope.getName());