mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-54397 (type annotations in override/implement)
This commit is contained in:
@@ -294,7 +294,7 @@ public class PsiElementFactoryImpl extends PsiJavaParserFacadeImpl implements Ps
|
||||
|
||||
@Override
|
||||
public PsiParameter createParameter(@NotNull @NonNls String name, PsiType type, PsiElement context) throws IncorrectOperationException {
|
||||
final PsiMethod psiMethod = createMethodFromText("void f(" + type.getCanonicalText() + " " + name + ") {}", context);
|
||||
final PsiMethod psiMethod = createMethodFromText("void f(" + type.getCanonicalText(true) + " " + name + ") {}", context);
|
||||
final PsiParameter[] parameters = psiMethod.getParameterList().getParameters();
|
||||
return parameters[0];
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// "Implement Methods" "true"
|
||||
import java.lang.annotation.*;
|
||||
import java.util.*;
|
||||
|
||||
@Target(ElementType.TYPE_USE)
|
||||
@interface TA { int value() default 0; }
|
||||
|
||||
interface I {
|
||||
@TA List<@TA String> i(@TA int p1, @TA(1) int @TA(2) [] p2 @TA(3) []) throws @TA IllegalArgumentException;
|
||||
}
|
||||
|
||||
class C implements I {
|
||||
@Override
|
||||
public @TA List<@TA String> i(@TA int p1, @TA(1) int @TA(2) [] @TA(3) [] p2) throws @TA IllegalArgumentException {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Implement Methods" "true"
|
||||
import java.lang.annotation.*;
|
||||
import java.util.*;
|
||||
|
||||
@Target(ElementType.TYPE_USE)
|
||||
@interface TA { int value() default 0; }
|
||||
|
||||
interface I {
|
||||
@TA List<@TA String> i(@TA int p1, @TA(1) int @TA(2) [] p2 @TA(3) []) throws @TA IllegalArgumentException;
|
||||
}
|
||||
|
||||
<caret>class C implements I {
|
||||
}
|
||||
Reference in New Issue
Block a user