Example #1
0
  private static boolean isHrefScripted(final XmlTag tag) {
    final XmlAttribute attribute = tag.getAttribute(HREF_ATTR);
    if (attribute != null) {
      final XmlAttributeValue value = attribute.getValueElement();
      if (value != null) {
        if (PsiTreeUtil.getChildOfType(value, OuterLanguageElement.class) != null) {
          return true;
        }
      }
    }

    return false;
  }
Example #2
0
  @Nullable
  private static String getAttributeValue(final XmlTag tag, final String attrName) {
    final XmlAttribute attribute = tag.getAttribute(attrName);
    if (attribute != null) {
      final XmlAttributeValue value = attribute.getValueElement();
      if (value != null) {
        if (PsiTreeUtil.getChildOfType(value, OuterLanguageElement.class) == null) {
          return value.getValue();
        }
      }
    }

    return null;
  }