How traverse through project in IntelliJ?

Hi Team,
   I want to traverse project in workspace and find a specific file. For example, Imagine I have created few java projects in intellij and I want to find Test.java file. How should implement that kind of scenario.

Thanks,
Navin

0
3 comments

First of all make sure you understand IntelliJ IDEA project structure. There's no such thing as workspace and also unlikely you need to work with more than one project simultaneously. See https://www.jetbrains.com/idea/help/intellij-idea-vs-eclipse-terminology.html

Unlikely you\ll ever need to traverse project to find something. Use indexes instead. To find file by name you can use FileNameIndex.

0
Avatar
Permanently deleted user

Thanks for prompt reply. Is there any API availble to use file name index?

0

com.intellij.psi.search.FilenameIndex

0

Please sign in to leave a comment.