Java 类com.intellij.psi.scope.conflictResolvers.DuplicateConflictResolver 实例源码

项目:intellij-ce-playground    文件:JavaMethodResolveHelper.java   
public JavaMethodResolveHelper(@NotNull final PsiElement argumentList, PsiFile containingFile, @Nullable final PsiType[] argumentTypes) {
  myArgumentTypes = argumentTypes;
  final LanguageLevel languageLevel = PsiUtil.getLanguageLevel(argumentList);
  final PsiConflictResolver resolver = argumentTypes == null ? DuplicateConflictResolver.INSTANCE : new JavaMethodsConflictResolver(argumentList, argumentTypes,
                                                                                                                                    languageLevel);
  myProcessor = new MethodResolverProcessor(argumentList, containingFile, new PsiConflictResolver[]{resolver}) {
    @Override
    protected MethodCandidateInfo createCandidateInfo(@NotNull final PsiMethod method, @NotNull final PsiSubstitutor substitutor,
                                                      final boolean staticProblem,
                                                      final boolean accessible, final boolean varargs) {
      return JavaMethodResolveHelper.this
        .createCandidateInfo(method, substitutor, staticProblem, myCurrentFileContext, !accessible, argumentList, argumentTypes,
                             languageLevel);
    }

    @Override
    protected boolean isAccepted(final PsiMethod candidate) {
      return !candidate.isConstructor();
    }
  };
}
项目:tools-idea    文件:JavaMethodResolveHelper.java   
public JavaMethodResolveHelper(@NotNull final PsiElement argumentList, PsiFile containingFile, @Nullable final PsiType[] argumentTypes) {
  myArgumentTypes = argumentTypes;
  final LanguageLevel languageLevel = PsiUtil.getLanguageLevel(argumentList);
  final PsiConflictResolver resolver = argumentTypes == null ? DuplicateConflictResolver.INSTANCE : new JavaMethodsConflictResolver(argumentList, argumentTypes,
                                                                                                                                    languageLevel);
  myProcessor = new MethodResolverProcessor(argumentList, containingFile, new PsiConflictResolver[]{resolver}) {
    @Override
    protected MethodCandidateInfo createCandidateInfo(final PsiMethod method, final PsiSubstitutor substitutor,
                                                      final boolean staticProblem,
                                                      final boolean accessible) {
      return JavaMethodResolveHelper.this
        .createCandidateInfo(method, substitutor, staticProblem, myCurrentFileContext, !accessible, argumentList, argumentTypes,
                             languageLevel);
    }

    @Override
    protected boolean isAccepted(final PsiMethod candidate) {
      return !candidate.isConstructor();
    }
  };
}
项目:consulo-java    文件:JavaMethodResolveHelper.java   
public JavaMethodResolveHelper(@NotNull final PsiElement argumentList,
        PsiFile containingFile,
        @Nullable final PsiType[] argumentTypes)
{
    myArgumentTypes = argumentTypes;
    final LanguageLevel languageLevel = PsiUtil.getLanguageLevel(argumentList);
    final PsiConflictResolver resolver = argumentTypes == null ? DuplicateConflictResolver.INSTANCE : new
            JavaMethodsConflictResolver(argumentList, argumentTypes, languageLevel);
    myProcessor = new MethodResolverProcessor(argumentList, containingFile, new PsiConflictResolver[]{resolver})
    {
        @Override
        protected MethodCandidateInfo createCandidateInfo(@NotNull final PsiMethod method,
                @NotNull final PsiSubstitutor substitutor,
                final boolean staticProblem,
                final boolean accessible,
                final boolean varargs)
        {
            return JavaMethodResolveHelper.this.createCandidateInfo(method, substitutor, staticProblem,
                    myCurrentFileContext, !accessible, argumentList, argumentTypes, languageLevel);
        }

        @Override
        protected boolean isAccepted(final PsiMethod candidate)
        {
            return !candidate.isConstructor();
        }
    };
}
项目:intellij-ce-playground    文件:MethodCandidatesProcessor.java   
public MethodCandidatesProcessor(@NotNull PsiElement place, PsiFile placeFile) {
  super(new PsiConflictResolver[]{DuplicateConflictResolver.INSTANCE}, new SmartList<CandidateInfo>(), place, placeFile);
}
项目:tools-idea    文件:MethodCandidatesProcessor.java   
public MethodCandidatesProcessor(@NotNull PsiElement place, PsiFile placeFile) {
  super(new PsiConflictResolver[]{DuplicateConflictResolver.INSTANCE}, new SmartList<CandidateInfo>(), place, placeFile);
}
项目:consulo-java    文件:MethodCandidatesProcessor.java   
public MethodCandidatesProcessor(@NotNull PsiElement place, PsiFile placeFile)
{
    super(new PsiConflictResolver[]{DuplicateConflictResolver.INSTANCE}, new SmartList<CandidateInfo>(), place, placeFile);
}