Get all PSI/Virtual Files within a project

Answered

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? 

 

3 comments
Comment actions Permalink

Hi,

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 ? 

0
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 https://plugins.jetbrains.com/docs/intellij/explore-api.html

0

Please sign in to leave a comment.