# Builds

Builders create or modify workspace resources, usually based on the existence and state of other resources. They are a powerful mechanism for enforcing the constraints of some domain. For example, a Java builder converts Java source files (.java files) into executable class files (.class files), a web link builder updates links to files whose name/location have changed, etc. As resources are created and modified, builders are run and the constraints are maintained. This transform need not be one to one. For example, a single .java file can produce several .class files.

## Auto-build vs. Manual Build

There are two distinct user work modes with respect to building: relying on Auto-build, or user initiated manual building.

Users who do not need fine-grained control over when builds occur may simply choose to turn on auto-building. With auto-building on, builds occur after every set of resource changes (e.g., saving a file, importing a ZIP, ...). Auto-building is efficient because the amount of work done is proportional to the amount of change done. The benefit of auto-building is that your derived resources (e.g., Java .class files) are always up to date. Auto-building is turned on/off via the Perform build automatically on resource modification option on the Window > Preferences > Workbench page.

Users needing more control over when builds occur can turn off auto-building and manually invoke builds. This is sometimes desirable in cases where,for example, you know building is of no value until you finish a large set of changes. In this case there is no benefit to paying the cost of auto-building. Builds can be invoked manually in numerous ways, for example, by selecting Rebuild All from a project's context menu.

The disadvantage of manual building is that the tasks which were generated to indicate build errors quickly become out of date until you build. In addition, it is very important that you remember to manually build before relying on build output (e.g. before running your Java program).

## Full vs. Incremental Builds

There are two kinds of builds: full and incremental. An incremental build works with a previous built state and applies the transforms of the configured builders only on the resources which have changed since that previous state was computed (i.e., since the last build). Auto-building uses incremental building for efficiency.

A full build (a.k.a. rebuild) discards any existing built state and transforms all requested resources according the domain rules of the configured builders. The first incremental build is equivalent to a full build as there is no previous state to work from.

Depending on the user's needs, full and incremental builds can be done over a specific set of projects or the workspace as a whole. Specific files and folders cannot be built.