Open file tree

Is there an API to open the fileTree and trigger the highlight of currently open file?
I’d like to make sure the fileTree is always open at theia startup.

@jeluard it is definitely possible, you can rebind FileNavigatorContribution to update the onStart lifecycle hook to perform something similar to the getting-started widget (to open the view on startup).

If you’d like to highlight a node in the tree, you can use the ApplicationShell to determine if there are any currently opened editors present in the application and highlight (selectNode) the tree node.

Additional Information:


Can I highlight a specific file in the FileTree using this method?

The highlight of a currently opened file is already supported, but if you’d like to highlight a specific node in the tree (given that you identify the node) you can call selectNode to highlight it.