| Summary: | [ContentAssist] Provide CA for terminal rules | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Moritz Eysholdt <moritz.eysholdt> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | mirko, sebastian.zarnekow |
| Version: | 1.0.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
100's of synthetic proposals do not seem to be helpful. See also 309303 *** This bug has been marked as a duplicate of bug 309303 *** I am not sure whether this is really a duplicate of 309303. There is a difference in the content assist support between inlined keywords and terminal rules. For example, grammar ws.raner.xtext.Fish with org.eclipse.xtext.common.Terminals generate fish "http://raner.ws/xtext/Fish" Fish: I LIKE fish=QualifiedFish; QualifiedFish: qualifier=Qualifier 'fish'; enum Qualifier: one|two|red|blue; terminal I: 'I'; terminal LIKE: 'like'; will provide no content assist support, but when the terminal rules are replaced by keywords content assist will work: grammar ws.raner.xtext.Fish with org.eclipse.xtext.common.Terminals generate fish "http://raner.ws/xtext/Fish" Fish: 'I' 'like' fish=QualifiedFish; QualifiedFish: qualifier=Qualifier 'fish'; enum Qualifier: one|two|red|blue; See http://www.eclipse.org/forums/index.php/mv/msg/220809/ for further discussion of this topic. My findings were based on Xtext 2.0.0, so this is still an ongoing problem. |
Currently, there is no content assist for terminal/datatype rules. However, people sometimes use them to group keywords or allow a particular ambiguity of keywords. Examples1: "foo" | "bar"; terminal Examples2: "." | (" " | "\n"); It can be analyzed statically how many possible values for a datatype/terminal rule there are. How about providing content assist if there are... let's say... less then a hundred?