Package com.google.dart.engine.index

Examples of com.google.dart.engine.index.Location


      return Location.EMPTY_ARRAY;
    }
    // convert to Location(s)
    List<Location> locations = Lists.newArrayList();
    for (LocationData locationData : locationDatas) {
      Location location = locationData.getLocation(context, elementCodec);
      if (location != null) {
        locations.add(location);
      }
    }
    return locations.toArray(new Location[locations.size()]);
View Full Code Here


      if (context != null) {
        for (Map<Relationship, List<LocationData>> nodeRelations : contextEntry.getValue().values()) {
          List<LocationData> nodeLocations = nodeRelations.get(relationship);
          if (nodeLocations != null) {
            for (LocationData locationData : nodeLocations) {
              Location location = locationData.getLocation(context, elementCodec);
              if (location != null) {
                locations.add(location);
              }
            }
          }
View Full Code Here

  @Override
  public Void visitXmlAttributeNode(XmlAttributeNode node) {
    Element element = node.getElement();
    if (element != null) {
      Token nameToken = node.getNameToken();
      Location location = createLocationForToken(nameToken);
      store.recordRelationship(element, IndexConstants.ANGULAR_REFERENCE, location);
    }
    return super.visitXmlAttributeNode(node);
  }
View Full Code Here

    Element element = node.getElement();
    if (element != null) {
      // tag
      {
        Token tagToken = node.getTagToken();
        Location location = createLocationForToken(tagToken);
        store.recordRelationship(element, IndexConstants.ANGULAR_REFERENCE, location);
      }
      // maybe add closing tag range
      Token closingTag = node.getClosingTag();
      if (closingTag != null) {
        Location location = createLocationForToken(closingTag);
        store.recordRelationship(element, IndexConstants.ANGULAR_CLOSING_TAG_REFERENCE, location);
      }
    }
    return super.visitXmlTagNode(node);
  }
View Full Code Here

    }
    return super.visitXmlTagNode(node);
  }

  private Location createLocationForIdentifier(SimpleIdentifier identifier) {
    return new Location(htmlUnitElement, identifier.getOffset(), identifier.getLength());
  }
View Full Code Here

  private Location createLocationForIdentifier(SimpleIdentifier identifier) {
    return new Location(htmlUnitElement, identifier.getOffset(), identifier.getLength());
  }

  private Location createLocationForToken(Token token) {
    return new Location(htmlUnitElement, token.getOffset(), token.getLength());
  }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.index.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.