|
4 | 4 | import com.intellij.openapi.project.Project;
|
5 | 5 | import com.intellij.psi.search.GlobalSearchScope;
|
6 | 6 | import com.intellij.util.indexing.FileBasedIndexImpl;
|
7 |
| -import fr.adrienbrault.idea.symfony2plugin.Symfony2InterfacesUtil; |
8 | 7 | import fr.adrienbrault.idea.symfony2plugin.config.component.parser.ParameterServiceParser;
|
9 | 8 | import fr.adrienbrault.idea.symfony2plugin.dic.ContainerParameter;
|
10 | 9 | import fr.adrienbrault.idea.symfony2plugin.dic.ContainerService;
|
@@ -147,7 +146,10 @@ public Map<String, ContainerService> getServices() {
|
147 | 146 | }
|
148 | 147 |
|
149 | 148 | if(this.sources.contains(Source.INDEX)) {
|
150 |
| - for(String serviceName: FileBasedIndexImpl.getInstance().getAllKeys(ServicesDefinitionStubIndex.KEY, project)) { |
| 149 | + SymfonyProcessors.CollectProjectUniqueKeysStrong projectUniqueKeysStrong = new SymfonyProcessors.CollectProjectUniqueKeysStrong(project, ServicesDefinitionStubIndex.KEY, this.services.keySet()); |
| 150 | + FileBasedIndexImpl.getInstance().processAllKeys(ServicesDefinitionStubIndex.KEY, projectUniqueKeysStrong, project); |
| 151 | + |
| 152 | + for(String serviceName: projectUniqueKeysStrong.getResult()) { |
151 | 153 |
|
152 | 154 | // we have higher priority on compiler, which already has safe value
|
153 | 155 | if(!this.services.containsKey(serviceName)) {
|
@@ -239,7 +241,9 @@ private Set<String> getNames() {
|
239 | 241 | }
|
240 | 242 |
|
241 | 243 | if(this.sources.contains(Source.INDEX)) {
|
242 |
| - serviceNames.addAll(FileBasedIndexImpl.getInstance().getAllKeys(ServicesDefinitionStubIndex.KEY, project)); |
| 244 | + SymfonyProcessors.CollectProjectUniqueKeysStrong projectUniqueKeysStrong = new SymfonyProcessors.CollectProjectUniqueKeysStrong(project, ServicesDefinitionStubIndex.KEY, serviceNames); |
| 245 | + FileBasedIndexImpl.getInstance().processAllKeys(ServicesDefinitionStubIndex.KEY, projectUniqueKeysStrong, project); |
| 246 | + serviceNames.addAll(projectUniqueKeysStrong.getResult()); |
243 | 247 | }
|
244 | 248 |
|
245 | 249 | return serviceNames;
|
@@ -314,8 +318,10 @@ private Map<String, ContainerParameter> getParameters() {
|
314 | 318 | }
|
315 | 319 |
|
316 | 320 | if(this.sources.contains(Source.INDEX)) {
|
| 321 | + SymfonyProcessors.CollectProjectUniqueKeysStrong projectUniqueKeysStrong = new SymfonyProcessors.CollectProjectUniqueKeysStrong(project, ContainerParameterStubIndex.KEY, this.containerParameterMap.keySet()); |
| 322 | + FileBasedIndexImpl.getInstance().processAllKeys(ContainerParameterStubIndex.KEY, projectUniqueKeysStrong, project); |
317 | 323 |
|
318 |
| - for(String parameterName: FileBasedIndexImpl.getInstance().getAllKeys(ContainerParameterStubIndex.KEY, project)) { |
| 324 | + for(String parameterName: projectUniqueKeysStrong.getResult()) { |
319 | 325 |
|
320 | 326 | // indexes is weak stuff, dont overwrite compiled ones
|
321 | 327 | if(!this.containerParameterMap.containsKey(parameterName)) {
|
@@ -354,7 +360,9 @@ private Set<String> getNames() {
|
354 | 360 | }
|
355 | 361 |
|
356 | 362 | if(this.sources.contains(Source.INDEX)) {
|
357 |
| - parameterNames.addAll(FileBasedIndexImpl.getInstance().getAllKeys(ContainerParameterStubIndex.KEY, project)); |
| 363 | + SymfonyProcessors.CollectProjectUniqueKeysStrong projectUniqueKeysStrong = new SymfonyProcessors.CollectProjectUniqueKeysStrong(project, ContainerParameterStubIndex.KEY, parameterNames); |
| 364 | + FileBasedIndexImpl.getInstance().processAllKeys(ContainerParameterStubIndex.KEY, projectUniqueKeysStrong, project); |
| 365 | + parameterNames.addAll(projectUniqueKeysStrong.getResult()); |
358 | 366 | }
|
359 | 367 |
|
360 | 368 | return parameterNames;
|
|
0 commit comments