Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generating multiple errors from a ValueConverter
Generating multiple errors from a ValueConverter [message #1569337] Sat, 17 January 2015 12:07
K M is currently offline K MFriend
Messages: 7
Registered: December 2014
Junior Member
I need to embed a small DSL inside a host DSL (they use different token definitions and so can't be just merged). My current approach is to use a ValueConverter. Both DSLs share the same model. The host DSL parses the embedded DSL fragment as a string, and then the value converter parses the string to produce an element of the model.

This seems to work OK. However, whilst parsing the embedded DSL fragment I may get one or more syntax errors. I can retrieve these and display them on the console. But what I'd really like to do is merge these with any errors produced by the main parser (fixing up offsets to be correct for the original source). Now I can add the Diagnostic list I retrieve from the embedded resource I created to the resource being used whilst parsing the host DSL. But the errors don't show up in the IDE, presumably because I need to create markers for these as well? So is it possible to create markers such as these from within a ValueConverter.

I could obviously just raise a ValueConverterException, but I'd be losing information, both in terms of offsets and multiple errors.
Previous Topic:Locally redefining terminals
Next Topic:Issues importing into Eclipse via Git, MWE2 version problem?
Goto Forum:
  


Current Time: Fri Apr 26 20:29:45 GMT 2024

Powered by FUDForum. Page generated in 0.03670 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top