Examples of ValidationAdapter


Examples of org.eclipse.wst.sse.core.internal.validate.ValidationAdapter

    Node child = parent.getFirstChild();
    while (child != null) {
      if (child.getNodeType() == Node.ELEMENT_NODE) {
        INodeNotifier notifier = (INodeNotifier) child;
        ValidationAdapter va = (ValidationAdapter) notifier.getExistingAdapter(clazz);
        if (va == null) {
          notifier.addAdapter(validator);
          va = validator;
        }
        // bug 143213 - Can't batch validate open HTML files when
        // as-you-type validation is enabled
        va.setReporter(validator.getReporter());
        va.validate((IndexedRegion) child);
      }
      child = child.getNextSibling();
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.validate.ValidationAdapter

      Node child = children.item(i);
      if (child == null || child.getNodeType() != Node.ELEMENT_NODE)
        continue;

      INodeNotifier notifier = (INodeNotifier) child;
      ValidationAdapter va = (ValidationAdapter) notifier.getExistingAdapter(clazz);
      if (va == null) {
        notifier.addAdapter(validator);
        va = validator;
      }
      va.validate((IndexedRegion) child);
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.validate.ValidationAdapter

  public void setReporter(ValidationReporter reporter) {
    super.setReporter(reporter);

    Iterator i = components.iterator();
    while (i.hasNext()) {
      ValidationAdapter component = (ValidationAdapter) i.next();
      if (component == null)
        continue;
      component.setReporter(reporter);
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.validate.ValidationAdapter

    boolean isXMLJSP = isXMLJSP(document);
    boolean hasHTMLFeature = hasHTMLFeature(document);

    if (hasHTMLFeature && !isXMLJSP) {
      INodeAdapterFactory factory = HTMLValidationAdapterFactory.getInstance();
      ValidationAdapter adapter = (ValidationAdapter) factory.adapt(document);
      if (adapter != null) {
        HTMLValidationReporter rep = getReporter(reporter, file, model);
        rep.clear();
        adapter.setReporter(rep);
        adapter.validate(document);
      }
    }
    if (!hasHTMLFeature && isXMLJSP) {
      Validator xmlValidator = new Validator();
      xmlValidator.validate(file, kind, state, monitor);
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.validate.ValidationAdapter

    // JSP
    boolean hasXMLFeature = isXMLJSP(document);
    boolean hasHTMLFeature = hasHTMLFeature(document);
    if (hasHTMLFeature && !hasXMLFeature) {
      INodeAdapterFactory factory = HTMLValidationAdapterFactory.getInstance();
      ValidationAdapter adapter = (ValidationAdapter) factory.adapt(document);
      if (adapter == null)
        return; // error

      HTMLValidationReporter rep = getReporter(reporter, file, model);
      rep.clear();
      adapter.setReporter(rep);
      adapter.validate(document);
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.validate.ValidationAdapter

    boolean isXMLJSP = isXMLJSP(document);
    boolean hasHTMLFeature = hasHTMLFeature(document);

    if (hasHTMLFeature && !isXMLJSP) {
      INodeAdapterFactory factory = HTMLValidationAdapterFactory.getInstance();
      ValidationAdapter adapter = (ValidationAdapter) factory.adapt(document);
      if (adapter != null) {
        HTMLValidationReporter rep = getReporter(reporter, file, model);
        rep.clear();
        adapter.setReporter(rep);
        adapter.validate(document);
      }
    }
    if (!hasHTMLFeature && isXMLJSP) {
      Validator xmlValidator = new Validator();
      xmlValidator.validate(file, kind, state, monitor);
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.validate.ValidationAdapter

    // JSP
    boolean hasXMLFeature = isXMLJSP(document);
    boolean hasHTMLFeature = hasHTMLFeature(document);
    if (hasHTMLFeature && !hasXMLFeature) {
      INodeAdapterFactory factory = HTMLValidationAdapterFactory.getInstance();
      ValidationAdapter adapter = (ValidationAdapter) factory.adapt(document);
      if (adapter == null)
        return; // error

      HTMLValidationReporter rep = getReporter(reporter, file, model);
      rep.clear();
      adapter.setReporter(rep);
      adapter.validate(document);
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.validate.ValidationAdapter

      }

      if (ir instanceof INodeNotifier) {

        INodeAdapterFactory factory = HTMLValidationAdapterFactory.getInstance();
        ValidationAdapter adapter = (ValidationAdapter) factory.adapt((INodeNotifier) ir);
        if (adapter == null)
          return; // error

        if (reporter != null) {
          HTMLValidationReporter rep = null;
          rep = getReporter(reporter, file, (IDOMModel) model);
          rep.clear();
          adapter.setReporter(rep);

          Message mess = new LocalizedMessage(IMessage.LOW_SEVERITY, file.getFullPath().toString().substring(1));
          reporter.displaySubtask(this, mess);
        }
        adapter.validate(ir);
      }
    }
    finally {
      if (model != null)
        model.releaseFromRead();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.