Java 类com.intellij.psi.targets.AliasingPsiTarget 实例源码

项目:intellij-ce-playground    文件:JavaFindUsagesHelper.java   
private static boolean addAliasingUsages(@NotNull PomTarget pomTarget,
                                         @NotNull final FindUsagesOptions options,
                                         @NotNull final Processor<UsageInfo> processor) {
  for (AliasingPsiTargetMapper aliasingPsiTargetMapper : Extensions.getExtensions(AliasingPsiTargetMapper.EP_NAME)) {
    for (final AliasingPsiTarget psiTarget : aliasingPsiTargetMapper.getTargets(pomTarget)) {
      boolean success = ReferencesSearch
        .search(new ReferencesSearch.SearchParameters(ApplicationManager.getApplication().runReadAction(new Computable<PsiElement>() {
          @Override
          public PsiElement compute() {
            return PomService.convertToPsi(psiTarget);
          }
        }), options.searchScope, false, options.fastTrack))
        .forEach(new ReadActionProcessor<PsiReference>() {
          @Override
          public boolean processInReadAction(final PsiReference reference) {
            return addResult(reference, options, processor);
          }
        });
      if (!success) return false;
    }
  }
  return true;
}
项目:tools-idea    文件:JavaFindUsagesHandler.java   
private static boolean addAliasingUsages(@NotNull PomTarget pomTarget,
                                         @NotNull final Processor<UsageInfo> processor,
                                         @NotNull final FindUsagesOptions options) {
  for (AliasingPsiTargetMapper aliasingPsiTargetMapper : Extensions.getExtensions(AliasingPsiTargetMapper.EP_NAME)) {
    for (AliasingPsiTarget psiTarget : aliasingPsiTargetMapper.getTargets(pomTarget)) {
      boolean success = ReferencesSearch
        .search(new ReferencesSearch.SearchParameters(PomService.convertToPsi(psiTarget), options.searchScope, false, options.fastTrack))
        .forEach(new ReadActionProcessor<PsiReference>() {
          @Override
          public boolean processInReadAction(final PsiReference reference) {
            return addResult(processor, reference, options);
          }
        });
      if (!success) return false;
    }
  }
  return true;
}
项目:consulo-java    文件:JavaFindUsagesHelper.java   
private static boolean addAliasingUsages(@NotNull PomTarget pomTarget, @NotNull final FindUsagesOptions options, @NotNull final Processor<UsageInfo> processor)
{
    for(AliasingPsiTargetMapper aliasingPsiTargetMapper : Extensions.getExtensions(AliasingPsiTargetMapper.EP_NAME))
    {
        for(final AliasingPsiTarget psiTarget : aliasingPsiTargetMapper.getTargets(pomTarget))
        {
            boolean success = ReferencesSearch.search(new ReferencesSearch.SearchParameters(ReadAction.compute(() -> PomService.convertToPsi(psiTarget)), options.searchScope, false, options
                    .fastTrack)).forEach(new ReadActionProcessor<PsiReference>()
            {
                @Override
                public boolean processInReadAction(final PsiReference reference)
                {
                    return addResult(reference, options, processor);
                }
            });
            if(!success)
            {
                return false;
            }
        }
    }
    return true;
}