Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Using XML Validation Builder
Using XML Validation Builder [message #147737] Fri, 18 November 2005 10:48 Go to next message
Eclipse UserFriend
Originally posted by: richcar.us.ibm.com

Hi,

I want to invoke the XML validation builder whenever a file with extension
xyz is saved (these files contain XML). I also want to add the XML
validation builder to my project nature.

I believe the XML validation builder's id is
"org.eclipse.wst.validation.validationbuilder". If that's true, then I
can add the builder to my project nature in the normal way. I still need
to know, however, how to indicate to the builder that .xyz files should be
validated on save. Any guidance is appreciated.

Thanks,
Rich
Re: Using XML Validation Builder [message #147807 is a reply to message #147737] Sat, 19 November 2005 03:15 Go to previous messageGo to next message
Eclipse UserFriend
See bug 86385. Vote wisely.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=86385
Re: Using XML Validation Builder [message #148154 is a reply to message #147807] Mon, 21 November 2005 09:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richcar.us.ibm.com

Craig,

Thanks for your quick response. Let me see if I understand what I should
do to specify a new file extension (.xyz) to the XML validation builder
before bug 86385 is addressed.

My goal is to have the XML validation builder automatically run whenever a
xyz file is saved in projects that have nature "MyNature". In my plugin
project's plugin.xml file, I could implement the following extension:

<extension
id="xzyValidator"
name="XYZ_VALIDATOR"
point="org.eclipse.wst.validation.validator">
<validator>
<projectNature
include="false"
id="com.mycompany.MyNature">
</projectNature>
<filter
objectClass="org.eclipse.core.resources.IFile"
caseSensitive="false"
nameFilter="*.xyz">
</filter>
<helper
class="org.eclipse.wst.xml.core.internal.validation.core.Helper ">
</helper>
<run
class="org.eclipse.wst.xml.ui.internal.validation.Validator ">
</run>
</validator
</extension>

Did I correctly specify the helper and run classes? What does the
"include" attribute in the "projectNature" element do? More generally,
when I view the validator extension point in the plugin manifest editor,
almost none of the elements or attributes have descriptive text associated
with them. Does the complete documentation for the extension point exist
elsewhere?

Thanks,
Rich
Re: Using XML Validation Builder [message #148766 is a reply to message #148154] Wed, 23 November 2005 21:02 Go to previous message
Eclipse UserFriend
> Did I correctly specify the helper and run classes? What does the
> "include" attribute in the "projectNature" element do? More generally,
> when I view the validator extension point in the plugin manifest editor,
> almost none of the elements or attributes have descriptive text associated
> with them. Does the complete documentation for the extension point exist
> elsewhere?

I think your approach is correct ... sadly it's the best that can be done
until the aforementioned bug is addressed. Basically you need to provide
a plugin that 'pre-reqs' the XML validator plugin and supply your own
'copy' of the extension point to supply the 'xyz' file extension.

I'm not aware of any documentation for this extension point. This
extension point is _NOT_ API so it could change in the future without
warning.
Previous Topic:Why is 0.7 the official release?
Next Topic:New feature in WTP 1.0 M9 - strict xml content assist - please help test
Goto Forum:
  


Current Time: Sat Apr 26 21:15:40 EDT 2025

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

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

Back to the top