mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
unify bundle names: rename java error bundle
GitOrigin-RevId: 4da165583299a5a856b369700dc6ee3c21df4d3a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
450c2e234f
commit
4591f890b2
@@ -2,7 +2,7 @@
|
||||
package com.intellij.codeInspection;
|
||||
|
||||
import com.intellij.codeInsight.daemon.GroupNames;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorMessages;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorBundle;
|
||||
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Key;
|
||||
@@ -58,7 +58,7 @@ public class NumericOverflowInspection extends AbstractBaseJavaLocalInspectionTo
|
||||
public void visitExpression(PsiExpression expression) {
|
||||
boolean hasOverflow = hasOverflow(expression, holder.getProject());
|
||||
if (hasOverflow && (!ignoreLeftShiftWithNegativeResult || !isLeftShiftWithNegativeResult(expression, holder.getProject()))) {
|
||||
holder.registerProblem(expression, JavaErrorMessages.message("numeric.overflow.in.expression"), ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
|
||||
holder.registerProblem(expression, JavaErrorBundle.message("numeric.overflow.in.expression"), ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
// Copyright 2000-2017 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.accessStaticViaInstance;
|
||||
|
||||
import com.intellij.codeInsight.daemon.JavaErrorMessages;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorBundle;
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.HighlightMessageUtil;
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.JavaHighlightUtil;
|
||||
import com.intellij.codeInsight.daemon.impl.quickfix.RemoveUnusedVariableUtil;
|
||||
import com.intellij.codeInspection.*;
|
||||
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool;
|
||||
import com.intellij.codeInspection.LocalQuickFix;
|
||||
import com.intellij.codeInspection.ProblemsHolder;
|
||||
import com.intellij.psi.*;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -69,9 +72,9 @@ public class AccessStaticViaInstanceBase extends AbstractBaseJavaLocalInspection
|
||||
PsiClass containingClass = ((PsiMember)resolved).getContainingClass();
|
||||
if (containingClass != null && containingClass.isInterface()) return;
|
||||
|
||||
String description = JavaErrorMessages.message("static.member.accessed.via.instance.reference",
|
||||
JavaHighlightUtil.formatType(qualifierExpression.getType()),
|
||||
HighlightMessageUtil.getSymbolName(resolved, result.getSubstitutor()));
|
||||
String description = JavaErrorBundle.message("static.member.accessed.via.instance.reference",
|
||||
JavaHighlightUtil.formatType(qualifierExpression.getType()),
|
||||
HighlightMessageUtil.getSymbolName(resolved, result.getSubstitutor()));
|
||||
if (!onTheFly) {
|
||||
if (RemoveUnusedVariableUtil.checkSideEffects(qualifierExpression, null, new ArrayList<>())) {
|
||||
holder.registerProblem(expr, description);
|
||||
|
||||
@@ -1,7 +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.codeInspection.compiler;
|
||||
|
||||
import com.intellij.codeInsight.daemon.JavaErrorMessages;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorBundle;
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.daemon.impl.actions.SuppressByJavaCommentFix;
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.JavaHighlightUtil;
|
||||
@@ -90,9 +90,9 @@ public class JavacQuirksInspectionVisitor extends JavaElementVisitor {
|
||||
if (JavaSdkVersion.JDK_1_6.equals(JavaVersionService.getInstance().getJavaSdkVersion(assignment)) &&
|
||||
PsiType.getJavaLangObject(assignment.getManager(), assignment.getResolveScope()).equals(lType)) {
|
||||
String operatorText = operationSign.getText().substring(0, operationSign.getText().length() - 1);
|
||||
String message = JavaErrorMessages.message("binary.operator.not.applicable", operatorText,
|
||||
JavaHighlightUtil.formatType(lType),
|
||||
JavaHighlightUtil.formatType(rExpression.getType()));
|
||||
String message = JavaErrorBundle.message("binary.operator.not.applicable", operatorText,
|
||||
JavaHighlightUtil.formatType(lType),
|
||||
JavaHighlightUtil.formatType(rExpression.getType()));
|
||||
|
||||
myHolder.registerProblem(assignment, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
new ReplaceAssignmentOperatorWithAssignmentFix(operationSign.getText()));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package com.intellij.codeInspection.deprecation;
|
||||
|
||||
import com.intellij.codeInsight.ExternalAnnotationsManager;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorMessages;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorBundle;
|
||||
import com.intellij.codeInspection.ProblemHighlightType;
|
||||
import com.intellij.codeInspection.ProblemsHolder;
|
||||
import com.intellij.codeInspection.apiUsage.ApiUsageProcessor;
|
||||
@@ -91,10 +91,10 @@ public final class DeprecatedApiUsageProcessor implements ApiUsageProcessor {
|
||||
if (elementToHighlight == null) {
|
||||
return;
|
||||
}
|
||||
String description = JavaErrorMessages.message(myForRemoval
|
||||
String description = JavaErrorBundle.message(myForRemoval
|
||||
? "marked.for.removal.default.constructor"
|
||||
: "deprecated.default.constructor",
|
||||
instantiatedClass.getQualifiedName());
|
||||
instantiatedClass.getQualifiedName());
|
||||
myHolder.registerProblem(elementToHighlight, getDescription(description, myForRemoval, myHighlightType), myHighlightType);
|
||||
}
|
||||
}
|
||||
@@ -113,8 +113,8 @@ public final class DeprecatedApiUsageProcessor implements ApiUsageProcessor {
|
||||
}
|
||||
|
||||
if (overriddenMethod.isDeprecated() && myForRemoval == isForRemovalAttributeSet(overriddenMethod)) {
|
||||
String description = JavaErrorMessages.message(myForRemoval ? "overrides.marked.for.removal.method" : "overrides.deprecated.method",
|
||||
getPresentableName(aClass));
|
||||
String description = JavaErrorBundle.message(myForRemoval ? "overrides.marked.for.removal.method" : "overrides.deprecated.method",
|
||||
getPresentableName(aClass));
|
||||
myHolder.registerProblem(methodNameElement, getDescription(description, myForRemoval, myHighlightType), myHighlightType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package com.intellij.codeInspection.deprecation;
|
||||
|
||||
import com.intellij.codeInsight.AnnotationUtil;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorMessages;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorBundle;
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.HighlightMessageUtil;
|
||||
import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.LocalQuickFix;
|
||||
@@ -70,8 +70,8 @@ public abstract class DeprecationInspectionBase extends LocalInspectionTool {
|
||||
|
||||
if (ignoreImportStatements && isElementInsideImportStatement(elementToHighlight)) return;
|
||||
|
||||
String description = JavaErrorMessages.message(forRemoval ? "marked.for.removal.symbol" : "deprecated.symbol",
|
||||
getPresentableName(element));
|
||||
String description = JavaErrorBundle.message(forRemoval ? "marked.for.removal.symbol" : "deprecated.symbol",
|
||||
getPresentableName(element));
|
||||
|
||||
LocalQuickFix replacementQuickFix = getReplacementQuickFix(element, elementToHighlight);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package com.intellij.codeInspection.unneededThrows;
|
||||
|
||||
import com.intellij.codeInsight.ExceptionUtil;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorMessages;
|
||||
import com.intellij.codeInsight.daemon.JavaErrorBundle;
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.JavaHighlightUtil;
|
||||
import com.intellij.codeInsight.daemon.impl.quickfix.MethodThrowsFix;
|
||||
import com.intellij.codeInspection.*;
|
||||
@@ -96,7 +96,7 @@ public class RedundantThrowsDeclarationLocalInspection extends AbstractBaseJavaL
|
||||
|
||||
return candidates.stream().map(exceptionType -> {
|
||||
PsiJavaCodeReferenceElement reference = exceptionType.ref;
|
||||
String description = JavaErrorMessages.message("exception.is.never.thrown", JavaHighlightUtil.formatType(exceptionType.type));
|
||||
String description = JavaErrorBundle.message("exception.is.never.thrown", JavaHighlightUtil.formatType(exceptionType.type));
|
||||
LocalQuickFix quickFix = new MethodThrowsFix.Remove(method, exceptionType.type, false);
|
||||
return inspectionManager.createProblemDescriptor(reference, description, quickFix, ProblemHighlightType.LIKE_UNUSED_SYMBOL, true);
|
||||
}).toArray(ProblemDescriptor[]::new);
|
||||
|
||||
Reference in New Issue
Block a user