mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
Java: better error recovery on annotation parsing (IDEA-209573)
GitOrigin-RevId: a600121ecbd9fa6338237f0d3802486c7f8a5656
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0274e2096d
commit
1bdb332af2
@@ -0,0 +1,9 @@
|
||||
class Foo {
|
||||
|
||||
@<error descr="Cannot resolve symbol 'Deprec'">Deprec</error>(<error descr="Cannot resolve symbol 'ated'">ated</error><EOLError descr="',' or ')' expected"></EOLError>
|
||||
void a() {}
|
||||
|
||||
void b() {}
|
||||
|
||||
void c() {}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
@Ann(<error descr="Cannot find method 'value'">0</error>) class D {
|
||||
}
|
||||
|
||||
@In(""<error descr="Annotation attribute must be of the form 'name=value'">,</error> create = "")
|
||||
@In(<error descr="Annotation attribute of the form 'name=value' expected">""</error>, create = "")
|
||||
class ZZZ {
|
||||
}
|
||||
@interface In {
|
||||
|
||||
@@ -12,8 +12,6 @@ PsiJavaFile:FirstNameMissed.java
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiIdentifier:value1('value1')
|
||||
PsiErrorElement:Annotation attribute must be of the form 'name=value'
|
||||
<empty list>
|
||||
PsiJavaToken:COMMA(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiNameValuePair
|
||||
|
||||
@@ -12,8 +12,6 @@ test.java.file
|
||||
REFERENCE_PARAMETER_LIST
|
||||
<empty list>
|
||||
IDENTIFIER
|
||||
ERROR_ELEMENT
|
||||
<empty list>
|
||||
COMMA
|
||||
WHITE_SPACE
|
||||
NAME_VALUE_PAIR
|
||||
|
||||
@@ -38,6 +38,7 @@ public class AnnotationsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testReceiverParameters() { doTest(); }
|
||||
public void testAnnotationOverIncompleteCode() { doTest(); }
|
||||
public void testDeclarations() { doTest(); }
|
||||
public void testErrorRecovery() { doTest(); }
|
||||
|
||||
private void doTest() { doTest(getTestName(true) + ".java"); }
|
||||
private void doTest(String name) { doTest(BASE_PATH + "/" + name, false, false); }
|
||||
|
||||
Reference in New Issue
Block a user