Reputation: 534
Is there a way to clear the eclipse markers in the Markers View programmatically? I'm logging Markers in eclipse Markers View.Before adding new markers,I want to clear the already existing markers for the same project alone.
Upvotes: 1
Views: 1227
Reputation: 3105
Another approach could be clearing the markers by project, instead of resource:
project.deleteMarkers("markerId", true, IProject.DEPTH_INFINITE);
Upvotes: 2
Reputation: 20023
Call IResource#deleteMarkers()
on the relevant resource: http://help.eclipse.org/kepler/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IResource.html#deleteMarkers(java.lang.String, boolean, int) .
Upvotes: 1