Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
add.explicit.type.arguments:
text: Add explicit type arguments
annotation.target.ANNOTATION_TYPE:
text: annotation type
annotation.target.CONSTRUCTOR:
text: constructor
annotation.target.FIELD:
text: field
annotation.target.LOCAL_VARIABLE:
text: local variable
annotation.target.METHOD:
text: method
annotation.target.MODULE:
text: module
annotation.target.PACKAGE:
text: package
annotation.target.PARAMETER:
text: parameter
annotation.target.RECORD_COMPONENT:
text: record component
annotation.target.TYPE:
text: type
annotation.target.TYPE_PARAMETER:
text: type parameter
annotation.target.TYPE_USE:
text: type use
change.type.arguments:
text: Change type arguments
change.type.arguments.to.0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,9 @@ else if (isAnnotationRepeatedTwice(owner, annotationType.getQualifiedName())) {
PsiAnnotation.TargetType[] targets = AnnotationTargetUtil.getTargetsForLocation(owner);
PsiAnnotation.TargetType applicable = AnnotationTargetUtil.findAnnotationTarget(container, targets);
if (applicable == null) {
String target = JavaErrorBundle.message("annotation.target." + targets[0]);
return annotationError(
annotationToCheck,
JavaErrorLocalize.annotationContainerNotApplicable(container.getName(), target)
JavaErrorLocalize.annotationContainerNotApplicable(container.getName(), targets[0].getPresentableText())
);
}
}
Expand Down Expand Up @@ -446,8 +445,7 @@ public static HighlightInfo checkApplicability(@Nonnull PsiAnnotation annotation
}

if (applicable == null) {
String target = JavaErrorBundle.message("annotation.target." + targets[0]);
return annotationError(annotation, JavaErrorLocalize.annotationNotApplicable(nameRef.getText(), target));
return annotationError(annotation, JavaErrorLocalize.annotationNotApplicable(nameRef.getText(), targets[0].getPresentableText()));
}

if (applicable == PsiAnnotation.TargetType.TYPE_USE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ else if (referenceElements.length != 0 && element != referenceElements[0]
return null;
}

@RequiredReadAction
public static HighlightInfo checkInterfaceMultipleInheritance(PsiClass aClass) {
PsiClassType[] types = aClass.getSuperTypes();
if (types.length < 2) {
Expand Down Expand Up @@ -1587,6 +1588,7 @@ public static HighlightInfo checkGenericCannotExtendException(PsiReferenceList l
return null;
}

@RequiredReadAction
public static HighlightInfo checkEnumMustNotBeLocal(PsiClass aClass) {
if (!aClass.isEnum()) {
return null;
Expand All @@ -1602,6 +1604,7 @@ public static HighlightInfo checkEnumMustNotBeLocal(PsiClass aClass) {
return null;
}

@RequiredReadAction
public static HighlightInfo checkEnumWithoutConstantsCantHaveAbstractMethods(PsiClass aClass) {
if (!aClass.isEnum()) {
return null;
Expand Down Expand Up @@ -1787,6 +1790,7 @@ public static HighlightInfo checkInferredIntersections(PsiSubstitutor substituto
return null;
}

@RequiredReadAction
public static HighlightInfo areSupersAccessible(@Nonnull PsiClass aClass) {
return areSupersAccessible(aClass, aClass.getResolveScope(), HighlightNamesUtil.getClassDeclarationTextRange(aClass), true);
}
Expand Down
Loading
Loading