I’m creating new tree nodes for my resources in the project browser hierarchy. I have registered a ResourceWorkspace implementation using DesignerContext.registerResourceWorkspace() and setup AbstractNavTreeNode.getWorkspaceName().
This all works correctly, my workspace is activated when any of my nodes are selected. However, it is not obvious where or when I am supposed to load the resource data into the workspace. Are there any prescribed hooks for this or is it up to me?
The only way I can think to do this at the moment is to leave a workspace pointer somewhere that the tree nodes can see and then use onSelected() to trigger an update on the workspace. Doing this by hand seems counter-intuitive given that there is a mechanism for selecting the workspace automatically. I would actually expect the opposite.
I don’t need to deal with a tabbed interface or multiple resources- I just need a view that allows editing of a single selected resource. If another resource is selected before the first one is saved any changes may be simply thrown away.
I’m sure I am missing something. Any pointers greatly appreciated.