use of org.eclipse.xtext.validation.AbstractDeclarativeValidator.State in project xtext-core by eclipse.
the class ValidatorTester method validator.
public T validator() {
State s = validator.setMessageAcceptor(validator).getState();
if (s.chain == null)
s.chain = new BasicDiagnostic();
validatorCalled = true;
return validator;
}
use of org.eclipse.xtext.validation.AbstractDeclarativeValidator.State in project ow by vtst.
the class ConfigurableValidationMessageAcceptor method isDisabled.
// **************************************************************************
// implements ValidationMessageAcceptor
/**
* This function is called by every error(), warning(), info() method to check
* whether the current check is disabled.
* @return true if the current check is disabled.
*/
private boolean isDisabled() {
State state = stateAccess.getState();
if (state.currentObject == null)
return false;
ProjectConfiguration configuration = cache.get(state.currentObject.eResource());
if (configuration == null)
return false;
return configuration.isDisabled(state.currentMethod);
}
use of org.eclipse.xtext.validation.AbstractDeclarativeValidator.State in project xtext-core by eclipse.
the class XtextValidationTest method configureValidator.
private void configureValidator(XtextValidator validator, ValidationMessageAcceptor messageAcceptor, EObject currentObject) {
State state = validator.setMessageAcceptor(messageAcceptor).getState();
state.currentObject = currentObject;
state.context = newHashMap();
}
Aggregations