public void opening(IProject project) { if (project == null || !ValidationPlugin.isActivated()) { return; } // When the project is opened, check for any orphaned tasks // or tasks whose owners need to be updated. ConfigurationManager.getManager().opening(project); }
private ValidatorMetaData[] getStateOfProjectLevelValidatorsFromGlobal(ProjectConfiguration prjp) throws InvocationTargetException { List enabledGlobalValidatorsForProject = new ArrayList(); GlobalConfiguration gf = ConfigurationManager.getManager().getGlobalConfiguration(); List allProjectValidator = getAllValidatorUniqueNames(prjp.getValidators()); ValidatorMetaData[] vmd = gf.getBuildEnabledValidators(); for(int i = 0; i < vmd.length; i++) { if(allProjectValidator.contains(vmd[i].getValidatorUniqueName())) { enabledGlobalValidatorsForProject.add(vmd[i]); } } return (ValidatorMetaData[]) enabledGlobalValidatorsForProject.toArray(new ValidatorMetaData[enabledGlobalValidatorsForProject.size()]); }
public void enableValidator(String validatorId) { try { ValidatorMetaData vmd = ValidationRegistryReader.getReader() .getValidatorMetaData(validatorId); GlobalConfiguration gf = ConfigurationManager.getManager() .getGlobalConfiguration(); gf.enableSingleValidator(vmd); } catch (InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
public void disableValidator(String validatorId){ try { ValidatorMetaData vmd = ValidationRegistryReader.getReader() .getValidatorMetaData(validatorId); GlobalConfiguration gf = ConfigurationManager.getManager() .getGlobalConfiguration(); gf.disableSingleValidator(vmd); } catch (InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
/** * @see org.eclipse.wst.validation.internal.operations.internal.preference.ValidationConfiguration#numberOfEnabledValidators() */ public int numberOfEnabledValidators() throws InvocationTargetException { if (useGlobalPreference()) { return ConfigurationManager.getManager().getGlobalConfiguration().numberOfEnabledValidators(); } return super.numberOfEnabledValidators(); }
/** * @see org.eclipse.wst.validation.internal.operations.internal.preference.ValidationConfiguration#numberOfIncrementalValidators() */ public int numberOfIncrementalValidators() throws InvocationTargetException { if (useGlobalPreference()) { return ConfigurationManager.getManager().getGlobalConfiguration().numberOfIncrementalValidators(); } return super.numberOfIncrementalValidators(); }
/** * @see org.eclipse.wst.validation.internal.operations.internal.preference.ValidationConfiguration#numberOfValidators() */ public int numberOfValidators() throws InvocationTargetException { if (useGlobalPreference()) { return ConfigurationManager.getManager().getGlobalConfiguration().numberOfValidators(); } return super.numberOfValidators(); }
public boolean haveDelegatesChanged(Map oldDelegates, boolean allow) throws InvocationTargetException { if (super.haveDelegatesChanged(oldDelegates)) { return true; } if (allow) { Map projDelegates = super.getDelegatingValidators(); GlobalConfiguration gp = ConfigurationManager.getManager().getGlobalConfiguration(); return gp.haveDelegatesChanged(projDelegates); } return false; }
/** * @see org.eclipse.wst.validation.internal.operations.internal.preference.ValidationConfiguration#numberOfDisabledValidators() */ public int numberOfDisabledValidators() throws InvocationTargetException { if (useGlobalPreference()) { return ConfigurationManager.getManager().getGlobalConfiguration().numberOfDisabledValidators(); } return super.numberOfDisabledValidators(); }
/** * @see org.eclipse.wst.validation.internal.operations.internal.preference.ValidationConfiguration#numberOfEnabledIncrementalValidators() */ public int numberOfEnabledIncrementalValidators() throws InvocationTargetException { if (useGlobalPreference()) { return ConfigurationManager.getManager().getGlobalConfiguration().numberOfEnabledIncrementalValidators(); } return super.numberOfEnabledIncrementalValidators(); }
public int numberOfManualValidators() throws InvocationTargetException { if (useGlobalPreference()) { return ConfigurationManager.getManager().getGlobalConfiguration().numberOfManualEnabledValidators(); } return super.numberOfManualEnabledValidators(); } public boolean isDisableAllValidation() throws InvocationTargetException{
/** * If the preferences should be used then the preference settings are returned; otherwise return * the project settings. */ public ValidatorMetaData[] getEnabledValidators() throws InvocationTargetException { if (useGlobalPreference()) { return extractProjectValidators(ConfigurationManager.getManager().getGlobalConfiguration().getEnabledValidators(), getResource()); } return super.getEnabledValidators(); }
public ValidatorMetaData[] getManualEnabledValidators() throws InvocationTargetException { if (useGlobalPreference()) { return extractProjectValidators(ConfigurationManager.getManager().getGlobalConfiguration().getManualEnabledValidators(), getResource()); } return super.getManualEnabledValidators(); }
public ValidatorMetaData[] getEnabledFullBuildValidators(boolean fullBuild) throws InvocationTargetException { if (useGlobalPreference()) { return extractProjectValidators(ConfigurationManager.getManager().getGlobalConfiguration().getEnabledFullBuildValidators(fullBuild), getResource()); } return super.getEnabledFullBuildValidators(fullBuild); }
/** * @see org.eclipse.wst.validation.internal.operations.internal.preference.ValidationConfiguration#getValidators() */ public ValidatorMetaData[] getValidators() throws InvocationTargetException { if (useGlobalPreference()) { return extractProjectValidators(ConfigurationManager.getManager().getGlobalConfiguration().getValidators(), getResource()); } return super.getValidators(); }
/** * @see org.eclipse.wst.validation.internal.operations.internal.attribute.ValidationConfiguration#getEnabledIncrementalValidators(boolean) */ public ValidatorMetaData[] getEnabledIncrementalValidators(boolean incremental) throws InvocationTargetException { if (useGlobalPreference()) { return extractProjectValidators(ConfigurationManager.getManager().getGlobalConfiguration().getEnabledIncrementalValidators(incremental), getResource()); } return super.getEnabledIncrementalValidators(incremental); }
public ValidatorMetaData[] getIncrementalValidators() throws InvocationTargetException { if (useGlobalPreference()) { return extractProjectValidators(ConfigurationManager.getManager().getGlobalConfiguration().getIncrementalValidators(), getResource()); } return super.getIncrementalValidators(); }
/** * @see org.eclipse.wst.validation.internal.operations.internal.preference.ValidationConfiguration#getDisabledValidators() */ public ValidatorMetaData[] getDisabledValidators() throws InvocationTargetException { if (useGlobalPreference()) { return extractProjectValidators(ConfigurationManager.getManager().getGlobalConfiguration().getDisabledValidators(), getResource()); } return super.getDisabledValidators(); }
public void resetToDefaultForProjectDescriptionChange() throws InvocationTargetException { // The default values of the project is whatever the preference values are GlobalConfiguration gp = ConfigurationManager.getManager().getGlobalConfiguration(); setEnabledManualValidators(gp.getManualEnabledValidators()); setEnabledBuildValidators(gp.getBuildEnabledValidators()); setDelegatingValidators(gp.getDelegatingValidators()); }
public void resetToDefault() throws InvocationTargetException { // The default values of the project is whatever the preference values are GlobalConfiguration gp = ConfigurationManager.getManager().getGlobalConfiguration(); setEnabledManualValidators(gp.getManualEnabledValidators()); setEnabledBuildValidators(gp.getBuildEnabledValidators()); setDelegatingValidators(gp.getDelegatingValidators()); // except for this field, which is unique to the project preferences setDoesProjectOverride(getDoesProjectOverrideDefault()); }