The incremental builder does not handle deletion in its current implementation. To handle deletion, the IResourceDelta
instance needs to be inspected to find out what kind of delta took place and handle deleted resources accordingly.
Run the target Eclipse instance, and delete a
.minimark
file. An exception is thrown and reported to the user:To fix this issue, modify the check in the
MinimarkVisitor
methodprocessResource
to see whether the resource exists or not:private void processResource(IResource resource) throws CoreException { if (resource instanceof IFile && resource.exists()) {
This solves the
NullPointerException
, but the generated HTML file is left behind. If the.minimark
file is deleted, and there is a corresponding.html
file, that can be deleted as well. Modify thevisit(IResourceDelta)
method as follows:public boolean visit(IResourceDelta delta) throws CoreException { boolean deleted = (IResourceDelta.REMOVED & delta.getKind...