use of org.eclipse.wst.xml.core.internal.validation.XMLNestedValidatorContext in project webtools.sourceediting by eclipse.
the class Validator method getNestedContext.
/**
* Get the nested validation context.
*
* @param state
* the validation state.
* @param create
* when true, a new context will be created if one is not found
* @return the nested validation context.
*/
protected NestedValidatorContext getNestedContext(ValidationState state, boolean create) {
NestedValidatorContext context = null;
Object o = state.get(XML_VALIDATOR_CONTEXT);
if (o instanceof XMLNestedValidatorContext)
context = (XMLNestedValidatorContext) o;
else if (create) {
context = new XMLNestedValidatorContext();
}
return context;
}
Aggregations