inspection toolwindow: remove redundant "is single run" detection way

This commit is contained in:
Dmitry Batkovich
2016-06-03 20:56:54 +03:00
parent 7d0ffda637
commit 69f7c3a3e9
3 changed files with 3 additions and 13 deletions
@@ -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;
}
@@ -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());
}
@@ -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 &&