org.eclipse.cdt.managedbuilder.buildmodel
Class BuildDescriptionManager

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager

public class BuildDescriptionManager
extends java.lang.Object

This class represents the build description manager Te build description manager is the entry point for all build description-related operations


Field Summary
static int DEPFILES
          include the dependency file (.d) information in the build model.
static int DEPS
          include dependencies information into the build model.
static int REBUILD
          include the rebuild state information into the build model
static int REMOVED
          include information on removed resources into the build model
 
Method Summary
static void accept(IStepVisitor visitor, IBuildDescription des, boolean up)
          runs though all steps in build description in the dependency order and notifies the visitor callback the order in which steps are enumerated depends on the "up" argument
static void cleanGeneratedRebuildResources(IBuildDescription des)
          cleans the resources to be rebuilt
static IBuildDescription createBuildDescription(IConfiguration cfg, IConfigurationBuildState bs, org.eclipse.core.resources.IResourceDelta delta, int flags)
           
static IBuildDescription createBuildDescription(IConfiguration cfg, org.eclipse.core.resources.IResourceDelta delta, int flags)
          creates the build description
static IBuildResource[] filterGeneratedBuildResources(IBuildResource[] rc, int rcState)
           
static org.eclipse.core.resources.IResource findResourceForBuildResource(IBuildResource bRc)
          returns the project resource for the given build resource or null if the project does not contain the build resource
static org.eclipse.core.runtime.IPath getRelPath(org.eclipse.core.runtime.IPath cwd, org.eclipse.core.runtime.IPath location)
           
static IBuildStep[] getSteps(IBuildStep step, boolean input)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REMOVED

public static final int REMOVED
include information on removed resources into the build model

See Also:
Constant Field Values

REBUILD

public static final int REBUILD
include the rebuild state information into the build model

See Also:
Constant Field Values

DEPS

public static final int DEPS
include dependencies information into the build model. the method to be used for calculation is determined by the manager

See Also:
Constant Field Values

DEPFILES

public static final int DEPFILES
include the dependency file (.d) information in the build model.

See Also:
Constant Field Values
Method Detail

createBuildDescription

public static IBuildDescription createBuildDescription(IConfiguration cfg,
                                                       org.eclipse.core.resources.IResourceDelta delta,
                                                       int flags)
                                                throws org.eclipse.core.runtime.CoreException
creates the build description

Parameters:
cfg - the build configuration for which the description is to be created
delta - the resource delta or null if none
flags - specifies how the build description should be generated and what information it should contain. Can contain the following flags: BuildDescriptionManager.REBUILD, BuildDescriptionManager.REMOVED, BuildDescriptionManager.DEPS, BuildDescriptionManager.DEPFILES
Returns:
IBuildDescription
Throws:
org.eclipse.core.runtime.CoreException - if the build description creation fails
See Also:
REBUILD, REMOVED, DEPS, DEPFILES

createBuildDescription

public static IBuildDescription createBuildDescription(IConfiguration cfg,
                                                       IConfigurationBuildState bs,
                                                       org.eclipse.core.resources.IResourceDelta delta,
                                                       int flags)
                                                throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

accept

public static void accept(IStepVisitor visitor,
                          IBuildDescription des,
                          boolean up)
                   throws org.eclipse.core.runtime.CoreException
runs though all steps in build description in the dependency order and notifies the visitor callback the order in which steps are enumerated depends on the "up" argument

Parameters:
visitor - represents the visitor callback
des - represents the build description
up - specifies the order in which build steps are to be enumerated if true, enumeration will be performed starting from the input step and ending with the output state. Otherwise enumeration will be performed in the reversed order
Throws:
org.eclipse.core.runtime.CoreException - if the operation fails

getSteps

public static IBuildStep[] getSteps(IBuildStep step,
                                    boolean input)

filterGeneratedBuildResources

public static IBuildResource[] filterGeneratedBuildResources(IBuildResource[] rc,
                                                             int rcState)

findResourceForBuildResource

public static org.eclipse.core.resources.IResource findResourceForBuildResource(IBuildResource bRc)
returns the project resource for the given build resource or null if the project does not contain the build resource

Parameters:
bRc - build resource
Returns:
IResource

cleanGeneratedRebuildResources

public static void cleanGeneratedRebuildResources(IBuildDescription des)
                                           throws org.eclipse.core.runtime.CoreException
cleans the resources to be rebuilt

Parameters:
des - build description
Throws:
org.eclipse.core.runtime.CoreException

getRelPath

public static org.eclipse.core.runtime.IPath getRelPath(org.eclipse.core.runtime.IPath cwd,
                                                        org.eclipse.core.runtime.IPath location)