|
|
Re: quick fix for terminal rules in xtext [message #1698467 is a reply to message #1698453] |
Mon, 15 June 2015 19:44 |
|
p.s. you could use a SyntaxErrorMessageProvider to create the code necessary for the quickfix, but depending on the situation it may be pita to find out that you are in the quickfix situation
public class MyDslSyntaxErrorMessageProvider extends SyntaxErrorMessageProvider {
public static final String YOUR_ERROR_CODE = "YOUR_ERROR_CODE";
@Override
public SyntaxErrorMessage getSyntaxErrorMessage(IParserErrorContext context) {
if (/* find out */) {
return new SyntaxErrorMessage(context.getDefaultMessage(), YOUR_ERROR_CODE);
}
SyntaxErrorMessage syntaxErrorMessage = super.getSyntaxErrorMessage(context);
return syntaxErrorMessage;
}
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02445 seconds