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 4b57ed02b12c..5f9252522516 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionIntention.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionIntention.java @@ -147,7 +147,6 @@ public class RunInspectionIntention implements IntentionAction, HighPriorityActi model.setEditable(toolWrapper.getDisplayName()); final GlobalInspectionContextImpl inspectionContext = managerEx.createNewGlobalContext(false); inspectionContext.setExternalProfile(model); - inspectionContext.setSingleInspectionRun(true); return inspectionContext; } 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 607b55e0b4aa..7081deb07333 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java @@ -98,7 +98,6 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp private volatile InspectionResultsView myView; private Content myContent; private volatile boolean myViewClosed = true; - private volatile boolean mySingleInspectionRun; @NotNull private AnalysisUIOptions myUIOptions; @@ -156,7 +155,7 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp public void addView(@NotNull InspectionResultsView view) { addView(view, view.getCurrentProfileName() == null ? InspectionsBundle.message("inspection.results.title") - : InspectionsBundle.message(mySingleInspectionRun ? + : InspectionsBundle.message(!getCurrentProfile().isEditable() ? "inspection.results.for.inspection.toolwindow.title" : "inspection.results.for.profile.toolwindow.title", view.getCurrentProfileName(), getCurrentScope().getShortenName()), false); @@ -977,14 +976,6 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp return myViewClosed; } - public void setSingleInspectionRun(boolean singleInspectionRun) { - mySingleInspectionRun = singleInspectionRun; - } - - public boolean isSingleInspectionRun() { - return mySingleInspectionRun; - } - private InspectionRVContentProvider createContentProvider() { return new InspectionRVContentProviderImpl(getProject()); } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java index f77074eb1b80..a560beeb0dc2 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java @@ -145,7 +145,7 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren myGlobalInspectionContext = globalInspectionContext; myProvider = provider; myExcludedInspectionTreeNodesManager = new ExcludedInspectionTreeNodesManager(provider instanceof OfflineInspectionRVContentProvider, - globalInspectionContext.isSingleInspectionRun()); + !myInspectionProfile.isEditable()); myTree = new InspectionTree(myProject, globalInspectionContext, this); initTreeListeners(); @@ -696,7 +696,7 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren synchronized (myTreeStructureUpdateLock) { InspectionProfileImpl profile = (InspectionProfileImpl)myInspectionProfile; boolean isGroupedBySeverity = myGlobalInspectionContext.getUIOptions().GROUP_BY_SEVERITY; - boolean singleInspectionRun = myGlobalInspectionContext.isSingleInspectionRun(); + boolean singleInspectionRun = !myInspectionProfile.isEditable(); for (Tools currentTools : tools) { InspectionToolWrapper defaultToolWrapper = currentTools.getDefaultState().getTool(); if (myGlobalInspectionContext.getUIOptions().FILTER_RESOLVED_ITEMS &&