Ejemplo n.º 1
0
  public Collection<PsiElement> getJetExtensionFunctionsByName(
      @NotNull String name, @NotNull GlobalSearchScope scope) {
    HashSet<PsiElement> functions = new HashSet<PsiElement>();
    functions.addAll(JetExtensionFunctionNameIndex.getInstance().get(name, project, scope));
    functions.addAll(
        JetFromJavaDescriptorHelper.getTopExtensionFunctionPrototypesByName(name, project, scope));

    return functions;
  }
Ejemplo n.º 2
0
  /**
   * Get jet extensions top-level function names. Method is allowed to give invalid names - all
   * result should be checked with getAllJetExtensionFunctionsByName().
   *
   * @return
   */
  @NotNull
  public Collection<String> getAllJetExtensionFunctionsNames(@NotNull GlobalSearchScope scope) {
    Set<String> extensionFunctionNames = new HashSet<String>();

    extensionFunctionNames.addAll(JetExtensionFunctionNameIndex.getInstance().getAllKeys(project));
    extensionFunctionNames.addAll(
        JetFromJavaDescriptorHelper.getTopExtensionFunctionNames(project, scope));

    return extensionFunctionNames;
  }