Java 类com.intellij.psi.impl.smartPointers.SmartPointerAnchorProvider 实例源码

项目:intellij-ce-playground    文件:PsiAnchor.java   
@NotNull
public static PsiAnchor wrapperOrHardReference(@NotNull PsiElement element) {
  for (SmartPointerAnchorProvider provider : SmartPointerAnchorProvider.EP_NAME.getExtensions()) {
    PsiElement anchorElement = provider.getAnchor(element);
    if (anchorElement != null && anchorElement != element) {
      PsiAnchor wrappedAnchor = create(anchorElement);
      if (!(wrappedAnchor instanceof HardReference)) {
        return new WrappedElementAnchor(provider, wrappedAnchor);
      }
    }
  }
  return new HardReference(element);
}
项目:consulo    文件:PsiAnchor.java   
@Nonnull
private static PsiAnchor wrapperOrHardReference(@Nonnull PsiElement element) {
  for (SmartPointerAnchorProvider provider : SmartPointerAnchorProvider.EP_NAME.getExtensions()) {
    PsiElement anchorElement = provider.getAnchor(element);
    if (anchorElement != null && anchorElement != element) {
      PsiAnchor wrappedAnchor = create(anchorElement);
      if (!(wrappedAnchor instanceof HardReference)) {
        return new WrappedElementAnchor(provider, wrappedAnchor);
      }
    }
  }
  return new HardReference(element);
}
项目:intellij-ce-playground    文件:WrappedElementAnchor.java   
public WrappedElementAnchor(@NotNull SmartPointerAnchorProvider provider, @NotNull PsiAnchor anchor) {
  myAnchorProvider = provider;
  myBaseAnchor = anchor;
}
项目:consulo    文件:WrappedElementAnchor.java   
public WrappedElementAnchor(@Nonnull SmartPointerAnchorProvider provider, @Nonnull PsiAnchor anchor) {
  myAnchorProvider = provider;
  myBaseAnchor = anchor;
}