private static class AngularKeysProvider implements ParameterizedCachedValueProvider<List<String>, Pair<Project, ID<String, Void>>> {
@Nullable
@Override
public CachedValueProvider.Result<List<String>> compute(final Pair<Project, ID<String, Void>> projectAndIndex) {
final Set<String> allKeys = new THashSet<String>();
final FileBasedIndex index = FileBasedIndex.getInstance();
final GlobalSearchScope scope = GlobalSearchScope.allScope(projectAndIndex.first);
final CommonProcessors.CollectProcessor<String> processor = new CommonProcessors.CollectProcessor<String>(allKeys) {
@Override
protected boolean accept(String key) {
return true;
}
};
index.processAllKeys(projectAndIndex.second, processor, scope, null);
return CachedValueProvider.Result.create(ContainerUtil.filter(allKeys, new Condition<String>() {
@Override
public boolean value(String key) {
return !index.processValues(projectAndIndex.second, key, null, new FileBasedIndex.ValueProcessor<Void>() {
@Override
public boolean process(VirtualFile file, Void value) {
return false;
}
}, scope);