mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +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) {
|
if (typeParameterList != null && typeParameterList.getTypeParameters().length > 0) {
|
||||||
HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(typeParameterList)
|
HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(typeParameterList)
|
||||||
.descriptionAndTooltip(JavaErrorBundle.message("record.special.method.type.parameters", methodTitle));
|
.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);
|
info.registerFix(action, null, null, null, null);
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ element.annotation=annotation
|
|||||||
element.anonymous_class=anonymous class
|
element.anonymous_class=anonymous class
|
||||||
element.class=class
|
element.class=class
|
||||||
element.type.parameter=type parameter
|
element.type.parameter=type parameter
|
||||||
|
element.type.parameters=type parameters
|
||||||
element.constant=constant field
|
element.constant=constant field
|
||||||
element.constructor=constructor
|
element.constructor=constructor
|
||||||
element.enum=enum
|
element.enum=enum
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ public enum JavaElementKind {
|
|||||||
THROWS_LIST("element.throws.list"),
|
THROWS_LIST("element.throws.list"),
|
||||||
TYPE_ARGUMENTS("element.type.arguments"),
|
TYPE_ARGUMENTS("element.type.arguments"),
|
||||||
TYPE_PARAMETER("element.type.parameter"),
|
TYPE_PARAMETER("element.type.parameter"),
|
||||||
|
TYPE_PARAMETERS("element.type.parameters"),
|
||||||
UNKNOWN("element.unknown"),
|
UNKNOWN("element.unknown"),
|
||||||
VARIABLE("element.variable");
|
VARIABLE("element.variable");
|
||||||
|
|
||||||
@@ -137,6 +138,9 @@ public enum JavaElementKind {
|
|||||||
}
|
}
|
||||||
return FIELD;
|
return FIELD;
|
||||||
}
|
}
|
||||||
|
if (element instanceof PsiTypeParameterList) {
|
||||||
|
return TYPE_PARAMETERS;
|
||||||
|
}
|
||||||
if (element instanceof PsiReferenceParameterList) {
|
if (element instanceof PsiReferenceParameterList) {
|
||||||
return TYPE_ARGUMENTS;
|
return TYPE_ARGUMENTS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// "Remove element" "true-preview"
|
// "Remove type parameters" "true-preview"
|
||||||
record R() {
|
record R() {
|
||||||
R() {}
|
R() {}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// "Remove element" "true-preview"
|
// "Remove type parameters" "true-preview"
|
||||||
record R() {
|
record R() {
|
||||||
<T, <caret>U> R() {}
|
<T, <caret>U> R() {}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user