Package com.intellij.psi.xml

Examples of com.intellij.psi.xml.XmlAttributeValue


  @NotNull
  @Override
  public PsiReference[] getReferencesByElement(@NotNull final PsiElement psiElement,
                                               @NotNull final ProcessingContext context) {
    final XmlAttributeValue methodAttribute = (XmlAttributeValue) psiElement;

    final PsiElement parent = methodAttribute.getParent().getParent();
    if (!(parent instanceof XmlTag)) {
      return PsiReference.EMPTY_ARRAY;
    }

    final XmlTag tag = (XmlTag) parent;
    final XmlAttribute action = tag.getAttribute("action");
    if (action == null) {
      return PsiReference.EMPTY_ARRAY;
    }

    final XmlAttributeValue valueElement = action.getValueElement();
    if (valueElement == null) {
      return PsiReference.EMPTY_ARRAY;
    }

    for (final PsiReference psiReference : valueElement.getReferences()) {
      if (psiReference instanceof ActionReferenceProvider.ActionReference) {
        // dynamic cannot be resolved
        final PsiElement resolve = psiReference.resolve();
        if (!(resolve instanceof XmlTag)) {
          continue;
View Full Code Here


            }
        }

        if(yamlKeyValues.size() > 0) {
            for(PsiElement psiElement: yamlKeyValues) {
                XmlAttributeValue valueElement = ((XmlAttribute) psiElement).getValueElement();
                if(valueElement != null) {
                    holder.registerProblem(valueElement, "Duplicate Key", ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
                }
            }
        }
View Full Code Here

TOP

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

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.