Xtext Display line numbers [message #1727819] |
Mon, 28 March 2016 02:21  |
Eclipse User |
|
|
|
I want to display the line number where the error has occurred.
For example, if I have the grammar:
Quote:
Model:
defs += myTestMethod*
;
myTestMethod:
'test' name=ID ';'
;
In my config file, I have the following configuration in test.mak:
Quote:
test start;
test sleep;
test wakeup;
In my testValidator.xtend:
class testValidator {
def checkTest()
{
if (name == "wakeup")
print.error("wakeup is not supported.");
}
}
In my error message, I want to display the file name and line number where the "wakeup" is configured.
I am looking for something like this:
"ERROR: test.mak, line 3: no name configured.
I am looking for ways to display the filename and line number (in bold).
[Updated on: Mon, 28 March 2016 03:44] by Moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08113 seconds