I am new in eclipse plugin development. I want to refresh my workspace or complete Eclipse programmatically . so is there any to refresh eclipse programmatically.
Use the IResource.refreshLocal()
API. You can do this at project root, a particular folder or an individual file. To refresh all projects in a workspace, simply enumerate all projects using ResourcesPlugin.getWorkspace().getRoot().getProjects()
API and refresh each in turn.
Here is a quick snippet to refresh each project in the Eclipse workspace.
for(IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()){
project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With