Package com.intellij.psi.search

Examples of com.intellij.psi.search.LocalSearchScope


    final HaxeComponent component = PsiTreeUtil.getParentOfType(getParent(), HaxeComponent.class, true);
    if (type == null || component == null) {
      return super.getUseScope();
    }
    if (type == HaxeComponentType.FUNCTION || type == HaxeComponentType.PARAMETER || type == HaxeComponentType.VARIABLE) {
      return new LocalSearchScope(component);
    }
    return super.getUseScope();
  }
View Full Code Here


    }

    @NotNull
    @Override
    public SearchScope getUseScope() {
        return new LocalSearchScope(getFile());
    }
View Full Code Here

    final int lastElementEndOffset = lastElement.getTextOffset() + lastElement.getTextLength();
    final int firstElementStartOffset = elements[0].getTextOffset();

    // find out params
    assert scope != null;
    final LocalSearchScope localSearchScope = new LocalSearchScope(scope);
    final List<DartComponentName> outDeclarations = ContainerUtil.filter(
      DartControlFlowUtil.getSimpleDeclarations(elements, null, false),
      new Condition<DartComponentName>() {
        @Override
        public boolean value(DartComponentName componentName) {
View Full Code Here

    final DartComponent component = PsiTreeUtil.getParentOfType(getParent(), DartComponent.class, true);
    final boolean localType = type == DartComponentType.FUNCTION
                              || type == DartComponentType.PARAMETER
                              || type == DartComponentType.VARIABLE;
    if (localType && component != null) {
      return new LocalSearchScope(component);
    }
    return super.getUseScope();
  }
View Full Code Here

  }

  @NotNull
  @Override
  public SearchScope getUseScope() {
    return new LocalSearchScope(getContainingFile());
  }
View Full Code Here

  }

  @NotNull
  @Override
  public SearchScope getUseScope() {
    return new LocalSearchScope(getContainingFile());
  }
View Full Code Here

  }

  @NotNull
  @Override
  public SearchScope getUseScope() {
    return new LocalSearchScope(getContainingFile());
  }
View Full Code Here

    public static SearchScope getLocalElementSearchScope(GoPsiElement element) {
        GoStatement statement = findParentOfType(element, GoStatement.class);
        if (statement == null) {
            GoFunctionDeclaration functionDeclaration = findParentOfType(element, GoFunctionDeclaration.class);
            if (functionDeclaration != null) {
                return new LocalSearchScope(functionDeclaration);
            }
            return new LocalSearchScope(element);
        }

        PsiElement scope = statement.getParent();
        if (scope instanceof GoVarDeclarations) {
            scope = scope.getParent();
        }

        if (scope == null) {
            scope = element;
        }

        return new LocalSearchScope(scope);
    }
View Full Code Here

    private static SearchScope getPackageSearchScope(GoPsiElement element) {
        GoNamesCache namesCache = GoNamesCache.getInstance(element.getProject());
        String packageName = ((GoFile) element.getContainingFile()).getPackageName();
        Collection<GoFile> files = namesCache.getFilesByPackageName(packageName);
        return new LocalSearchScope(files.toArray(new PsiElement[files.size()]));
    }
View Full Code Here

    final int lastElementEndOffset = lastElement.getTextOffset() + lastElement.getTextLength();
    final int firstElementStartOffset = first.getTextOffset();

    // find out params
    assert scope != null;
    final LocalSearchScope localSearchScope = new LocalSearchScope(scope);
    List<ErlangNamedElement> outDeclarations = ContainerUtil.filter(
      getSimpleDeclarations(elements),
      new Condition<ErlangNamedElement>() {
        @Override
        public boolean value(ErlangNamedElement componentName) {
View Full Code Here

TOP

Related Classes of com.intellij.psi.search.LocalSearchScope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.