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
Please sign in to leave a comment.
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.
Thanks for prompt reply. Is there any API availble to use file name index?
com.intellij.psi.search.FilenameIndex