IJ-CR-5346 [codeInspection.ui] Restore "Options" label when options concern all scopes

GitOrigin-RevId: c7246deeb5822fc9d8e9d44d14545c58c02c6159
This commit is contained in:
Louis Vignier
2021-02-01 10:05:09 +00:00
committed by intellij-monorepo-bot
parent 5b1ca6e07e
commit cdc59be4d7
2 changed files with 9 additions and 6 deletions
@@ -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.
@@ -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;
}