Package com.intellij.util.indexing

Examples of com.intellij.util.indexing.FileBasedIndex


  }

  @Override
  @Nullable
  public PsiElement resolveInner() {
    final FileBasedIndex instance = FileBasedIndex.getInstance();
    final Project project = getElement().getProject();
    final String id = getCanonicalText();
    final Collection<VirtualFile> files = instance.getContainingFiles(AngularTemplateCacheIndex.TEMPLATE_CACHE_INDEX, id,
                                                                      GlobalSearchScope.allScope(project));
    final Ref<PsiElement> result = new Ref<PsiElement>();
    for (VirtualFile file : files) {
      final PsiFile psiFile = PsiManager.getInstance(project).findFile(file);
      AngularTemplateCacheIndex.processTemplates(psiFile, new Processor<XmlAttribute>() {
View Full Code Here


  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);
View Full Code Here

TOP

Related Classes of com.intellij.util.indexing.FileBasedIndex

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.