Java 类com.intellij.psi.impl.search.JavaSourceFilterScope 实例源码

项目:intellij-ce-playground    文件:PsiShortNamesCacheImpl.java   
@Override
@NotNull
public PsiMethod[] getMethodsByName(@NotNull String name, @NotNull final GlobalSearchScope scope) {
  Collection<PsiMethod> methods = StubIndex.getElements(JavaStubIndexKeys.METHODS, name, myManager.getProject(),
                                                        new JavaSourceFilterScope(scope), PsiMethod.class);
  if (methods.isEmpty()) return PsiMethod.EMPTY_ARRAY;

  List<PsiMethod> list = filterMembers(methods, scope);
  return list.toArray(new PsiMethod[list.size()]);
}
项目:intellij-ce-playground    文件:PsiShortNamesCacheImpl.java   
@Override
public boolean processFieldsWithName(@NotNull String name,
                                     @NotNull Processor<? super PsiField> processor,
                                     @NotNull GlobalSearchScope scope,
                                     @Nullable IdFilter filter) {
  return StubIndex.getInstance().processElements(JavaStubIndexKeys.FIELDS, name, myManager.getProject(), new JavaSourceFilterScope(scope),
                                                 filter, PsiField.class, processor);
}
项目:intellij-ce-playground    文件:PsiShortNamesCacheImpl.java   
@Override
public boolean processMethodsWithName(@NonNls @NotNull String name,
                                      @NotNull Processor<? super PsiMethod> processor,
                                      @NotNull GlobalSearchScope scope,
                                      @Nullable IdFilter filter) {
  return StubIndex.getInstance().processElements(JavaStubIndexKeys.METHODS, name, myManager.getProject(),
                                                 new JavaSourceFilterScope(scope), filter, PsiMethod.class, processor);
}
项目:intellij-ce-playground    文件:PsiShortNamesCacheImpl.java   
@Override
public boolean processClassesWithName(@NotNull String name,
                                      @NotNull Processor<? super PsiClass> processor,
                                      @NotNull GlobalSearchScope scope,
                                      @Nullable IdFilter filter) {
  return StubIndex.getInstance().processElements(JavaStubIndexKeys.CLASS_SHORT_NAMES, name, myManager.getProject(),
                                                 new JavaSourceFilterScope(scope), filter, PsiClass.class, processor);
}
项目:intellij-ce-playground    文件:ResolveInCodeFragmentTest.java   
public void testResolveScopeWithFragmentContext() throws Exception {
  PsiElement physical = configureByFile("codeFragment/LocalVariable.java").getElement();
  JavaCodeFragment fragment = JavaCodeFragmentFactory.getInstance(myProject)
    .createExpressionCodeFragment("ref", physical, null, true);
  fragment.forceResolveScope(new JavaSourceFilterScope(physical.getResolveScope()));
  assertFalse(fragment.getResolveScope().equals(physical.getResolveScope()));

  PsiExpression lightExpr = JavaPsiFacade.getElementFactory(myProject).createExpressionFromText("xxx.xxx", fragment);
  assertEquals(lightExpr.getResolveScope(), fragment.getResolveScope());
}
项目:tools-idea    文件:PsiShortNamesCacheImpl.java   
@Override
@NotNull
public PsiMethod[] getMethodsByName(@NotNull String name, @NotNull final GlobalSearchScope scope) {
  Collection<PsiMethod> methods = StubIndex.getInstance().get(JavaStubIndexKeys.METHODS, name, myManager.getProject(), new JavaSourceFilterScope(scope));
  if (methods.isEmpty()) return PsiMethod.EMPTY_ARRAY;

  List<PsiMethod> list = filterMembers(methods, scope);
  return list.toArray(new PsiMethod[list.size()]);
}
项目:consulo-java    文件:JavaModuleNameIndex.java   
@Override
public Collection<PsiJavaModule> get(@NotNull String name, @NotNull Project project, @NotNull GlobalSearchScope scope)
{
    Collection<PsiJavaModule> modules = StubIndex.getElements(getKey(), name, project, new JavaSourceFilterScope(scope), PsiJavaModule.class);
    if(modules.size() > 1)
    {
        modules = filterVersions(project, modules);
    }
    return modules;
}
项目:consulo-java    文件:JavaMethodParameterTypesIndex.java   
@Override
public Collection<PsiMethod> get(@NotNull final String s,
        @NotNull final Project project,
        @NotNull final GlobalSearchScope scope)
{
    return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiMethod.class);
}
项目:consulo-java    文件:PsiShortNamesCacheImpl.java   
@Override
@NotNull
public PsiMethod[] getMethodsByName(@NotNull String name, @NotNull final GlobalSearchScope scope)
{
    Collection<PsiMethod> methods = StubIndex.getElements(JavaStubIndexKeys.METHODS, name, myManager.getProject(),
            new JavaSourceFilterScope(scope), PsiMethod.class);
    if(methods.isEmpty())
    {
        return PsiMethod.EMPTY_ARRAY;
    }

    List<PsiMethod> list = filterMembers(methods, scope);
    return list.toArray(new PsiMethod[list.size()]);
}
项目:consulo-java    文件:PsiShortNamesCacheImpl.java   
@Override
public boolean processFieldsWithName(@NotNull String name, @NotNull Processor<? super PsiField> processor, @NotNull GlobalSearchScope scope,
        @Nullable IdFilter filter)
{
    return StubIndex.getInstance().process(JavaStubIndexKeys.FIELDS, name, myManager.getProject(), new JavaSourceFilterScope(scope), filter,
            processor);
}
项目:consulo-java    文件:PsiShortNamesCacheImpl.java   
@Override
public boolean processMethodsWithName(@NonNls @NotNull String name, @NotNull Processor<? super PsiMethod> processor,
        @NotNull GlobalSearchScope scope, @Nullable IdFilter filter)
{
    return StubIndex.getInstance().process(JavaStubIndexKeys.METHODS, name, myManager.getProject(), new JavaSourceFilterScope(scope), filter,
            processor);
}
项目:consulo-java    文件:PsiShortNamesCacheImpl.java   
@Override
public boolean processClassesWithName(@NotNull String name, @NotNull Processor<? super PsiClass> processor, @NotNull GlobalSearchScope scope,
        @Nullable IdFilter filter)
{
    return StubIndex.getInstance().process(JavaStubIndexKeys.CLASS_SHORT_NAMES, name, myManager.getProject(), new JavaSourceFilterScope(scope),
            filter, processor);
}
项目:intellij-ce-playground    文件:JavaSuperClassNameOccurenceIndex.java   
@Override
public Collection<PsiReferenceList> get(@NotNull final String s, @NotNull final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiReferenceList.class);
}
项目:intellij-ce-playground    文件:JavaFieldNameIndex.java   
@Override
public Collection<PsiField> get(@NotNull final String s, @NotNull final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiField.class);
}
项目:intellij-ce-playground    文件:JavaFullClassNameIndex.java   
@Override
public Collection<PsiClass> get(@NotNull final Integer integer, @NotNull final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(getKey(), integer, project, new JavaSourceFilterScope(scope), PsiClass.class);
}
项目:intellij-ce-playground    文件:JavaStaticMemberNameIndex.java   
public Collection<PsiMember> getStaticMembers(final String name, final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(getKey(), name, project, new JavaSourceFilterScope(scope), PsiMember.class);
}
项目:intellij-ce-playground    文件:JavaMethodNameIndex.java   
@Override
public Collection<PsiMethod> get(@NotNull final String s, @NotNull final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiMethod.class);
}
项目:intellij-ce-playground    文件:JavaAnnotationIndex.java   
@Override
public Collection<PsiAnnotation> get(@NotNull final String s, @NotNull final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiAnnotation.class);
}
项目:intellij-ce-playground    文件:JavaStaticMemberTypeIndex.java   
public Collection<PsiMember> getStaticMembers(@NotNull final String shortTypeText, final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(JavaStubIndexKeys.JVM_STATIC_MEMBERS_TYPES, shortTypeText, project,
                               new JavaSourceFilterScope(scope), PsiMember.class);
}
项目:intellij-ce-playground    文件:JavaMethodParameterTypesIndex.java   
@Override
public Collection<PsiMethod> get(@NotNull final String s, @NotNull final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiMethod.class);
}
项目:intellij-ce-playground    文件:JavaShortClassNameIndex.java   
@Override
public Collection<PsiClass> get(@NotNull final String s, @NotNull final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiClass.class);
}
项目:intellij-ce-playground    文件:JavaAnonymousClassBaseRefOccurenceIndex.java   
@Override
public Collection<PsiAnonymousClass> get(@NotNull final String s, @NotNull final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiAnonymousClass.class);
}
项目:tools-idea    文件:JavaSuperClassNameOccurenceIndex.java   
@Override
public Collection<PsiReferenceList> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getInstance().safeGet(getKey(), s, project, new JavaSourceFilterScope(scope), PsiReferenceList.class);
}
项目:tools-idea    文件:JavaFieldNameIndex.java   
@Override
public Collection<PsiField> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getInstance().safeGet(getKey(), s, project, new JavaSourceFilterScope(scope), PsiField.class);
}
项目:tools-idea    文件:JavaFullClassNameIndex.java   
@Override
public Collection<PsiClass> get(final Integer integer, final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getInstance().safeGet(getKey(), integer, project, new JavaSourceFilterScope(scope), PsiClass.class);
}
项目:tools-idea    文件:JavaStaticMemberNameIndex.java   
public Collection<PsiMember> getStaticMembers(final String name, final Project project, @NotNull final GlobalSearchScope scope) {
  return super.get(name, project, new JavaSourceFilterScope(scope));
}
项目:tools-idea    文件:JavaMethodNameIndex.java   
@Override
public Collection<PsiMethod> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getInstance().safeGet(getKey(), s, project, new JavaSourceFilterScope(scope), PsiMethod.class);
}
项目:tools-idea    文件:JavaAnnotationIndex.java   
@Override
public Collection<PsiAnnotation> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getInstance().safeGet(getKey(), s, project, new JavaSourceFilterScope(scope), PsiAnnotation.class);
}
项目:tools-idea    文件:JavaStaticMemberTypeIndex.java   
public Collection<PsiMember> getStaticMembers(@NotNull final String shortTypeText, final Project project, @NotNull final GlobalSearchScope scope) {
  return super.get(shortTypeText, project, new JavaSourceFilterScope(scope));
}
项目:tools-idea    文件:JavaShortClassNameIndex.java   
@Override
public Collection<PsiClass> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getInstance().safeGet(getKey(), s, project, new JavaSourceFilterScope(scope), PsiClass.class);
}
项目:tools-idea    文件:JavaAnonymousClassBaseRefOccurenceIndex.java   
@Override
public Collection<PsiAnonymousClass> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return StubIndex.getInstance().safeGet(getKey(), s, project, new JavaSourceFilterScope(scope), PsiAnonymousClass.class);
}
项目:consulo-java    文件:JavaSuperClassNameOccurenceIndex.java   
@Override
public Collection<PsiReferenceList> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return super.get(s, project, new JavaSourceFilterScope(scope));
}
项目:consulo-java    文件:JavaFieldNameIndex.java   
@Override
public Collection<PsiField> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return super.get(s, project, new JavaSourceFilterScope(scope));
}
项目:consulo-java    文件:JavaFullClassNameIndex.java   
@Override
public Collection<PsiClass> get(@NotNull final Integer integer, @NotNull final Project project, @NotNull final GlobalSearchScope scope)
{
    return StubIndex.getElements(getKey(), integer, project, new JavaSourceFilterScope(scope), PsiClass.class);
}
项目:consulo-java    文件:JavaStaticMemberNameIndex.java   
public Collection<PsiMember> getStaticMembers(final String name, final Project project, @NotNull final GlobalSearchScope scope) {
  return super.get(name, project, new JavaSourceFilterScope(scope));
}
项目:consulo-java    文件:JavaMethodNameIndex.java   
@Override
public Collection<PsiMethod> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return super.get(s, project, new JavaSourceFilterScope(scope));
}
项目:consulo-java    文件:JavaAnnotationIndex.java   
@Override
public Collection<PsiAnnotation> get(@NotNull final String s, @NotNull final Project project, @NotNull final GlobalSearchScope scope)
{
    return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiAnnotation.class);
}
项目:consulo-java    文件:JavaStaticMemberTypeIndex.java   
public Collection<PsiMember> getStaticMembers(@NotNull final String shortTypeText, final Project project, @NotNull final GlobalSearchScope scope) {
  return super.get(shortTypeText, project, new JavaSourceFilterScope(scope));
}
项目:consulo-java    文件:JavaShortClassNameIndex.java   
@Override
public Collection<PsiClass> get(@NotNull final String s, @NotNull final Project project, @NotNull final GlobalSearchScope scope)
{
    return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiClass.class);
}
项目:consulo-java    文件:JavaAnonymousClassBaseRefOccurenceIndex.java   
@Override
public Collection<PsiAnonymousClass> get(final String s, final Project project, @NotNull final GlobalSearchScope scope) {
  return super.get(s, project, new JavaSourceFilterScope(scope));
}