How can I programmatically update an Eclipse view? (I suppose this might not need to be specific to RSE?).
Background: I use Remote System Explorer (RSE) for Eclipse, do some stuff by executing remote commands via SSH, which creates new files on the remote host. I realized that the SFTP file listing in the Remote systems view does not automatically get updated to show the newly created file.
I have managed so far to get the relevant view, like so:
IWorkbench workbench = PlatformUI.getWorkbench();
IViewRegistry viewReg = workbench.getViewRegistry();
IViewDescriptor[] views = viewReg.getViews();
for (IViewDescriptor view : views) {
String viewID = view.getId();
System.out.println("View ID: " + viewID);
if (viewID.equals("org.eclipse.rse.ui.view.systemView")) {
// Do something with the view here
}
}
... and for possibly doing something RSE specific, I tried grabbing the RemoteFileSubSystem:
IRemoteFileSubSystem rfss = RemoteFileUtility.getFileSubSystem(HPCUtils.getApplication().getHPCHost());
... but neither in the ViewDescriptor object, nor the FileSubSystem, I have found any way to refresh the view, or the file subsystem. What have I missed?