Custom disambiguator is not invoked by testing plugin
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
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.
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
Log in to post comments