@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;