Package com.google.gwt.uibinder.rebind.XMLElement

Examples of com.google.gwt.uibinder.rebind.XMLElement.Location


  protected static String locationOf(XMLElement context) {
    if (context == null) {
      return "";
    }

    Location location = context.getLocation();
    if (location != null) {
      String displayFileName = location.getSystemId();
      if (displayFileName == null) {
        // We see this in the test cases that don't use actual source files
        displayFileName = "Unknown";
      } else {
        // Parse the system id as a URI, which is almost always is
        try {
          URI uri = new URI(location.getSystemId());
          String path = uri.getPath();
          if (path != null) {
            displayFileName = path.substring(path.lastIndexOf('/') + 1);
          }
        } catch (URISyntaxException e) {
          // Fall back to the raw system id
        }
      }
      // Log in a way that usually triggers IDE hyperlinks
      return " Element " + context.toString() + " (" + displayFileName + ":"
          + location.getLineNumber() + ")";
    } else {
      /*
       * This shouldn't occur unless the XMLElement came from a DOM Node created
       * by something other than W3cDocumentBuilder.
       */
 
View Full Code Here

TOP

Related Classes of com.google.gwt.uibinder.rebind.XMLElement.Location

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.