-
Book Overview & Buying
-
Table Of Contents
Eclipse Plug-in Development Beginner's Guide - Second Edition
By :
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 method processResource 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 the visit(IResourceDelta) method as follows:
public boolean visit(IResourceDelta delta) throws CoreException {
boolean deleted = (IResourceDelta.REMOVED & delta.getKind...
Change the font size
Change margin width
Change background colour