mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 23:31:05 +07:00
[java] define "type parameters" element kind
GitOrigin-RevId: 883cd7f25b3ca5a3eac311b3c9b8b90fc3334653
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9e22b48c16
commit
f96bb8f6d4
@@ -2274,7 +2274,7 @@ public final class HighlightMethodUtil {
|
||||
if (typeParameterList != null && typeParameterList.getTypeParameters().length > 0) {
|
||||
HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(typeParameterList)
|
||||
.descriptionAndTooltip(JavaErrorBundle.message("record.special.method.type.parameters", methodTitle));
|
||||
IntentionAction action = QuickFixFactory.getInstance().createDeleteFix(typeParameterList.getTypeParameters());
|
||||
IntentionAction action = QuickFixFactory.getInstance().createDeleteFix(typeParameterList);
|
||||
info.registerFix(action, null, null, null, null);
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ element.annotation=annotation
|
||||
element.anonymous_class=anonymous class
|
||||
element.class=class
|
||||
element.type.parameter=type parameter
|
||||
element.type.parameters=type parameters
|
||||
element.constant=constant field
|
||||
element.constructor=constructor
|
||||
element.enum=enum
|
||||
|
||||
@@ -45,6 +45,7 @@ public enum JavaElementKind {
|
||||
THROWS_LIST("element.throws.list"),
|
||||
TYPE_ARGUMENTS("element.type.arguments"),
|
||||
TYPE_PARAMETER("element.type.parameter"),
|
||||
TYPE_PARAMETERS("element.type.parameters"),
|
||||
UNKNOWN("element.unknown"),
|
||||
VARIABLE("element.variable");
|
||||
|
||||
@@ -137,6 +138,9 @@ public enum JavaElementKind {
|
||||
}
|
||||
return FIELD;
|
||||
}
|
||||
if (element instanceof PsiTypeParameterList) {
|
||||
return TYPE_PARAMETERS;
|
||||
}
|
||||
if (element instanceof PsiReferenceParameterList) {
|
||||
return TYPE_ARGUMENTS;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove element" "true-preview"
|
||||
// "Remove type parameters" "true-preview"
|
||||
record R() {
|
||||
R() {}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove element" "true-preview"
|
||||
// "Remove type parameters" "true-preview"
|
||||
record R() {
|
||||
<T, <caret>U> R() {}
|
||||
}
|
||||
Reference in New Issue
Block a user