Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Do we have a way to override the markers which XText use?? the problem is that xtext marker does no(Do we have a way to override the markers which XText use?? the problem is that xtext marker does not propagate its effect to the view, ex(Syntax errors does not appear on Problems view))
Do we have a way to override the markers which XText use?? the problem is that xtext marker does no [message #1699109] Sun, 21 June 2015 11:29 Go to next message
kimi raikonnan is currently offline kimi raikonnanFriend
Messages: 145
Registered: June 2015
Senior Member
Do we have a way to override the markers which XText use??
The problem is that xtext marker does not propagate its effect to the views
ex : (Syntax errors does not appear on Problems view)
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699111 is a reply to message #1699109] Sun, 21 June 2015 11:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
hi,

hi the markers are defined in the plugin.xml


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699112 is a reply to message #1699111] Sun, 21 June 2015 12:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
btw they should be in the problem view if you save the file

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699113 is a reply to message #1699111] Sun, 21 June 2015 12:38 Go to previous messageGo to next message
kimi raikonnan is currently offline kimi raikonnanFriend
Messages: 145
Registered: June 2015
Senior Member
Hi Christian,
Thanks for your quick reply.
My problem is that i am getting syntax error in the editor but the error marker does not appear on the project browser, i tried to play around plugin.xml but it seems like my changes have no effect
My expectation is that by adding error marker that the problems view will be updated with this error and also the project browser which does not happen

Also Save the file does not produce them in the problems view

[Updated on: Sun, 21 June 2015 12:40]

Report message to a moderator

Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699114 is a reply to message #1699113] Sun, 21 June 2015 12:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi,

can you give a sample grammar and model


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699115 is a reply to message #1699114] Sun, 21 June 2015 12:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
p.s. are you sure you have build automatically on?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699662 is a reply to message #1699115] Thu, 25 June 2015 15:47 Go to previous messageGo to next message
kimi raikonnan is currently offline kimi raikonnanFriend
Messages: 145
Registered: June 2015
Senior Member
Hi Christian,
Thanks for your help, my first problem resolved,
Another issue with the marker, currently i am trying to import files and parse them using the code below

XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);
Resource resource = resourceSet.createResource(URI.createURI(filePath));
resource.load(inputStream, resourceSet.getLoadOptions());

And all of them contains syntax errors.
The issue is the markers did not appear on the files in project browsers, and by opening any one of them in the editor, the markers appears on all of them (without extra parse)
example:
i imported "a.dsl", "b.dsl" and "c.dsl" and all of them contains syntax errors, but no markers will appear in the project browser.
by opening "c.dsl" in the editor the markers will appear in all of them.
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699663 is a reply to message #1699662] Thu, 25 June 2015 15:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi can you share reproducable code

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699836 is a reply to message #1699663] Sat, 27 June 2015 03:28 Go to previous messageGo to next message
kimi raikonnan is currently offline kimi raikonnanFriend
Messages: 145
Registered: June 2015
Senior Member
I am using the code below to parse files, the issue is that markers did not appear before opening any one of them in the editor.

String inputData = Files.toString(file, Charsets.UTF_8);
InputStream inputStream = new LazyStringInputStream(inputData == null ? "" : inputData.toString());
Injector injector = new DslStandaloneSetup().createInjectorAndDoEMFRegistration();
XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);
resourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
String filePath = file.getAbsolutePath();
Resource resource = resourceSet.createResource(URI.createURI(filePath));;
resource.load(inputStream, resourceSet.getLoadOptions());
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699837 is a reply to message #1699836] Sat, 27 June 2015 03:56 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
I need an example grammar and model of course

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699862 is a reply to message #1699836] Sat, 27 June 2015 18:06 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
You may never use the StandaloneSetup from within Eclipse. This will
screw up the validator configuration thus you don't see the markers anymore.

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Find help at http://xtext.itemis.com or xtext(@)itemis.com
Blog: zarnekow.blogspot.com
Twitter: @szarnekow
Google+: https://www.google.com/+SebastianZarnekow
Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699874 is a reply to message #1699862] Sun, 28 June 2015 09:26 Go to previous messageGo to next message
kimi raikonnan is currently offline kimi raikonnanFriend
Messages: 145
Registered: June 2015
Senior Member
what is the relation between the grammer and that the markers does not appear at correct time ?!!

I think they are completely irrelevant

[Updated on: Sun, 28 June 2015 09:29]

Report message to a moderator

Re: Do we have a way to override the markers which XText use?? the problem is that xtext marker doe [message #1699876 is a reply to message #1699874] Sun, 28 June 2015 09:32 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
If you use xtext and do not such strange things as calling standalone setups from within eclipse everthing should work fine out of the box

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Mapping Xtext to Java code
Next Topic:can I embed other editor in xtext editor?
Goto Forum:
  


Current Time: Tue Mar 19 09:12:10 GMT 2024

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

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

Back to the top