Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Incremental Project Builders

Identifier:
org.eclipse.core.resources.builders

Description:
The workspace supports the notion of an incremental project builder (or "builder" for short"). The job of a builder is to process a set of resource changes (supplied as a resource delta). For example, a Java builder would recompile changed Java files and produce new class files.

Builders are configured on a per-project basis and run automatically when resources within their project are changed. As such, builders should be fast and scale with respect to the amount of change rather than the number of resources in the project. This typically implies that builders are able to incrementally update their "built state".

The builders extension-point allows builder writers to register their builder implementation under a symbolic name that is then used from within the workspace to find and run builders. The symbolic name is the id of the builder extension. When defining a builder extension, users are encouraged to include a human-readable value for the "name" attribute which identifies their builder and potentially may be presented to users.

Configuration Markup:

<!ELEMENT extension ( builder)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #REQUIRED

name  CDATA #IMPLIED

>

  • point - a fully qualified identifier of the target extension point
  • id - an optional identifier of the extension instance
  • name - an optional name of the extension instance

<!ELEMENT builder ( run?)>

<!ATTLIST builder

hasNature        (true | false)

isConfigurable   (true | false)

callOnEmptyDelta (true | false)

>

  • hasNature - "true" or "false" indicating whether the builder is owned by a project nature. If "true" and no corresponding nature is found, this builder will not run but will remain in the project's build spec. If the attribute is not specified, it is assumed to be "false".
  • isConfigurable - "true" or "false" indicating whether the builder allows customization of what build triggers it will respond to. If "true", clients will be able to use the API ICommand.setBuilding to specify if this builder should be run for a particular build trigger. If the attribute is not specified, it is assumed to be "false".
  • callOnEmptyDelta - "true" or "false" indicating whether the builder should be called on INCREMENTAL_BUILD when the resource deltas for its affected projects are empty. If "true", the builder will always be called on builds of type INCREMENTAL_BUILD, regardless of whether any resources in the affected projects have changed. If "false" or unspecified, the builder will only be called when affected projects have changed. The value of this attribute does not affect the behaviour of builders for other build triggers, such as AUTO_BUILD or FULL_BUILDThis attribute is intended to be used by builders that incrementally react to changing circumstances outside of the workspace, such as external libraries.

<!ELEMENT run ( parameter*)>

<!ATTLIST run

class CDATA #REQUIRED

>

  • class - the fully-qualified name of a subclass of org.eclipse.core.resources.IncrementalProjectBuilder.

<!ELEMENT parameter EMPTY>

<!ATTLIST parameter

name  CDATA #REQUIRED

value CDATA #REQUIRED

>

  • name - the name of this parameter made available to instances of the specified builder class
  • value - an arbitrary value associated with the given name and made available to instances of the specified builder class

Examples:
Following is an example of a builder configuration:


   <extension id=
"coolbuilder"
 name=
"Cool Builder"
 point=
"org.eclipse.core.resources.builders"
> 
      <builder hasNature=
"false"
> 
         <run class=
"com.xyz.builders.Cool"
> 
            <parameter name=
"optimize"
 value=
"true"
/> 
            <parameter name=
"comment"
 value=
"Produced by the Cool Builder"
/> 
         </run> 
      </builder> 
   </extension> 

If this extension was defined in a plug-in with id "com.xyz.coolplugin", the fully qualified name of this builder would be "com.xyz.coolplugin.coolbuilder".

Supplied Implementation:
The platform itself does not have any predefined builders. Particular product installs may include builders as required.


Copyright (c) 2002, 2006 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v10.html


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire