If I start with the following element, select var1 (though it happens on either of them), and then press ctrl-space it gives me the list of suitable replacements.


[[ScriptingVariable]].replace(var1, var2);


However selecting a lexical syntax completion doesn’t do anything but give an error sound, and selecting a context-free completion leads to a weird result. For example selecting the node that simply inserts “true” gives the following result:


[[ScriptingVariable]].replace(true, [[ScriptingVariable]].replace(var1, var2);


As can be seen it somehow retains the old version and seems to place it at some arbitrary location in the line.

This seems to occur when using “complex lists” (<{var ", "}*>), because if the amount of arguments for the method replace is hardcoded as in Sort.Cons = <<ScriptingVariable>.replace(<ScriptingVariable>, <ScriptingVariable>)>, selecting either of the vars and pressing ctrl-space triggers no completions at all.


I’m currently using the Beta release of Spoofax Core in Eclipse

Submitted by Jeffrey Goderie on 20 April 2016 at 17:10

On 20 April 2016 at 18:15 Eduardo Amorim commented:

I imagine it is because of the layout preservation algorithm that I depend on (as you said, it just keeps the old version instead of adding the completed version).
I fixed some of these issues already which has not been committed yet, but I’ll try your example to see if it has been fixed already or not.
Maybe you could post issues related with completions in: https://yellowgrass.org/project/SpoofaxWithCore, as it’s still a beta feature available only in Core. (No need to move this issue though)

Log in to post comments