title: I want to write an IDEA plugin that performs the same functions as `Always Select Opened File`
body: <p>Creating my IDEA plugin. If give a path, I can open the corresponding file through the following code:</p>
  <pre class="lang-java prettyprint-override"><code>VirtualFile classFile = LocalFileSystem.getInstance().findFileByPath(f.getAbsolutePath());
  OpenFileDescriptor openFileDescriptor = new OpenFileDescriptor(project, classFile);
  FileEditorManager.getInstance(project).openTextEditor(openFileDescriptor, true);
  </code></pre>
  <p>But I want the Navigation view on the left to also focus on the file represented by the path I give.</p>
  <p><a href="https://i.stack.imgur.com/3NxpZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3NxpZ.png" alt="enter image description here" /></a></p>
  <p>This is similar to the setting of 'always select opened file'.</p>
  <p><a href="https://i.stack.imgur.com/PiG2G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PiG2G.png" alt="enter image description here" /></a></p>
  <p>I didn't find what I needed in the <a href="https://plugins.jetbrains.com/docs/intellij/basics.html" rel="nofollow noreferrer">official API</a>.</p>
  <p>I sincerely hope for help.</p>