How to navigate to source code, with only file name & line number?

Answered

I need to navigate to source code, from an action with information of file name & line number.

0
1 comment

Locate VirtualFile by name from com.intellij.psi.search.FilenameIndex#getVirtualFilesByName(com.intellij.openapi.project.Project, java.lang.String, com.intellij.psi.search.GlobalSearchScope), then construct com.intellij.openapi.fileEditor.OpenFileDescriptor and pass additionally line/column, then call descriptor.navigate()

0

Please sign in to leave a comment.