Get all PSI/Virtual Files within a project


I am writing a small Intellij plugin, and in that I need to get all source code files that are within a specific project as PSI/Virtual file (in my understanding both are interexchangeable so it won't matter which of the two I get). 

Is there any way to do this? 


Comment actions Permalink


thanks for your answer and as it seems this should work. But I don't know how to get the LanguageFileType. Can you tell me how I can get instances of the LanguageFileType for at least java ? 

Comment actions Permalink

For Java, it's com.intellij.ide.highlighter.JavaFileType#INSTANCE
You can lookup any others via "Goto Class" and typing "*FileType" to list all classes matching this pattern.

See also


Please sign in to leave a comment.