| Summary: | AbstractContentAssistParser.getFollowElements() fails to find element when error recovery is involved | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Martin Schnabel <mb0> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mb0, sebastian.zarnekow |
| Version: | 1.0.0 | Flags: | sebastian.zarnekow:
helios+
|
| Target Milestone: | SR1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
The input
class A extends |B {
}
produces the valid proposal A.
Can you confirm, that the bug is reproducable with the latest version from CVS Head?
I'ld assume the issue is related to bug 314143
yes it it works with cvs head. thanks! and sorry for not testing with head before reporting, xtext set-up takes way to long with 80 kb/s downstream so only checked if AbstractContentAssistParser changed. Thanks for testing with HEAD. |
Build Identifier: i have a grammar[0] with class definitions similar to java. the grammar is heavily dependent on backtracking and thus makes use of error recovery very often. when the content assist parser tries to find the following token after "extends" it will return an empty list. public class A extends |B { } i took a look at org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser.getFollowElements(AbstractInternalContentAssistParser, AbstractElement, String[], int) the first time error recovery kicks in "wasRecovering" is set to true in line 128. it will never be set to false again for the same ruleName. thus it will never set "consumedSomething" for my parser rule in line 112. however when i simply add "wasRecovering = false" inside endErrorRecovery method in line 124 it will work like i would expect. but because it is called wasRecovering and not isRecovering i am not sure if the code would still work as intended after my simple fix. [0] http://new.axdt.org/browser/as3/as3-runtime/src/main/java/org/axdt/as3/As3.xtext Reproducible: Always