Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Slightly OT: Cleanup Problems view
Slightly OT: Cleanup Problems view [message #650067] Fri, 21 January 2011 15:35 Go to next message
Florian Philipp is currently offline Florian PhilippFriend
Messages: 43
Registered: February 2010
Member
Hello!

Maybe you can help me with a minor problem here:

I have a DeclarativeValidator which depends on some workspace state to do its work. When this state changes, errors from the last validation become stale. I could go into more detail but I don't think that's necessary for understanding my problem.

Basically, when this state changes, there can be some errors in the Problems view (you know, that tab with a list of all errors and warnings in your workspace) that are no longer valid. But because the validator does no longer touches the files which produce the errors (technically, they are no longer included into the build configuration), the error markers are not removed.

Long story short: What I want to achieve is that the Problems view get cleaned every time the validator is executed. Of course, syntax errors should not be removed but if I cannot separate them, it's not a big problem either if they disappear.

So:

1. How can I access the content of the Problems view?
2. If it is not obvious from the answer to question 1: Can I somehow separate errors produced by Xtext from errors produced by other components and maybe even syntax errors from validator errors?

Thanks in advance!
Florian Philipp
Re: Slightly OT: Cleanup Problems view [message #650126 is a reply to message #650067] Fri, 21 January 2011 19:50 Go to previous message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

as far as I know, the markers are attached to the IResource (obtaind from the editor). For marker creation etc. start digging at the org.eclipse.xtext.ui plugin (plugin.xml for the marker IDs) and the editor.validation package.

IResource provides a findMarkers and a deleteMarkers method.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Previous Topic:EMF and importing namespace
Next Topic:Two different DSL and the workflow
Goto Forum:
  


Current Time: Tue Apr 23 09:58:09 GMT 2024

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

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

Back to the top