inspection view: remove useless profile update

This commit is contained in:
Dmitry Batkovich
2017-08-07 13:12:38 +03:00
parent d658ea5d64
commit 4fb3ff3d3e
3 changed files with 4 additions and 14 deletions
@@ -1081,11 +1081,6 @@ public class InspectionResultsView extends JPanel implements Disposable, DataPro
return myDisposed;
}
public void updateCurrentProfile() {
final String name = myInspectionProfile.getName();
myInspectionProfile = myInspectionProfile.getProfileManager().getProfile(name);
}
public boolean isRerunAvailable() {
return !(myProvider instanceof OfflineInspectionRVContentProvider) && myScope.isValid();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 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.
@@ -87,21 +87,17 @@ public class EditSettingsAction extends InspectionViewActionBase {
if (toolWrapper != null) {
final HighlightDisplayKey key = HighlightDisplayKey.find(toolWrapper.getShortName()); //do not search for dead code entry point tool
if (key != null) {
if (new EditInspectionToolsSettingsAction(key).editToolSettings(view.getProject(), inspectionProfile)) {
view.updateCurrentProfile();
}
new EditInspectionToolsSettingsAction(key).editToolSettings(view.getProject(), inspectionProfile);
return;
}
}
final String[] path = view.getTree().getSelectedGroupPath();
if (EditInspectionToolsSettingsAction.editSettings(view.getProject(), inspectionProfile, (c) -> {
EditInspectionToolsSettingsAction.editSettings(view.getProject(), inspectionProfile, (c) -> {
if (path != null) {
c.selectInspectionGroup(path);
}
})) {
view.updateCurrentProfile();
}
});
}
}
@@ -86,7 +86,6 @@ public abstract class KeyAwareInspectionViewAction extends InspectionViewActionB
protected void actionPerformed(@NotNull InspectionResultsView view, @NotNull HighlightDisplayKey key) {
if (view.isSingleInspectionRun()) {
view.getCurrentProfile().modifyProfile(it -> it.setToolEnabled(key.toString(), false));
view.updateCurrentProfile();
}
else {
final RefEntity[] selectedElements = view.getTree().getSelectedElements();