I try to refresh my Sirius Project programmatically like it refreshs if I'm press F5. project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor())
doesn't refresh the project the way I want, so I checked out what the org.eclipse.ui.actions.RefreshAction
does. I found out that org.eclipse.ui.actions.RefreshAction
use the following code snippet
shell.getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
StructuredViewer viewer = getActionSite().getStructuredViewer();
if (viewer != null && viewer.getControl() != null && !viewer.getControl().isDisposed()) {
viewer.refresh();
}
}
});
to refresh the modelexplorer view like i want to. My problem right now is that I got the modelexplorer view, but don't know how I access the viewer from it, to refresh the view. Does anyone got any clue how to do it?