Hi,
following the great IBM tutorial[Best practices for developing Eclipse plugins] I managed to create Markers in the the editor. However I I've tried to delete them. The problem is, that the opened files don't get updated after the deleting(When I close and reopen the file the markers are deleted). How can I invoke an update on the marker bar?
public class SynchronizeEventsAction implements IWorkbenchWindowActionDelegate {
public SynchronizeEventsAction() {
super();
}
@Override
public void run(IAction action) {
deleteMarkers();
}
private void deleteMarkers() {
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
.getProjects();
for (IProject project : projects) {
try {
project.deleteMarkers(MarkerFactory.MARKER, false,
IProject.DEPTH_INFINITE);
} catch (CoreException e) {
e.printStackTrace();
}
}
}
@Override
public void selectionChanged(IAction action, ISelection selection) {
}
@Override
public void dispose() {
}
@Override
public void init(IWorkbenchWindow window) {
}
}