Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Turn off validation...
Turn off validation... [message #229203] Wed, 18 March 2009 11:56 Go to next message
Eclipse UserFriend
Hi,
We create a webtools project that provides template content that causes
about 2000 warnings. We've successfully turned off validation in the past
using a variety of methods that break with new eclipse releases. We've
just discovered that the ProjectPreferences.setOverride and setSuspend
methods no longer exist. What would be better than turning off validation
on our projects would be if we could add some exclude rules on folders or
file patterns. Is there a way to exclude files from validators
programmatically? If not, what is the latest recommended way to turn off
validation?


public void disableValidation()
{
ProjectPreferences prefs =
ValManager.getDefault().getProjectPreferences(project);
prefs.setOverride(true);
prefs.setSuspend(true);
}

Thanks in advance!
bouge
Re: Turn off validation... [message #229414 is a reply to message #229203] Mon, 23 March 2009 11:21 Go to previous message
Eclipse UserFriend
Hi All,
Wanted to follow up with this thread. The api's did change in 3.4.2, and
I've posted the below snippet on how to turn off validators in 3.4.2.
This code does not work in 3.4.1.


/*Method for disabling validators on Eclipse 3.4.2 */
Validator[] vals =
ValManager.getDefault().getValidatorsConfiguredForProject(
project, UseProjectPreferences.MustNotUse);

ValidatorMutable[] validators = new ValidatorMutable[vals.length];

for (int i = 0; i < vals.length; i++)
{
validators[i] = new ValidatorMutable(vals[i]);
}

ProjectPreferences prefs = new ProjectPreferences(project, true, true,
vals);

ValPrefManagerProject vpm = new ValPrefManagerProject(project);
vpm.savePreferences(prefs, validators);
Previous Topic:Generic Server External Launcher requierements
Next Topic:Debugging remote server through external launch?
Goto Forum:
  


Current Time: Wed Jul 23 11:36:01 EDT 2025

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

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

Back to the top