Community
Participate
Working Groups
Created attachment 174391 [details] grammar producing the bug Using the attached grammar I only hide the ML_COMMENT rule for fully qualified name imports to allow the following: package org./*xtext.*/workshopmaterial This, however will be parsed to the package name "org. workshopmaterial". Further import calls will only work if the import statement contains a comment at the exact same position due to the magically inserted whitespace: import org./*xtext.*/workshopmaterial.Handout (will work) property exercises org/*.xtext*/.workshopmaterial.Exercise (will not work) Attached are the grammar and an example file reproducing the bug.
Created attachment 174392 [details] example model with the bug the outline view shows the magically inserted whitespace
Your value converter has to ensure that the space is not inserted. The default implementation will insert a space in a data type value if both data type values had something hidden between them. DT: 'key' 'word'; key/*foo*/word becomes key word instead of keyword.
I'ld like to close this one as won't fix. Any objections? (Flagged as assigned to be able to find it).
Could a paragraph be added in the value converter section/datatype rule section of the documentation? The DefaultTerminalsConverter is found easily enough, but currently I am not sure if the same is true for the default converter for datatype rules returning a string. As the qualified name is heavily used, this behaviour (which is not immediately obvious) should be explained. Otherwise, others may stumble upon the problem that names suddenly cannot be resolved anymore.
You can close it. Also, I accompany Alex: Would be nice to have a hint in the documentation.
See comment #4 and comment #5
If I see it correctly, it is not a (default) value converter that inserts the spaces. It is LinkingHelper#getCrossRefNodeAsString for hidden tokens.
Should not be a problem with the new QualifiedNameValueConverter. Added a section in the docs for the value converter.
Note, that the documentation of data type rules still says: "This looks similar to the terminal rule we've defined above", but this definition has been removed. This sentence could simply be removed.
Fixed in HEAD.
Closing bug which were set to RESOLVED before Eclipse Neon.0.