Package com.intellij.psi.xml

Examples of com.intellij.psi.xml.XmlTagValue


     */
    public static String getTagValue(final XmlTag pTag) {
        if (pTag == null)
            return null;

        final XmlTagValue value = pTag.getValue();
        if (value == null)
            return null;

        final String text = value.getTrimmedText();
        if (text == null || text.trim().length() == 0)
            return null;

        return text;
    }
View Full Code Here


      this.currentPackage = currentPackage;
      this.model = model;
    }

    public PsiElement resolve() {
      final XmlTagValue tagValue = myElement.getValue();
      final String path = PathReference.trimPath(tagValue.getText());

      // use given namespace or current if none given
      final int namespacePrefixIndex = path.lastIndexOf("/");
      final String namespace;
      if (namespacePrefixIndex != -1) {
View Full Code Here

    return null;
  }

  @NotNull
  public static TextRange getTrimmedValueRange(final @NotNull XmlTag tag) {
    XmlTagValue tagValue = tag.getValue();
    final String text = tagValue.getText();
    final String trimmed = text.trim();
    final int index = text.indexOf(trimmed);
    final int startOffset = tagValue.getTextRange().getStartOffset() - tag.getTextRange().getStartOffset() + index;
    return new TextRange(startOffset, startOffset + trimmed.length());
  }
View Full Code Here

TOP

Related Classes of com.intellij.psi.xml.XmlTagValue

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.