Package org.eclipse.core.internal.content

Examples of org.eclipse.core.internal.content.XMLRootHandler$StopParsingException


*/
@SuppressWarnings("restriction")
public final class SpringElementContentDescriber extends XMLContentDescriber {

  private int checkCriteria(InputSource contents) throws IOException {
    XMLRootHandler xmlHandler = new XMLRootHandler(true);
    try {
      if (!xmlHandler.parseContents(contents)) {
        return INDETERMINATE;
      }
    }
    catch (SAXException e) {
      // we may be handed any kind of contents... it is normal we fail to
      // parse
      return INDETERMINATE;
    }
    catch (ParserConfigurationException e) {
      // some bad thing happened - force this describer to be disabled
      String message = ContentMessages.content_parserConfiguration;
      RuntimeLog.log(new Status(IStatus.ERROR, ContentMessages.OWNER_NAME, 0, message, e));
      throw new RuntimeException(message);
    }

    // Check to see if we matched our criteria.
    String ns = xmlHandler.getRootNamespace();
    if (ns.startsWith(org.springframework.ide.eclipse.beans.core.namespaces.NamespaceUtils.DEFAULT_NAMESPACE_URI)) {
      return VALID;
    }

    if (ns != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.core.internal.content.XMLRootHandler$StopParsingException

Copyright © 2018 www.massapicom. 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.