Hi there. Bad news & good news.
The bad news is that you’re doing it all wrong.
The good news is that the right way to do it is pretty easy. In your Designer module hook, you want to add a new node to the nav tree.
- Create your workspace implementation, and register it using context.registerResourceWorkspace()
- Make your node by creating a subclass of AbstractNavTreeNode. Make sure to override getWorkspaceName() to return the name of your workspace (this is what will automatically switch to your workspace when the node is selected)
- Add your node using context.getProjectBrowserRoot().addChild()