Selecting a File in Project Tree


I'm repeating my question posting in a 'closed' thread.

I have a reference to a VirtualFile, I would like to make the corresponding node in the project tree to be selected, expanded (and scrolled to visible). As noted by Dimitry, the way to select a node in the project tree is:


However this method expects a SelectInContext, I do I get this context given a VirtualFile?


Please sign in to leave a comment.