The Testing plugin does not invoke a custom disambiguator, when present.
Makes it hard to test a custom disambiguation filter :-)

Probably easy to add (only the Stratego code of testing plugin needs to be modified, I think).

Submitted by Tobi Vollebregt on 14 September 2011 at 14:35

On 14 September 2011 at 14:35 Tobi Vollebregt tagged testing

On 14 September 2011 at 22:49 Lennart Kats commented:

Ah. Yes, this shouldn’t be hard to fix. I think it should happen at the Java level though, since it should also work in the editor. Normally, SGLRParseController.parse() calls the CustomDisambiguator. In the testing language, the SGLRParseController is bypassed. So I guess either the FragmentParser should call it too, or the call should be moved from the SGLRParseController class to the AbstractSGLRI class.

On 15 September 2011 at 09:08 Tobi Vollebregt tagged @tvo

On 15 September 2011 at 09:59 Tobi Vollebregt commented:

Appeared to be more involving anyway. I moved the CustomDisambiguator to AbstractSGLRI, but this required a SourceAttachment with an IResource to always be present (because the disambiguator strategy must be passed path + project-path). This wasn’t present when using parse-spt-string, because the dummy filename “string” is not associated with any IResrouce.

So I remove parse-spt-string, replaced it by parse-spt-file, so that an IResource is (usually?) available, and things work out reasonably well…

Feel free to undo/modify if parse-spt-string is more desired than disambiguator support in testing language or you know a better solution :)

See SVN r23355

On 15 September 2011 at 09:59 Tobi Vollebregt closed this issue.

On 22 December 2011 at 16:56 Lennart Kats tagged 1.0

Log in to post comments