mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] annotation.target.* messages moved to JavaPsiBundle.properties
GitOrigin-RevId: ae0914063db552bdbd24b10348ad6e92e9e83636
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d57fac1920
commit
d49d42c5d5
@@ -1,30 +1,5 @@
|
||||
add.explicit.type.arguments=Add explicit type arguments
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.ANNOTATION_TYPE=annotation type
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.CONSTRUCTOR=constructor
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.FIELD=field
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.LOCAL_VARIABLE=local variable
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.METHOD=method
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.MODULE=module
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.PACKAGE=package
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.PARAMETER=parameter
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.RECORD_COMPONENT=record component
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.TYPE=type
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.TYPE_PARAMETER=type parameter
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.TYPE_USE=type use
|
||||
|
||||
change.type.arguments=Change type arguments
|
||||
change.type.arguments.to.0=Change type arguments to <{0}>
|
||||
|
||||
|
||||
+2
-2
@@ -274,7 +274,7 @@ public final class AnnotationsHighlightUtil {
|
||||
PsiAnnotation.TargetType[] targets = AnnotationTargetUtil.getTargetsForLocation(owner);
|
||||
PsiAnnotation.TargetType applicable = AnnotationTargetUtil.findAnnotationTarget(container, targets);
|
||||
if (applicable == null) {
|
||||
String target = JavaAnalysisBundle.message("annotation.target." + targets[0]);
|
||||
String target = JavaPsiBundle.message("annotation.target." + targets[0]);
|
||||
String message = JavaErrorBundle.message("annotation.container.not.applicable", container.getName(), target);
|
||||
return createAnnotationError(annotationToCheck, message);
|
||||
}
|
||||
@@ -480,7 +480,7 @@ public final class AnnotationsHighlightUtil {
|
||||
private static @NotNull HighlightInfo.Builder createNotApplicableTargetInfo(@NotNull PsiAnnotation annotation,
|
||||
PsiJavaCodeReferenceElement nameRef,
|
||||
PsiAnnotation.TargetType[] targets) {
|
||||
String target = JavaAnalysisBundle.message("annotation.target." + targets[0]);
|
||||
String target = JavaPsiBundle.message("annotation.target." + targets[0]);
|
||||
String message = JavaErrorBundle.message("annotation.not.applicable", nameRef.getText(), target);
|
||||
HighlightInfo.Builder info = createAnnotationError(annotation, message);
|
||||
if (BaseIntentionAction.canModify(Objects.requireNonNull(annotation.resolveAnnotationType()))) {
|
||||
|
||||
@@ -291,4 +291,29 @@ error.incompatible.type.incompatible.equality.constraint=Incompatible equality c
|
||||
list.item.no.module=<no module>
|
||||
# {0} = localized element kind ('class', 'field', 'method', etc.); {1} = element name
|
||||
element.kind.and.name={0} {1}
|
||||
command.name.insert.block.statement=Insert Block Statement
|
||||
command.name.insert.block.statement=Insert Block Statement
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.ANNOTATION_TYPE=annotation type
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.CONSTRUCTOR=constructor
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.FIELD=field
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.LOCAL_VARIABLE=local variable
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.METHOD=method
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.MODULE=module
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.PACKAGE=package
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.PARAMETER=parameter
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.RECORD_COMPONENT=record component
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.TYPE=type
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.TYPE_PARAMETER=type parameter
|
||||
# suppress inspection "UnusedProperty"
|
||||
annotation.target.TYPE_USE=type use
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ package org.jetbrains.plugins.groovy.annotator.checkers;
|
||||
|
||||
import com.intellij.codeInsight.daemon.JavaErrorBundle;
|
||||
import com.intellij.codeInspection.util.InspectionMessage;
|
||||
import com.intellij.java.analysis.JavaAnalysisBundle;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.lang.annotation.AnnotationHolder;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
@@ -44,7 +44,7 @@ public abstract class CustomAnnotationChecker {
|
||||
PsiElement ownerToUse = owner instanceof PsiModifierList ? ((PsiElement)owner).getParent() : (PsiElement)owner;
|
||||
PsiAnnotation.TargetType[] elementTypeFields = GrAnnotationImpl.getApplicableElementTypeFields(ownerToUse);
|
||||
if (elementTypeFields.length != 0 && !GrAnnotationImpl.isAnnotationApplicableTo(annotation, elementTypeFields)) {
|
||||
String annotationTargetText = JavaAnalysisBundle.message("annotation.target." + elementTypeFields[0]);
|
||||
String annotationTargetText = JavaPsiBundle.message("annotation.target." + elementTypeFields[0]);
|
||||
GrCodeReferenceElement ref = annotation.getClassReference();
|
||||
return JavaErrorBundle.message("annotation.not.applicable", ref.getText(), annotationTargetText);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user