@NotNull @Override public PsiField[] getFieldsByName(@NotNull String name, @NotNull final GlobalSearchScope scope) { final Collection<PsiField> fields = JavaFieldNameIndex.getInstance().get(name, myManager.getProject(), scope); if (fields.isEmpty()) return PsiField.EMPTY_ARRAY; List<PsiField> list = filterMembers(fields, scope); return list.toArray(new PsiField[list.size()]); }
@NotNull @Override public PsiField[] getFieldsByName(@NotNull String name, @NotNull final GlobalSearchScope scope) { final Collection<PsiField> fields = JavaFieldNameIndex.getInstance().get(name, myManager.getProject(), scope); if(fields.isEmpty()) { return PsiField.EMPTY_ARRAY; } List<PsiField> list = filterMembers(fields, scope); return list.toArray(new PsiField[list.size()]); }
@Override @NotNull public String[] getAllFieldNames() { return ArrayUtil.toStringArray(JavaFieldNameIndex.getInstance().getAllKeys(myManager.getProject())); }
@Override public void getAllFieldNames(@NotNull HashSet<String> set) { JavaFieldNameIndex.getInstance().processAllKeys(myManager.getProject(), new CommonProcessors.CollectProcessor<String>(set)); }