/** * Return true if the enabled validators have not changed since this ValidationConfiguration was * constructed, false otherwise. (This method is needed for the Properties and Preference pages; * if the list of validators hasn't changed, then there is no need to update the task list; * updating the task list is a costly operation.) */ protected boolean hasEnabledValidatorsChanged(ValidatorMetaData[] oldEnabledVmd) throws InvocationTargetException { // First check the obvious: is every enabled validator still enabled, and is // the number of enabled validators the same as it was before? If not, return true. if (oldEnabledVmd == null) { // Something's gone wrong... return true; } for (int i = 0; i < oldEnabledVmd.length; i++) { ValidatorMetaData vmd = oldEnabledVmd[i]; if (!isEnabled(vmd)) { return true; } } // Everything that was enabled is still enabled; have any additional // validators been enabled? if (numberOfEnabledValidators() != oldEnabledVmd.length) { return true; } return false; }
/** * @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(); }