mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
additional CacheManagers support
This commit is contained in:
@@ -141,7 +141,7 @@ public class PsiManagerImpl extends PsiManager implements ProjectComponent {
|
||||
mySearchHelper = new PsiSearchHelperImpl(this);
|
||||
myResolveHelper = new PsiResolveHelperImpl(this);
|
||||
//myMemoryManager = new MemoryManager();
|
||||
CompositeCacheManager cacheManager = new CompositeCacheManager();
|
||||
final CompositeCacheManager cacheManager = new CompositeCacheManager();
|
||||
if (psiManagerConfiguration.REPOSITORY_ENABLED) {
|
||||
myShortNamesCache = new PsiShortNamesCacheImpl(this, projectRootManagerEx);
|
||||
cacheManager.addCacheManager(new CacheManagerImpl(this));
|
||||
@@ -152,6 +152,10 @@ public class PsiManagerImpl extends PsiManager implements ProjectComponent {
|
||||
cacheManager.addCacheManager(new EmptyRepository.CacheManagerImpl());
|
||||
myRepositoryElementsManager = new EmptyRepository.MyRepositoryElementsManager(this);
|
||||
}
|
||||
final CacheManager[] managers = myProject.getComponents(CacheManager.class);
|
||||
for (int i = 0; i < managers.length; i++) {
|
||||
cacheManager.addCacheManager(managers[i]);
|
||||
}
|
||||
|
||||
myCacheManager = cacheManager;
|
||||
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package com.intellij.psi.impl.cache.impl;
|
||||
|
||||
import com.intellij.psi.impl.cache.CacheManager;
|
||||
import com.intellij.ide.startup.CacheUpdater;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.impl.cache.CacheManager;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.search.TodoPattern;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.ide.startup.CacheUpdater;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
@@ -23,12 +22,6 @@ public class CompositeCacheManager implements CacheManager{
|
||||
myManagers.add(manager);
|
||||
}
|
||||
|
||||
public void addProjectComponent(CacheManager cacheManager) {
|
||||
if (cacheManager != null) {
|
||||
addCacheManager(cacheManager);
|
||||
}
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
for (int i = 0; i < myManagers.size(); i++) {
|
||||
CacheManager cacheManager = myManagers.get(i);
|
||||
|
||||
Reference in New Issue
Block a user