Search code examples
eclipse-rcpeclipse-plugineclipse-pde

Clearing Eclipse Markers Programmatically


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.


Solution

  • 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) .