|Re: No grammar constraints(DTD or XML schema) detected for the document [message #226906 is a reply to message #226893]
||Wed, 21 January 2009 01:28
| kiril mitov
Registered: July 2009
Since it is a preference it can be changed programmatically.
Every plugin has a preference store.
You can get it with Activator.getPreferenceStore() where Activator is the
plugin class defined in the MANIFEST.MF for the bundle contributing the
After you have the preference store you must find the name of the
Preferences are contributed with an extension point. Just find the extension
contributing the XML Validator.
Triggering a build on a project can be done with IProject.build(int,
In your case
the plugin defining the extension point is org.eclipse.wst.validation.
the plugin contributing a validator is org.eclipse.wst.xml.core
the plugin in which Window->Prefernece->Validation is defined is
org.eclipse.wst.validation.ui (found that with Alt+Shift+F1). Class is
you can also take a look at org.eclipse.wst.validation.internal.ValManager.
Please not that this class is in internal package and is not a public API.
"Rodrigo Pastrana" <firstname.lastname@example.org> wrote in message
> Hi Russ, thanks for that info. However, I'm looking for a way to do this
> programatically, not manually. Any ideas? thanks.
> Windofkeltia wrote:
>> Rodrigo Pastrana wrote:
>>> Does anybody know a proper way to avoid raising the warning "No grammar
>>> constraints(DTD or XML schema) detected for the document" for xml files
>>> which do not specify a DTD nor a schema?
>>> I know the user can manually disable the warning, but I need to do this
>>> programatically and would rather disable the warning on a per project
>>> basis. Let me know, and thanks in advance. Rod.
>> Try Preferences->Validation->XML Validator-> unclick manual and/or build?
Powered by FUDForum
. Page generated in 0.02341 seconds