From 4fb3ff3d3e6ee618506c01ff5b87452cf766b893 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Fri, 4 Aug 2017 15:57:41 +0300 Subject: [PATCH] inspection view: remove useless profile update --- .../codeInspection/ui/InspectionResultsView.java | 5 ----- .../ui/actions/EditSettingsAction.java | 12 ++++-------- .../ui/actions/KeyAwareInspectionViewAction.java | 1 - 3 files changed, 4 insertions(+), 14 deletions(-) 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 490d551128db..4cf9f7691313 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java @@ -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(); } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/EditSettingsAction.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/EditSettingsAction.java index 5b4396ec74d3..1d518a189c00 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/EditSettingsAction.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/EditSettingsAction.java @@ -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(); - } + }); } } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/KeyAwareInspectionViewAction.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/KeyAwareInspectionViewAction.java index 65e975b65a1a..887b24460aed 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/KeyAwareInspectionViewAction.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/KeyAwareInspectionViewAction.java @@ -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();