mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
New Java parser (completion hack)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
PsiJavaFile:CompletionHack2.java
|
||||
PsiJavaToken:LBRACE('{')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiAnnotationMethod:foo
|
||||
PsiModifierList:
|
||||
<empty list>
|
||||
PsiTypeParameterList
|
||||
<empty list>
|
||||
PsiTypeElement:String
|
||||
PsiJavaCodeReferenceElement:String
|
||||
PsiIdentifier:String('String')
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiIdentifier:foo('foo')
|
||||
PsiParameterList:()
|
||||
PsiJavaToken:LPARENTH('(')
|
||||
PsiJavaToken:RPARENTH(')')
|
||||
PsiReferenceList
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:'{' or ';' expected
|
||||
PsiIdentifier:def('def')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiJavaToken:RBRACE('}')
|
||||
+1
@@ -96,6 +96,7 @@ public class DeclarationParserTest extends JavaParsingTestCase {
|
||||
public void testErrors() { doParserTest("{ public static <error descr=\"2\">protected int f1 = 0; }", false, false); }
|
||||
public void testCompletionHack0() { doParserTest("{ <X IntelliJIdeaRulezz>\n String s = \"\"; }", false, false); }
|
||||
public void testCompletionHack1() { doParserTest("{ <X\n String s = \"\"; }", false, false); }
|
||||
public void testCompletionHack2() { doParserTest("{ String foo() def }", true, false); }
|
||||
public void testWildcardParsing() { doParserTest("{ List<? extends B> x(Collection<? super B> x); }", false, false); }
|
||||
public void testParameterAnnotation() { doParserTest("{ void foo (@Annotation(value=77) int param) {} }", false, false); }
|
||||
public void testParameterizedMethod() { doParserTest("{ @Nullable <T> T bar() {} }", false, false); }
|
||||
|
||||
Reference in New Issue
Block a user