Search in sources :

Example 1 with CoreServiceDefinitionParserVisitor

use of com.cedricziel.idea.typo3.psi.visitor.CoreServiceDefinitionParserVisitor in project idea-php-typo3-plugin by cedricziel.

the class CoreServiceParser method collectServices.

private void collectServices(Project project) {
    FileBasedIndex index = FileBasedIndex.getInstance();
    Collection<VirtualFile> containingFiles = index.getContainingFiles(FileTypeIndex.NAME, PhpFileType.INSTANCE, GlobalSearchScope.allScope(project));
    containingFiles.removeIf(virtualFile -> !(virtualFile.getName().contains("ext_localconf.php")));
    for (VirtualFile projectFile : containingFiles) {
        PsiFile psiFile = PsiManager.getInstance(project).findFile(projectFile);
        if (psiFile != null) {
            psiFile.accept(new CoreServiceDefinitionParserVisitor(serviceMap));
        }
    }
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) CoreServiceDefinitionParserVisitor(com.cedricziel.idea.typo3.psi.visitor.CoreServiceDefinitionParserVisitor) PsiFile(com.intellij.psi.PsiFile) FileBasedIndex(com.intellij.util.indexing.FileBasedIndex)

Aggregations

CoreServiceDefinitionParserVisitor (com.cedricziel.idea.typo3.psi.visitor.CoreServiceDefinitionParserVisitor)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 PsiFile (com.intellij.psi.PsiFile)1 FileBasedIndex (com.intellij.util.indexing.FileBasedIndex)1