Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Notification for XML Validation Builder
Notification for XML Validation Builder [message #1048706] Wed, 24 April 2013 21:24 Go to next message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey,

I added the xml validation to the build process of my project. This is the additional content of my .project file.

<buildCommand>
  <name>org.eclipse.wst.validation.validationbuilder</name>
  <arguments></arguments>
</buildCommand>


Now all xml files are validated properly. After this process has been completed, I would like to be notified. Can I register a listener, that notifies me if the process is done? Thank you!

Kon

[Updated on: Wed, 24 April 2013 21:26]

Report message to a moderator

Re: Notification for XML Validation Builder [message #1048907 is a reply to message #1048706] Thu, 25 April 2013 05:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Kon,

Best to ask on the Web Tools forum. I doubt there are listeners for
such specific details. What are you hoping to accomplish with such a
listener?


On 24/04/2013 11:24 PM, kon fri wrote:
> Hey,
>
> I added the xml validation to the build process of my project. This is
> the additional content of my .project file.
>
> <buildCommand>
> <name>org.eclipse.wst.validation.validationbuilder</name>
> <arguments></arguments>
> </buildCommand>
>
> Now all xml files are validated properly. After this process has been
> completed, I would like to be notified. Can I register a listener,
> that notifies me if the process is done? Thank you!
>
> Kon


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Notification for XML Validation Builder [message #1048969 is a reply to message #1048706] Thu, 25 April 2013 07:18 Go to previous messageGo to next message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey Ed,

the xml validation process creates error markers if the file are not well formed nor valid (a schema file is present). I get this entire process with just four xml lines.

Afterwards I would like to know if this process went well by checking any presents of error markers. Basically not error markers make sure that the xml files are at least well formed and valid. On the next step, I can perform some semantical xml validation, e.g. if an element that is references by name is really present. If not, then I also create error markers.

I'm not sure if this use case can be implemented with a different approach.

Thank you.

Kon
Re: Notification for XML Validation Builder [message #1049808 is a reply to message #1048969] Fri, 26 April 2013 09:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Kon,

It's possible to listen to the workspace as a whole and check the deltas
for error markers being added or removed for the files of interest. But
it sounds more like what you do should be a builder... I think you
could set it up so your builder would happen after the XML validator has
done it's job; not sure how, but I'm pretty sure that's possible.


On 25/04/2013 9:18 AM, kon fri wrote:
> Hey Ed,
>
> the xml validation process creates error markers if the file are not
> well formed nor valid (a schema file is present). I get this entire
> process with just four xml lines.
>
> Afterwards I would like to know if this process went well by checking
> any presents of error markers. Basically not error markers make sure
> that the xml files are at least well formed and valid. On the next
> step, I can perform some semantical xml validation, e.g. if an element
> that is references by name is really present. If not, then I also
> create error markers.
>
> I'm not sure if this use case can be implemented with a different
> approach.
> Thank you.
>
> Kon


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Notification for XML Validation Builder [message #1053551 is a reply to message #1049808] Mon, 06 May 2013 13:28 Go to previous message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey Ed,

thanks for your suggestion. I used http://eclipse.1072660.n5.nabble.com/Wait-for-build-to-complete-and-check-if-errors-td57716.html approach to execute my task after the build has been completed. More information about the build process can be found here http://www.eclipse.org/articles/Article-Builders/builders.html. Thank you.

Kon
Previous Topic:Mapping from editorContribution to menuContribution
Next Topic:Problem Updating Eclipse Java EE, Juno SR1
Goto Forum:
  


Current Time: Sat Apr 20 00:31:59 GMT 2024

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

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

Back to the top