diff --git a/java/java-impl/src/com/intellij/codeInspection/suspiciousNameCombination/SuspiciousNameCombinationInspection.java b/java/java-impl/src/com/intellij/codeInspection/suspiciousNameCombination/SuspiciousNameCombinationInspection.java index 9561c73ceb7a..942fa9dea2c3 100644 --- a/java/java-impl/src/com/intellij/codeInspection/suspiciousNameCombination/SuspiciousNameCombinationInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/suspiciousNameCombination/SuspiciousNameCombinationInspection.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.codeInspection.suspiciousNameCombination; @@ -33,7 +19,7 @@ import com.intellij.psi.*; import com.intellij.psi.codeStyle.NameUtil; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.ui.AddEditDeleteListPanel; -import com.intellij.ui.IdeBorderFactory; +import com.intellij.util.ui.JBUI; import com.siyeh.InspectionGadgetsBundle; import com.siyeh.ig.psiutils.MethodMatcher; import com.siyeh.ig.ui.UiUtils; @@ -92,11 +78,14 @@ public class SuspiciousNameCombinationInspection extends AbstractBaseJavaLocalIn Arrays.asList(myIgnoredMethods.getClassNames(), myIgnoredMethods.getMethodNamePatterns()), InspectionGadgetsBundle.message("result.of.method.call.ignored.class.column.title"), InspectionGadgetsBundle.message("result.of.method.call.ignored.method.column.title"))); - JPanel tablePanel = UiUtils.createAddRemoveTreeClassChooserPanel(table, InspectionGadgetsBundle.message("choose.class")); + JPanel tablePanel = new JPanel(new BorderLayout()); + JLabel label = new JLabel(JavaBundle.message("section.title.inspection.suspicious.names.ignore.methods")); + label.setBorder(JBUI.Borders.emptyBottom(3)); + tablePanel.add(label, BorderLayout.NORTH); + tablePanel.add(UiUtils.createAddRemoveTreeClassChooserPanel(table, InspectionGadgetsBundle.message("choose.class")), BorderLayout.CENTER); + JPanel panel = new JPanel(new GridLayout(2, 1)); panel.add(nameGroupsPanel); - tablePanel.setBorder(IdeBorderFactory.createTitledBorder(JavaBundle.message( - "section.title.inspection.suspicious.names.ignore.methods"), false)); panel.add(tablePanel); return panel; } diff --git a/java/openapi/resources/messages/JavaBundle.properties b/java/openapi/resources/messages/JavaBundle.properties index 8e3086065492..3f6fcce6e715 100644 --- a/java/openapi/resources/messages/JavaBundle.properties +++ b/java/openapi/resources/messages/JavaBundle.properties @@ -1120,7 +1120,7 @@ radio.use.fully.qualified.class.names.in.javadoc.never=Never, use short name and scope.hierarchy=Hierarchy of {0} sdk.cannot.create=Cannot Create SDK sdk.java.no.classes=Cannot find JDK classes in ''{0}'' -section.title.inspection.suspicious.names.ignore.methods=Ignore Methods +section.title.inspection.suspicious.names.ignore.methods=Ignore Methods: set.language.level=Set language level set.language.level.to.0=Set language level to {0} settings.completion.ml.java.display.name=Java diff --git a/platform/analysis-api/resources/messages/AnalysisBundle.properties b/platform/analysis-api/resources/messages/AnalysisBundle.properties index fce55a68384c..b9f1fe073f05 100644 --- a/platform/analysis-api/resources/messages/AnalysisBundle.properties +++ b/platform/analysis-api/resources/messages/AnalysisBundle.properties @@ -134,7 +134,7 @@ suspicious.name.combination.add.title=Add Group of Names suspicious.name.combination.display.name=Suspicious variable/parameter name combination suspicious.name.combination.edit.title=Edit Group of Names suspicious.name.combination.options.prompt=Enter a comma-separated list of names: -suspicious.name.combination.options.title=Groups of names +suspicious.name.combination.options.title=Groups of Names #filters inspections.settings.show.modified.text=Show only modified inspections