Search in sources :

Example 1 with XMLNestedValidatorContext

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;
}
Also used : XMLNestedValidatorContext(org.eclipse.wst.xml.core.internal.validation.XMLNestedValidatorContext) NestedValidatorContext(org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext) XMLNestedValidatorContext(org.eclipse.wst.xml.core.internal.validation.XMLNestedValidatorContext)

Aggregations

XMLNestedValidatorContext (org.eclipse.wst.xml.core.internal.validation.XMLNestedValidatorContext)1 NestedValidatorContext (org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext)1