eclipse-xtext / eclipse-xtext/xtext
[Content Assist] does not work properly without org.eclipse.xtext.common.Terminals
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
Given is the following xtext grammar:
grammar org.xtext.example.mydsl.MyDsl
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
PolygonBasedShape:
shape = PolygonBasedNodeShape;
enum PolygonBasedNodeShape:
octagon | oval |
parallelogram | pentagon | plain | plaintext | point | polygon | primersite | promoter | proteasesite | proteinstab |
rarrow | record | rect | rectangle | restrictionsite | ribosite | rnastab | rpromoter;
Use Case1 (Content Assistant works properly):
- Create an empty test.mydsl file based on the grammar above and open it with the generated editor.
- Press Ctrl+Space to invoke the Content Assistant.
- Type the letter 'p' and 'r'.
The Content Assistant suggests correct proposals beginning with the prefix 'pr'.

Use Case2 (Content Assistant does not work properly):
- Create an empty test.mydsl file based on the grammar above and open it with the generated editor.
- Type the letter 'p' and 'r'.
- Press Ctrl+Space to invoke the Content Assistant.
The Content Assistant suggests incorrect proposals beginning with the prefix 'r'.

HINT: When modifying the grammar to use the "org.eclipse.xtext.common.Terminals", the content assistant works for both of the use cases properly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two content-assistant use cases with the MyDsl grammar shown, first without and then with org.eclipse.xtext.common.Terminals. Compare the proposals after typing “pr” before invoking Ctrl+Space versus invoking it afterward; done means both flows suggest entries matching the full prefix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100