Java 类com.intellij.psi.impl.source.resolve.reference.impl.providers.AttributeValueSelfReference 实例源码

项目:intellij-ce-playground    文件:IdRefProvider.java   
@Override
@NotNull
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
  final XmlAttributeValue value = (XmlAttributeValue)element;

  if (hasIdRefType(value)) {
    return new PsiReference[]{
            new IdReference(value)
    };
  } else if (hasIdType(value)) {
    return new PsiReference[]{
            new AttributeValueSelfReference(element)
    };
  }
  return PsiReference.EMPTY_ARRAY;
}
项目:consulo-xml    文件:IdRefProvider.java   
@Override
@NotNull
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
  final XmlAttributeValue value = (XmlAttributeValue)element;

  if (hasIdRefType(value)) {
    return new PsiReference[]{
            new IdReference(value)
    };
  } else if (hasIdType(value)) {
    return new PsiReference[]{
            new AttributeValueSelfReference(element)
    };
  }
  return PsiReference.EMPTY_ARRAY;
}
项目:tools-idea    文件:IdRefProvider.java   
@NotNull
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
  final XmlAttributeValue value = (XmlAttributeValue)element;

  if (hasIdRefType(value)) {
    return new PsiReference[]{
            new IdReference(value)
    };
  } else if (hasIdType(value)) {
    return new PsiReference[]{
            new AttributeValueSelfReference(element)
    };
  }
  return PsiReference.EMPTY_ARRAY;
}