|
Re: Content / Label provider in project explorer not refreshing with IResource.refreshLocal [message #1756401 is a reply to message #1756394] |
Thu, 16 March 2017 12:31 |
Jens Rabe Messages: 81 Registered: September 2013 |
Member |
|
|
I came up with this workaround which I execute after the save was successful (Scala):
getSite.
getWorkbenchWindow.
getPages.
flatMap(_.getViewReferences).
filter(_.getId.equals("org.eclipse.ui.navigator.ProjectExplorer")).
map(_.getView(false)).
filter(x => x != null).
map(_.getSite).
flatMap {
case e: IEditorSite => Some(e.getActionBars)
case v: IViewSite => Some(v.getActionBars)
case _ => None
}.
map(_.getGlobalActionHandler(REFRESH.getId)).
filter(x => x != null).
foreach(_.run)
So, what I basically do, is: I go through all currently open views, find the ones with the Project Explorer id, get their ActionBars, from these, get the global refresh command, and run it.
However, this looks a bit hackish, so is there a better way?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05344 seconds