How to find a file with a specific extension (.aidl) ?

Answered

I need to change an .aidl file using my plugin but I am having trouble getting files with the .aidl extension since it's not a standard type and thereby I can't use it in this:

Collection<VirtualFile> xmlFiles = FileBasedIndex.getInstance().getContainingFiles(
FileTypeIndex.NAME,
XmlFileType.INSTANCE, //Should be Aidl here
GlobalSearchScope.allScope(getProject()));

Any idea on how to address this issue?

 

1 comment
Comment actions Permalink

You can use com.intellij.psi.search.FilenameIndex#getAllFilesByExt(com.intellij.openapi.project.Project, java.lang.String, com.intellij.psi.search.GlobalSearchScope)

2

Please sign in to leave a comment.