I am using a treeview to display the file system. If i create a new file and refresh the viewer the new file is there. I need to set the selection in the viewer to that file though and only have the path and filename.
How can I set the selection?
You might be able to create a new treeview that takes all the nodes beneath the one you just created and set that as the current perspective ID or view.
The node I want to select is a file and would not have any children.
It seems like I need to be able to search the tree for a treeItem based on a string filepath. Is this possible?
Are you trying to open a new view(that file) or just have that file selected and have the viewer refresh?
If its the first one then I have no idea. I'm trying to figure something similar out for my project.
If it's the latter I don't think it can be done but I'm really not the person to ask. Pretty new to viewers and actions.
I want to select the added file and refresh the view so that the file selected is expanded to.
That will be the file that is open for the user so it needs to be shown.