-
Book Overview & Buying
-
Table Of Contents
Eclipse Plug-in Development Beginner's Guide - Second Edition
By :
The final part of the puzzle is to implement the incremental part of the builder. Most of the builds that Eclipse performs are incremental, which means that it only compiles the files that are needed at each point. An incremental build gives a resource delta, which contains which files have been modified, added, or removed. This is implemented in an IResourceDelta interface, which is handed to the IResourceDeltaVisitor method visit. A resource delta combines an IResource instance with a flag that says whether it was added or removed.
Open the MinimarkVisitor and go to the visit(IResourceDelta) method. This is used by the incremental build when individual files are changed. Since the delta already has a resource, it can be used to determine whether the file is relevant, and if so, pass it to the processResource method:
public boolean visit(IResourceDelta delta) throws CoreException {
IResource resource = delta.getResource();
if(resource...
Change the font size
Change margin width
Change background colour