Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to disable Parser-Markers in Project Explorer
How to disable Parser-Markers in Project Explorer [message #1810343] Thu, 08 August 2019 14:17 Go to next message
Konrad Jünemann is currently offline Konrad JünemannFriend
Messages: 31
Registered: December 2018
Member
Hi,

for my DSL I would like to implement the option to disable the creation of any problem markers for found problems in the problems view and project explorer. For the problems view, I can just use a filter in the UI. However, no such option exists for the project explorer.

How would I disable the generation of problem markers for my language? Ideally, the errors would still exist, but not shown, so that parsing and validation is still performed.

Regards,
Konrad
Re: How to disable Parser-Markers in Project Explorer [message #1810352 is a reply to message #1810343] Thu, 08 August 2019 16:27 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13124
Registered: July 2009
Senior Member
hi, i wonder what your actual usecase for that. maybe the solution you have in mind is the wrong one.
markers are created by org.eclipse.xtext.ui.editor.validation.MarkerCreator.createMarker(Issue, IResource, String)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to disable Parser-Markers in Project Explorer [message #1810356 is a reply to message #1810352] Thu, 08 August 2019 18:13 Go to previous messageGo to next message
Konrad Jünemann is currently offline Konrad JünemannFriend
Messages: 31
Registered: December 2018
Member
Hi Christian,

I guess the case is special. We use two separate DSLs in our project, a business DSL A and a technical DSL B. A files compile to B files, which are then compiled to all sorts of SQL scripts and so on. This approach is kinda similar to XTend -> Java -> Bytecode.

The actual build process is standalone, though. So during the typical business day, a user *rarely* requires the later files (of type B or SQLs), although occasions arise where you would like to look into those.

However, our infrastructure is "a little" weak in the context I am working in. In order to cope with this, I have to keep the number of generated files to an absolute minimum as a simple eclipse-refresh (unrelated to XTtext) takes multiple seconds to complete (CPU power is fine). So, I build a feature to turn off generation of B files (and SQL files), as typically you don't need those. I used the IShouldGenerate approach, as recommended by you in another thread.

However, as some (but few) B files are created manually *and* relate to generated B files, there will always be errors due to unresolved B-references. I don't want users to bother with those if they are business level users, who will at most edit A-files.

My ideal solution would be to generate *all* B files or to not allow not-generated B files to refer to generated B files, but we are not quite there.

OK, wall of text. I am eager to hear if you have any other recommendations - otherwise thank you a lot for your hint!

Regards,
Konrad
Re: How to disable Parser-Markers in Project Explorer [message #1810369 is a reply to message #1810356] Thu, 08 August 2019 19:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13124
Registered: July 2009
Senior Member
Depending on what the problem with generation performance is you could consider generation stubs only as Xtend does it for methods with errors

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to disable Parser-Markers in Project Explorer [message #1810406 is a reply to message #1810369] Fri, 09 August 2019 15:53 Go to previous message
Konrad Jünemann is currently offline Konrad JünemannFriend
Messages: 31
Registered: December 2018
Member
Great idea, thank you. I will try it out.

Your hint with the MarkerCreator works perfectly, too.

Thanks!
Previous Topic:LSP -> Debugger implementation
Next Topic:Maven build issues
Goto Forum:
  


Current Time: Tue Sep 17 22:37:00 GMT 2019

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

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

Back to the top