From cdc59be4d7707701abbc2c7b50fdd23b1da36245 Mon Sep 17 00:00:00 2001 From: Louis Vignier Date: Mon, 1 Feb 2021 10:21:18 +0100 Subject: [PATCH] IJ-CR-5346 [codeInspection.ui] Restore "Options" label when options concern all scopes GitOrigin-RevId: c7246deeb5822fc9d8e9d44d14545c58c02c6159 --- .../resources/messages/AnalysisBundle.properties | 4 ++-- .../ui/SingleInspectionProfilePanel.java | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/platform/analysis-api/resources/messages/AnalysisBundle.properties b/platform/analysis-api/resources/messages/AnalysisBundle.properties index 3dc7eaa7bd70..bb4c60788728 100644 --- a/platform/analysis-api/resources/messages/AnalysisBundle.properties +++ b/platform/analysis-api/resources/messages/AnalysisBundle.properties @@ -156,8 +156,8 @@ inspections.settings.profile.file.chooser.description=Choose profile file #details inspections.settings.empty.text=No enabled inspections available -inspections.settings.options.title=Options for ''{0}'' -inspections.settings.options.title.all.scopes=Options for all scopes +inspections.settings.options.title=Options +inspections.settings.options.title.specific.scope=Options for ''{0}'' inspections.settings.disable.new.inspections.by.default.checkbox=Disable new inspections by default inspections.settings.multiple.inspections.warning=Multiple inspections are selected. You can edit them as a single inspection. inspections.settings.no.description.warning=Can't find inspection description. diff --git a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java index b323e82f733f..5511e52f2e2c 100644 --- a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java +++ b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java @@ -247,9 +247,11 @@ public class SingleInspectionProfilePanel extends JPanel { } if (myOptionsLabel != null) - myOptionsLabel.setText(state.getScopeName() == CustomScopesProviderEx.getAllScope().getScopeId() - ? AnalysisBundle.message("inspections.settings.options.title.all.scopes") - : AnalysisBundle.message("inspections.settings.options.title", state.getScopeName())); + myOptionsLabel.setText( + AnalysisBundle.message("inspections.settings.options.title.specific.scope", + state.getScopeName() == CustomScopesProviderEx.getAllScope().getScopeId() + ? LangBundle.message("scopes.table.everywhere.else") + : state.getScopeName())); } private static InspectionConfigTreeNode getGroupNode(InspectionConfigTreeNode root, String[] groupPath) { @@ -770,7 +772,7 @@ public class SingleInspectionProfilePanel extends JPanel { final double severityPanelWeightY; ScopesAndSeveritiesTable scopesAndScopesAndSeveritiesTable; - myOptionsLabel = new JBLabel(AnalysisBundle.message("inspections.settings.options.title.all.scopes")); + myOptionsLabel = new JBLabel(AnalysisBundle.message("inspections.settings.options.title")); if (scopesNames.isEmpty()) { final LevelChooserAction severityLevelChooser = @@ -845,6 +847,7 @@ public class SingleInspectionProfilePanel extends JPanel { } setConfigPanel(configPanelAnchor, toolState); + myOptionsLabel.setText(AnalysisBundle.message("inspections.settings.options.title")); } scopesAndScopesAndSeveritiesTable = null; }