mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
i18n java
GitOrigin-RevId: cc44e659c8162d1332a7e04d30bbe96a02e0b85e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
32d1af7e2c
commit
83607e5b6c
@@ -47,7 +47,7 @@ internal class ReplaceMethodCallFix(expr: PsiMethodCallExpression, replacementMe
|
||||
PsiFormatUtil.formatMethod(replacementMethod, PsiSubstitutor.EMPTY, PsiFormatUtilBase.SHOW_CONTAINING_CLASS or PsiFormatUtilBase.SHOW_NAME, 0)
|
||||
|
||||
override fun getText(): String {
|
||||
return "Replace method call with $myReplacementText"
|
||||
return InspectionGadgetsBundle.message("replace.method.call.fix.text", myReplacementText)
|
||||
}
|
||||
|
||||
@Nls
|
||||
@@ -79,7 +79,7 @@ internal class ReplaceFieldReferenceFix(expr: PsiReferenceExpression, replacemen
|
||||
}
|
||||
|
||||
override fun getText(): String {
|
||||
return "Replace field reference with $myReplacementText"
|
||||
return InspectionGadgetsBundle.message("replace.field.reference.fix.text", myReplacementText)
|
||||
}
|
||||
|
||||
override fun invoke(project: Project, file: PsiFile, startElement: PsiElement, endElement: PsiElement) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.java.generate.inspection;
|
||||
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.LocalQuickFix;
|
||||
import com.intellij.codeInspection.ProblemsHolder;
|
||||
@@ -30,7 +31,7 @@ public abstract class AbstractToStringInspection extends LocalInspectionTool {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getGroupDisplayName() {
|
||||
return "toString() issues";
|
||||
return InspectionsBundle.message("group.names.toString.issues" );
|
||||
}
|
||||
|
||||
protected static LocalQuickFix[] createFixes(@NotNull ProblemsHolder holder) {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package org.jetbrains.java.generate.inspection;
|
||||
|
||||
import com.intellij.codeInsight.TestFrameworks;
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ProblemHighlightType;
|
||||
import com.intellij.codeInspection.ProblemsHolder;
|
||||
import com.intellij.codeInspection.ui.RegExFormatter;
|
||||
@@ -151,7 +152,8 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
|
||||
return;
|
||||
}
|
||||
}
|
||||
holder.registerProblem(nameIdentifier, "Class '" + clazz.getName() + "' does not override 'toString()' method",
|
||||
holder.registerProblem(nameIdentifier,
|
||||
InspectionsBundle.message("inspection.class.has.no.to.string.method.description", clazz.getName()),
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, createFixes(holder));
|
||||
}
|
||||
};
|
||||
@@ -172,7 +174,7 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
|
||||
constraints.weightx = 0.0;
|
||||
constraints.anchor = GridBagConstraints.WEST;
|
||||
constraints.fill = GridBagConstraints.NONE;
|
||||
panel.add(new JLabel("Exclude classes (reg exp):"), constraints);
|
||||
panel.add(new JLabel(InspectionsBundle.message("inspection.class.has.no.to.string.method.exclude.classes.reg.exp.option")), constraints);
|
||||
|
||||
final JFormattedTextField excludeClassNamesField = new JFormattedTextField(new RegExFormatter());
|
||||
excludeClassNamesField.setValue(excludeClassNamesPattern);
|
||||
@@ -200,30 +202,36 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
|
||||
constraints.fill = GridBagConstraints.NONE;
|
||||
panel.add(excludeClassNamesField, constraints);
|
||||
|
||||
final CheckBox excludeExceptionCheckBox = new CheckBox("Ignore exception classes", this, "excludeException");
|
||||
final CheckBox excludeExceptionCheckBox = new CheckBox(
|
||||
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.exception.classes.option"), this, "excludeException");
|
||||
constraints.gridx = 0;
|
||||
constraints.gridy = 1;
|
||||
constraints.gridwidth = 2;
|
||||
constraints.fill = GridBagConstraints.HORIZONTAL;
|
||||
panel.add(excludeExceptionCheckBox, constraints);
|
||||
|
||||
final CheckBox excludeDeprecatedCheckBox = new CheckBox("Ignore deprecated classes", this, "excludeDeprecated");
|
||||
final CheckBox excludeDeprecatedCheckBox = new CheckBox(
|
||||
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.deprecated.classes.option"), this, "excludeDeprecated");
|
||||
constraints.gridy = 2;
|
||||
panel.add(excludeDeprecatedCheckBox, constraints);
|
||||
|
||||
final CheckBox excludeEnumCheckBox = new CheckBox("Ignore enum classes", this, "excludeEnum");
|
||||
final CheckBox excludeEnumCheckBox = new CheckBox(
|
||||
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.enum.classes.option"), this, "excludeEnum");
|
||||
constraints.gridy = 3;
|
||||
panel.add(excludeEnumCheckBox, constraints);
|
||||
|
||||
final CheckBox excludeAbstractCheckBox = new CheckBox("Ignore abstract classes", this, "excludeAbstract");
|
||||
final CheckBox excludeAbstractCheckBox = new CheckBox(
|
||||
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.abstract.classes.option"), this, "excludeAbstract");
|
||||
constraints.gridy = 4;
|
||||
panel.add(excludeAbstractCheckBox, constraints);
|
||||
|
||||
final CheckBox excludeInTestCodeCheckBox = new CheckBox("Ignore test classes", this, "excludeTestCode");
|
||||
final CheckBox excludeInTestCodeCheckBox = new CheckBox(
|
||||
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.test.classes.option"), this, "excludeTestCode");
|
||||
constraints.gridy = 5;
|
||||
panel.add(excludeInTestCodeCheckBox, constraints);
|
||||
|
||||
final CheckBox excludeInnerClasses = new CheckBox("Ignore inner classes", this, "excludeInnerClasses");
|
||||
final CheckBox excludeInnerClasses = new CheckBox(
|
||||
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.inner.classes.option"), this, "excludeInnerClasses");
|
||||
constraints.gridy = 6;
|
||||
constraints.weighty = 1.0;
|
||||
panel.add(excludeInnerClasses, constraints);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.java.generate.inspection;
|
||||
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ProblemHighlightType;
|
||||
import com.intellij.codeInspection.ProblemsHolder;
|
||||
import com.intellij.psi.*;
|
||||
@@ -93,13 +94,15 @@ public class FieldNotUsedInToStringInspection extends AbstractToStringInspection
|
||||
method.accept(visitor);
|
||||
for (PsiField field : visitor.getUnusedFields()) {
|
||||
final String fieldName = field.getName();
|
||||
myHolder.registerProblem(field.getNameIdentifier(), "Field '" + fieldName + "' is not used in 'toString()' method",
|
||||
myHolder.registerProblem(field.getNameIdentifier(),
|
||||
InspectionsBundle.message("inspection.field.not.used.in.to.string.description2", fieldName),
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, createFixes(myHolder));
|
||||
}
|
||||
for (PsiMethod unusedMethod : visitor.getUnusedMethods()) {
|
||||
final PsiIdentifier identifier = unusedMethod.getNameIdentifier();
|
||||
final PsiElement target = identifier == null ? unusedMethod : identifier;
|
||||
myHolder.registerProblem(target, "Method '" + unusedMethod.getName() + "' is not used in 'toString()' method",
|
||||
myHolder.registerProblem(target,
|
||||
InspectionsBundle.message("inspection.field.not.used.in.to.string.description", unusedMethod.getName()),
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, createFixes(myHolder));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2018 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.codeInsight;
|
||||
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.util.ClassFilter;
|
||||
import com.intellij.ide.util.TreeClassChooser;
|
||||
@@ -84,7 +85,7 @@ public class AnnotationsPanel {
|
||||
myTable = new JBTable(myTableModel, columnModel);
|
||||
|
||||
if (showInstrumentationOptions) {
|
||||
columnModel.getColumn(0).setHeaderValue("Annotation");
|
||||
columnModel.getColumn(0).setHeaderValue(CodeInsightBundle.message("node.annotation.tooltip"));
|
||||
|
||||
TableColumn checkColumn = new TableColumn(1, 100, new BooleanTableCellRenderer(), new BooleanTableCellEditor());
|
||||
columnModel.addColumn(checkColumn);
|
||||
@@ -103,7 +104,7 @@ public class AnnotationsPanel {
|
||||
Component component = defaultRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
if (component instanceof JComponent) {
|
||||
((JComponent)component)
|
||||
.setToolTipText(column == 1 ? "Add runtime assertions for notnull-annotated methods and parameters" : null);
|
||||
.setToolTipText(column == 1 ? InspectionsBundle.message("nullable.notnull.annotations.runtime.instrumentation.tooltip") : null);
|
||||
}
|
||||
return component;
|
||||
}
|
||||
@@ -151,7 +152,7 @@ public class AnnotationsPanel {
|
||||
}
|
||||
final JPanel panel = toolbarDecorator.createPanel();
|
||||
myComponent = new JPanel(new BorderLayout());
|
||||
myComponent.setBorder(IdeBorderFactory.createTitledBorder(name + " annotations", false, JBUI.insetsTop(10)));
|
||||
myComponent.setBorder(IdeBorderFactory.createTitledBorder(InspectionsBundle.message("nullable.notnull.annotations.panel.title", name), false, JBUI.insetsTop(10)));
|
||||
myComponent.add(panel);
|
||||
myComponent.setPreferredSize(new JBDimension(myComponent.getPreferredSize().width, 200));
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class NullableNotNullDialog extends DialogWrapper {
|
||||
new HashSet<>(manager.getInstrumentedNotNulls()), showInstrumentationOptions, true);
|
||||
|
||||
init();
|
||||
setTitle("Nullable/NotNull Configuration");
|
||||
setTitle(InspectionsBundle.message("nullable.notnull.configuration.dialog.title"));
|
||||
}
|
||||
|
||||
public static JButton createConfigureAnnotationsButton(Component context) {
|
||||
|
||||
@@ -1286,4 +1286,29 @@ entry.points.label=Entry points:
|
||||
unused.declaration.unused.option=unused
|
||||
unused.declaration.used.option=used
|
||||
unused.declaration.reachable.from.tests.option=When entry points are in test sources, mark callees as:
|
||||
inspection.suspicious.names.ignore.methods.title=Ignore methods
|
||||
inspection.suspicious.names.ignore.methods.title=Ignore methods
|
||||
nullable.notnull.configuration.dialog.title=Nullable/NotNull Configuration
|
||||
nullable.notnull.annotations.panel.title={0} annotations
|
||||
nullable.notnull.annotations.runtime.instrumentation.tooltip=Add runtime assertions for notnull-annotated methods and parameters
|
||||
inspection.field.not.used.in.to.string.description=Method ''{0}'' is not used in ''toString()'' method
|
||||
inspection.field.not.used.in.to.string.description2=Field ''{0}'' is not used in ''toString()'' method
|
||||
inspection.class.has.no.to.string.method.description=Class ''{0}'' does not override ''toString()'' method
|
||||
inspection.class.has.no.to.string.method.ignore.inner.classes.option=Ignore inner classes
|
||||
inspection.class.has.no.to.string.method.ignore.test.classes.option=Ignore test classes
|
||||
inspection.class.has.no.to.string.method.ignore.abstract.classes.option=Ignore abstract classes
|
||||
inspection.class.has.no.to.string.method.ignore.enum.classes.option=Ignore enum classes
|
||||
inspection.class.has.no.to.string.method.ignore.deprecated.classes.option=Ignore deprecated classes
|
||||
inspection.class.has.no.to.string.method.ignore.exception.classes.option=Ignore exception classes
|
||||
inspection.class.has.no.to.string.method.exclude.classes.reg.exp.option=Exclude classes (reg exp):
|
||||
make.default.the.last.case.family.name=Make 'default' the last case
|
||||
inspection.suspicious.integer.div.assignment.option=Report suspicious but possibly exact divisions
|
||||
junit.rule.classrule.option=Report @ClassRule problems
|
||||
junit.rule.rule.option=Report @Rule problems
|
||||
inspection.constant.on.wrong.side.of.a.comparison.side.option=Constant should be on this side of a comparison:
|
||||
static.inheritrance.fix.replace.progress=Replacing usages of {0}
|
||||
inspection.suspicious.getter.setter.field.option=Only warn when field matching getter/setter name is present
|
||||
inspection.c.style.array.declarations.option=Ignore C-style declarations in variables
|
||||
inspection.unary.plus.unary.binary.option=Only report in confusing binary or unary expression context
|
||||
inspection.infinite.loop.option=Ignore when placed in Thread.run
|
||||
inspection.redundant.field.initialization.option=Only warn on initialization to null
|
||||
inspection.unnecessary.super.qualifier.option=Ignore clarification 'super' qualifier
|
||||
@@ -2315,7 +2315,9 @@ junit5.malformed.parameterized.fix.family.name=Replace annotation
|
||||
array.hash.code.fix.family.name=Replace with implicit 'hashCode'
|
||||
unqualified.static.access.fix.family.name=Qualify static access
|
||||
replace.field.reference.fix.family.name=Replace Field Reference
|
||||
replace.field.reference.fix.text=Replace field reference with {0}
|
||||
replace.method.call.fix.family.name=Replace Method Call
|
||||
replace.method.call.fix.text=Replace method call with {0}
|
||||
delete.unnecessary.statement.fix.family.name=Remove redundant statement
|
||||
increment.decrement.used.as.expression.fix.family.name=Extract to separate statement
|
||||
use.of.properties.as.hashtable.fix.family.name=Fix property access
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2019 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.siyeh.ig.bugs;
|
||||
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.codeInspection.dataFlow.CommonDataflow;
|
||||
import com.intellij.codeInspection.dataFlow.rangeSet.LongRangeSet;
|
||||
@@ -39,7 +40,7 @@ public class SuspiciousIntegerDivAssignmentInspection extends BaseInspection {
|
||||
@Override
|
||||
public JComponent createOptionsPanel() {
|
||||
MultipleCheckboxOptionsPanel panel = new MultipleCheckboxOptionsPanel(this);
|
||||
panel.addCheckbox("Report suspicious but possibly exact divisions", "myReportPossiblyExactDivision");
|
||||
panel.addCheckbox(InspectionsBundle.message("inspection.suspicious.integer.div.assignment.option"), "myReportPossiblyExactDivision");
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.siyeh.ig.controlflow;
|
||||
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.*;
|
||||
@@ -75,7 +76,7 @@ public class DefaultNotLastCaseInSwitchInspection extends BaseInspection {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Make 'default' the last case";
|
||||
return InspectionsBundle.message("make.default.the.last.case.family.name");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.siyeh.ig.controlflow;
|
||||
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
|
||||
import com.intellij.lang.jvm.JvmModifier;
|
||||
import com.intellij.psi.*;
|
||||
@@ -38,7 +39,7 @@ public class InfiniteLoopStatementInspection extends BaseInspection {
|
||||
@Nullable
|
||||
@Override
|
||||
public JComponent createOptionsPanel() {
|
||||
return new SingleCheckboxOptionsPanel("Ignore when placed in Thread.run", this, "myIgnoreInThreadTopLevel");
|
||||
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.infinite.loop.option"), this, "myIgnoreInThreadTopLevel");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.siyeh.ig.inheritance;
|
||||
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInsight.intention.QuickFixFactory;
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.openapi.application.ReadAction;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
@@ -73,7 +74,8 @@ class StaticInheritanceFix extends InspectionGadgetsFix {
|
||||
assert implementingClass != null;
|
||||
final PsiFile file = implementingClass.getContainingFile();
|
||||
|
||||
ProgressManager.getInstance().run(new Task.Modal(project, "Replacing usages of " + iface.getName(), false) {
|
||||
ProgressManager.getInstance().run(new Task.Modal(project,
|
||||
InspectionsBundle.message("static.inheritrance.fix.replace.progress", iface.getName()), false) {
|
||||
|
||||
@Override
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.siyeh.ig.javabeans;
|
||||
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiField;
|
||||
@@ -49,7 +50,7 @@ public class SuspiciousGetterSetterInspection extends BaseInspection {
|
||||
@Nullable
|
||||
@Override
|
||||
public JComponent createOptionsPanel() {
|
||||
return new SingleCheckboxOptionsPanel("Only warn when field matching getter/setter name is present", this, "onlyWarnWhenFieldPresent");
|
||||
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.suspicious.getter.setter.field.option"), this, "onlyWarnWhenFieldPresent");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
package com.siyeh.ig.junit;
|
||||
|
||||
import com.intellij.codeInsight.AnnotationUtil;
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiField;
|
||||
@@ -28,8 +29,8 @@ public class JUnitRuleInspection extends BaseInspection {
|
||||
@Override
|
||||
public JComponent createOptionsPanel() {
|
||||
final MultipleCheckboxOptionsPanel panel = new MultipleCheckboxOptionsPanel(this);
|
||||
panel.addCheckbox("Report @Rule problems", "REPORT_RULE_PROBLEMS");
|
||||
panel.addCheckbox("Report @ClassRule problems", "REPORT_CLASS_RULE_PROBLEMS");
|
||||
panel.addCheckbox(InspectionsBundle.message("junit.rule.rule.option"), "REPORT_RULE_PROBLEMS");
|
||||
panel.addCheckbox(InspectionsBundle.message("junit.rule.classrule.option"), "REPORT_CLASS_RULE_PROBLEMS");
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.siyeh.ig.numeric;
|
||||
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.codeInspection.ProblemHighlightType;
|
||||
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
|
||||
@@ -50,7 +51,7 @@ public class UnaryPlusInspection extends BaseInspection {
|
||||
@Nullable
|
||||
@Override
|
||||
public JComponent createOptionsPanel() {
|
||||
return new SingleCheckboxOptionsPanel("Only report in confusing binary or unary expression context", this,
|
||||
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.unary.plus.unary.binary.option"), this,
|
||||
"onlyReportInsideBinaryExpression");
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.siyeh.ig.style;
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool;
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
|
||||
import com.intellij.profile.codeInspection.InspectionProjectProfileManager;
|
||||
import com.intellij.psi.*;
|
||||
@@ -52,7 +53,7 @@ public class CStyleArrayDeclarationInspection extends BaseInspection implements
|
||||
@Nullable
|
||||
@Override
|
||||
public JComponent createOptionsPanel() {
|
||||
return new SingleCheckboxOptionsPanel("Ignore C-style declarations in variables", this, "ignoreVariables");
|
||||
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.c.style.array.declarations.option"), this, "ignoreVariables");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2019 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.siyeh.ig.style;
|
||||
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.ComboBox;
|
||||
@@ -48,7 +49,7 @@ public class ConstantOnWrongSideOfComparisonInspection extends BaseInspection {
|
||||
myConstantShouldGoLeft = (e.getItem() == left);
|
||||
}
|
||||
});
|
||||
final JLabel label = new JLabel("Constant should be on this side of a comparison:");
|
||||
final JLabel label = new JLabel(InspectionsBundle.message("inspection.constant.on.wrong.side.of.a.comparison.side.option"));
|
||||
final JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEADING));
|
||||
panel.add(label);
|
||||
panel.add(comboBox);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.siyeh.ig.style;
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool;
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.codeInspection.ProblemHighlightType;
|
||||
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
|
||||
@@ -48,7 +49,7 @@ public class RedundantFieldInitializationInspection extends BaseInspection imple
|
||||
@Nullable
|
||||
@Override
|
||||
public JComponent createOptionsPanel() {
|
||||
return new SingleCheckboxOptionsPanel("Only warn on initialization to null", this, "onlyWarnOnNull");
|
||||
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.redundant.field.initialization.option"), this, "onlyWarnOnNull");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.siyeh.ig.style;
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool;
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.codeInspection.ProblemHighlightType;
|
||||
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
|
||||
@@ -47,7 +48,7 @@ public class UnnecessarySuperQualifierInspection extends BaseInspection implemen
|
||||
@Nullable
|
||||
@Override
|
||||
public JComponent createOptionsPanel() {
|
||||
return new SingleCheckboxOptionsPanel("Ignore clarification 'super' qualifier", this, "ignoreClarification");
|
||||
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.unnecessary.super.qualifier.option"), this, "ignoreClarification");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -184,3 +184,7 @@ intention.category.other=Java/Other
|
||||
0.will.no.longer.be.visible.from.overriding.1={0} will no longer be visible from overriding {1}
|
||||
0.will.have.incompatible.access.privileges.with.overriding.1={0} will have incompatible access privileges with overriding {1}
|
||||
0.already.extends.1.and.will.not.compile.after.converting.2.to.a.class={0} implementing {2} already extends {1} and will not compile after converting {2} to a class
|
||||
change.modifier.text=Make ''{0}'' {1}
|
||||
convert.datapoints.fix.family.name=Convert @DataPoint(s) annotation holder
|
||||
make.method.\u0432default.family.name=Make method default
|
||||
create.missing.switch.branches.family.name=Create missing switch branches
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.intellij.psi.*;
|
||||
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
|
||||
import com.intellij.psi.codeStyle.VariableKind;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.siyeh.IntentionPowerPackBundle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@@ -139,6 +140,6 @@ public class DataPointHolderConversionIntention extends PsiElementBaseIntentionA
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Convert @DataPoint(s) annotation holder";
|
||||
return IntentionPowerPackBundle.message("convert.datapoints.fix.family.name");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class ChangeModifierIntention extends BaseElementAtCaretIntentionAction {
|
||||
if (modifiers.isEmpty()) return false;
|
||||
if (modifiers.size() == 1) {
|
||||
target = modifiers.get(0);
|
||||
setText("Make '" + identifier.getText() + "' " + target);
|
||||
setText(IntentionPowerPackBundle.message("change.modifier.text", identifier.getText(), target));
|
||||
}
|
||||
else {
|
||||
setText(getFamilyName());
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.intellij.psi.util.TypeConversionUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.siyeh.IntentionPowerPackBundle;
|
||||
import com.siyeh.ig.psiutils.CreateSwitchBranchesUtil;
|
||||
import com.siyeh.ig.psiutils.ExpressionUtils;
|
||||
import com.siyeh.ig.psiutils.TypeUtils;
|
||||
@@ -134,7 +135,7 @@ public class CreateMissingSwitchBranchesAction extends PsiElementBaseIntentionAc
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Create missing switch branches";
|
||||
return IntentionPowerPackBundle.message("create.missing.switch.branches.family.name");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.util.PsiUtil;
|
||||
import com.siyeh.IntentionPowerPackBundle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class MakeMethodDefaultIntention extends BaseElementAtCaretIntentionAction {
|
||||
@@ -23,7 +24,7 @@ public class MakeMethodDefaultIntention extends BaseElementAtCaretIntentionActio
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Make method default";
|
||||
return IntentionPowerPackBundle.message("make.method.вdefault.family.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user