mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection toolwindow: do not enable selected profile as active from toolwindow inspection settings IDEA-156825
This commit is contained in:
+7
-1
@@ -104,7 +104,13 @@ public class EditInspectionToolsSettingsAction implements IntentionAction, Icona
|
||||
final ErrorsConfigurable errorsConfigurable;
|
||||
if (!canChooseDifferentProfile) {
|
||||
errorsConfigurable = new ProjectInspectionToolsConfigurable(InspectionProfileManager.getInstance(),
|
||||
InspectionProjectProfileManager.getInstance(project));
|
||||
InspectionProjectProfileManager.getInstance(project)) {
|
||||
|
||||
@Override
|
||||
protected boolean setActiveProfileAsDefaultOnApply() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
errorsConfigurable = ErrorsConfigurable.SERVICE.createConfigurable(project);
|
||||
|
||||
+2
-2
@@ -80,7 +80,7 @@ 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(), (InspectionProfileImpl)inspectionProfile, true)) {
|
||||
if (new EditInspectionToolsSettingsAction(key).editToolSettings(view.getProject(), (InspectionProfileImpl)inspectionProfile, false)) {
|
||||
view.updateCurrentProfile();
|
||||
}
|
||||
return;
|
||||
@@ -88,7 +88,7 @@ public class EditSettingsAction extends InspectionViewActionBase {
|
||||
}
|
||||
|
||||
final String[] path = view.getTree().getSelectedGroupPath();
|
||||
if (EditInspectionToolsSettingsAction.editSettings(view.getProject(), inspectionProfile, true, (c) -> {
|
||||
if (EditInspectionToolsSettingsAction.editSettings(view.getProject(), inspectionProfile, false, (c) -> {
|
||||
if (path != null) {
|
||||
c.selectInspectionGroup(path);
|
||||
}
|
||||
|
||||
+5
-1
@@ -162,6 +162,10 @@ public abstract class InspectionToolsConfigurable extends BaseConfigurable
|
||||
myProfiles.getProfilesComboBox().selectProfile(model);
|
||||
}
|
||||
|
||||
protected boolean setActiveProfileAsDefaultOnApply() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return DISPLAY_NAME;
|
||||
@@ -530,7 +534,7 @@ public abstract class InspectionToolsConfigurable extends BaseConfigurable
|
||||
else {
|
||||
final SingleInspectionProfilePanel panel = getProfilePanel(inspectionProfile);
|
||||
panel.apply();
|
||||
if (panel == selectedPanel) {
|
||||
if (setActiveProfileAsDefaultOnApply() && panel == selectedPanel) {
|
||||
applyRootProfile(panel.getCurrentProfileName(), panel.isProjectLevel());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user