Not all semantic completions are shown in case of multiple completion sorts.
The Spoofax runtime does the following to gather semantic completion proposals:
- Gather the possible completion ASTs based on the possible sorts that could be inserted in the place to complete.
- Call editor-analyze on each AST with the name to complete replaced by
completion123
.- Call editor-complete with each AST and retrieve the proposals.
- Concatenate the proposals and display them.
The problem is that in step 2 tasks are collected on the AST, which include completion tasks. Because the task collection is incremental, a task that was previously collected but is not collected any more is removed from the task engine. The result is that only the last completion task remains in the task engine. So when accessing the completion results in step 3, only the last completion task proposals are retrieved, not all.
To solve this either the runtime has to be changed to call editor-complete directly after editor-analyze, or an ugly solution with dynamic rules has to be created in each language.
Submitted by Gabriël Konat on 1 June 2013 at 14:17
Issue Log
On 17 June 2013 at 23:01 Gabriël Konat tagged @gohla
On 20 June 2013 at 22:58 Gabriël Konat removed tag @gohla
Log in to post comments