Java 类com.intellij.psi.PsiTarget 实例源码

项目:intellij-ce-playground    文件:PomTargetPsiElementImpl.java   
@NotNull
@Override
public PsiElement getNavigationElement() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement();
  }
  return super.getNavigationElement();
}
项目:intellij-ce-playground    文件:PomTargetPsiElementImpl.java   
@Override
public boolean isValid() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement().isValid();
  }

  return myTarget.isValid();
}
项目:intellij-ce-playground    文件:PomTargetPsiElementImpl.java   
@Override
public PsiElement getContext() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement();
  }
  return null;
}
项目:intellij-ce-playground    文件:PomTargetPsiElementImpl.java   
@Override
@Nullable
public PsiFile getContainingFile() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement().getContainingFile();
  }
  return null;
}
项目:intellij-ce-playground    文件:PomTargetPsiElementImpl.java   
@Override
@NotNull
public Language getLanguage() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement().getLanguage();
  }
  return Language.ANY;
}
项目:intellij-ce-playground    文件:PomTargetPsiElementImpl.java   
@Override
public String getLocationString() {
  if (myTarget instanceof PsiTarget) {
    PsiFile file = ((PsiTarget)myTarget).getNavigationElement().getContainingFile();
    if (file != null) {
      return "(" + file.getName() + ")";
    }
  }
  return super.getLocationString();
}
项目:intellij-ce-playground    文件:PomDefinitionSearch.java   
@Override
public boolean execute(@NotNull PsiElement queryParameters, @NotNull Processor<PsiElement> consumer) {
  if (queryParameters instanceof PomTargetPsiElement) {
    final PomTarget target = ((PomTargetPsiElement)queryParameters).getTarget();
    if (target instanceof PsiTarget) {
      if (!consumer.process(((PsiTarget)target).getNavigationElement())) return false;
    }
  }
  return true;
}
项目:tools-idea    文件:PomDefinitionSearch.java   
@Override
public boolean execute(@NotNull PsiElement queryParameters, @NotNull Processor<PsiElement> consumer) {
  if (queryParameters instanceof PomTargetPsiElement) {
    final PomTarget target = ((PomTargetPsiElement)queryParameters).getTarget();
    if (target instanceof PsiTarget) {
      if (!consumer.process(((PsiTarget)target).getNavigationElement())) return false;
    }
  }
  return true;
}
项目:tools-idea    文件:PomTargetPsiElementImpl.java   
@NotNull
@Override
public PsiElement getNavigationElement() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement();
  }
  return super.getNavigationElement();
}
项目:tools-idea    文件:PomTargetPsiElementImpl.java   
@Override
public boolean isValid() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement().isValid();
  }

  return myTarget.isValid();
}
项目:tools-idea    文件:PomTargetPsiElementImpl.java   
@Override
public PsiElement getContext() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement();
  }
  return null;
}
项目:tools-idea    文件:PomTargetPsiElementImpl.java   
@Override
@Nullable
public PsiFile getContainingFile() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement().getContainingFile();
  }
  return null;
}
项目:tools-idea    文件:PomTargetPsiElementImpl.java   
@Override
@NotNull
public Language getLanguage() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement().getLanguage();
  }
  return Language.ANY;
}
项目:tools-idea    文件:PomTargetPsiElementImpl.java   
@Override
public String getLocationString() {
  if (myTarget instanceof PsiTarget) {
    PsiFile file = ((PsiTarget)myTarget).getNavigationElement().getContainingFile();
    if (file != null) {
      return "(" + file.getName() + ")";
    }
  }
  return super.getLocationString();
}
项目:consulo    文件:PomDefinitionSearch.java   
@Override
public boolean execute(@Nonnull DefinitionsScopedSearch.SearchParameters parameters, @Nonnull Processor<PsiElement> consumer) {
  PsiElement element = parameters.getElement();
  if (element instanceof PomTargetPsiElement) {
    final PomTarget target = ((PomTargetPsiElement)element).getTarget();
    if (target instanceof PsiTarget) {
      if (!consumer.process(((PsiTarget)target).getNavigationElement())) return false;
    }
  }
  return true;
}
项目:consulo    文件:PomTargetPsiElementImpl.java   
@Nonnull
@Override
public PsiElement getNavigationElement() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement();
  }
  return super.getNavigationElement();
}
项目:consulo    文件:PomTargetPsiElementImpl.java   
@Override
public Icon getIcon() {
  Icon icon = TypePresentationService.getInstance().getIcon(myTarget);
  if (icon != null) return icon;

  if (myTarget instanceof PsiTarget) {
    return IconDescriptorUpdaters.getIcon(((PsiTarget)myTarget).getNavigationElement(), 0);
  }
  return null;
}
项目:consulo    文件:PomTargetPsiElementImpl.java   
@Override
public boolean isValid() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement().isValid();
  }

  return myTarget.isValid();
}
项目:consulo    文件:PomTargetPsiElementImpl.java   
@Override
public PsiElement getContext() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement();
  }
  return null;
}
项目:consulo    文件:PomTargetPsiElementImpl.java   
@Override
@Nullable
public PsiFile getContainingFile() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement().getContainingFile();
  }
  return null;
}
项目:consulo    文件:PomTargetPsiElementImpl.java   
@Override
@Nonnull
public Language getLanguage() {
  if (myTarget instanceof PsiTarget) {
    return ((PsiTarget)myTarget).getNavigationElement().getLanguage();
  }
  return Language.ANY;
}
项目:consulo    文件:PomTargetPsiElementImpl.java   
@Override
public String getLocationString() {
  if (myTarget instanceof PsiTarget) {
    PsiFile file = ((PsiTarget)myTarget).getNavigationElement().getContainingFile();
    if (file != null) {
      return "(" + file.getName() + ")";
    }
  }
  return super.getLocationString();
}
项目:intellij-ce-playground    文件:PomService.java   
public static PsiElement convertToPsi(@NotNull PsiTarget target) {
  return getInstance(target.getNavigationElement().getProject()).convertToPsi((PomTarget)target);
}
项目:intellij-ce-playground    文件:PomTargetPsiElementImpl.java   
public PomTargetPsiElementImpl(@NotNull PsiTarget target) {
  this(target.getNavigationElement().getProject(), target);
}
项目:intellij-ce-playground    文件:PomTargetPsiElementImpl.java   
@Override
public boolean isEquivalentTo(PsiElement another) {
  return equals(another) ||
         (another != null && myTarget instanceof PsiTarget && another.isEquivalentTo(((PsiTarget)myTarget).getNavigationElement()));
}
项目:tools-idea    文件:PomService.java   
public static PsiElement convertToPsi(@NotNull PsiTarget target) {
  return getInstance(target.getNavigationElement().getProject()).convertToPsi((PomTarget)target);
}
项目:tools-idea    文件:PomTargetPsiElementImpl.java   
public PomTargetPsiElementImpl(@NotNull PsiTarget target) {
  this(target.getNavigationElement().getProject(), target);
}
项目:tools-idea    文件:PomTargetPsiElementImpl.java   
@Override
public boolean isEquivalentTo(PsiElement another) {
  return equals(another) ||
         (another != null && myTarget instanceof PsiTarget && another.isEquivalentTo(((PsiTarget)myTarget).getNavigationElement()));
}
项目:consulo    文件:PomService.java   
public static PsiElement convertToPsi(@Nonnull PsiTarget target) {
  return getInstance(target.getNavigationElement().getProject()).convertToPsi((PomTarget)target);
}
项目:consulo    文件:PomTargetPsiElementImpl.java   
public PomTargetPsiElementImpl(@Nonnull PsiTarget target) {
  this(target.getNavigationElement().getProject(), target);
}
项目:consulo    文件:PomTargetPsiElementImpl.java   
@Override
public boolean isEquivalentTo(PsiElement another) {
  return equals(another) ||
         (another != null && myTarget instanceof PsiTarget && another.isEquivalentTo(((PsiTarget)myTarget).getNavigationElement()));
}