org.eclipse.cdt.managedbuilder.core
Interface IResourceConfiguration

All Superinterfaces:
IBuildObject, IResourceInfo
All Known Subinterfaces:
IFileInfo
All Known Implementing Classes:
ResourceConfiguration

public interface IResourceConfiguration
extends IResourceInfo

This class is a place to define build attributes of individual resources that are different from the configuration as a whole. The resourceConfiguration element can have multiple tool children. They define the tool(s) to be used to build the specified resource. The tool(s) can execute before, after, or instead of the default tool for the resources (see the toolOrder attribute in the tool element).

Since:
2.1

Field Summary
static java.lang.String APPLY_RCBS_TOOL_AFTER
           
static java.lang.String APPLY_RCBS_TOOL_AS_OVERRIDE
           
static java.lang.String APPLY_RCBS_TOOL_BEFORE
           
static java.lang.String DISABLE_RCBS_TOOL
           
static int KIND_APPLY_RCBS_TOOL_AFTER
           
static int KIND_APPLY_RCBS_TOOL_AS_OVERRIDE
           
static int KIND_APPLY_RCBS_TOOL_BEFORE
           
static int KIND_DISABLE_RCBS_TOOL
           
static java.lang.String RCBS_APPLICABILITY
           
static java.lang.String RESOURCE_CONFIGURATION_ELEMENT_NAME
           
static java.lang.String TOOLS_TO_INVOKE
           
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IResourceInfo
EXCLUDE, RESOURCE_PATH
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
ID, NAME
 
Method Summary
 ITool createTool(ITool superClass, java.lang.String Id, java.lang.String name, boolean isExtensionElement)
          Creates a Tool child for this resource configuration.
 org.eclipse.core.resources.IResource getOwner()
          Returns the Eclipse project that owns the resource configuration.
 IConfiguration getParent()
          Returns the configuration that is the parent of this resource configuration.
 int getRcbsApplicability()
          Returns an integer constant representing the users desire for ordering the application of a resource custom build step tool.
 java.lang.String getResourcePath()
          Returns the path of the project resource that this element references.
 ITool getTool(java.lang.String id)
          Returns the tool in this resource configuration with the ID specified in the argument, or null
 ITool[] getTools()
          Returns the list of tools associated with this resource configuration.
 ITool[] getToolsToInvoke()
          Returns the list of tools currently defined for the project resource that this element references.
 boolean isDirty()
          Returns true if this element has changes that need to be saved in the project file, else false.
 boolean isExcluded()
          Returns whether the resource referenced by this element should be excluded from builds of the parent configuration.
 boolean needsRebuild()
          specifies whether the resource configuration is modified and needs rebuild
 void removeTool(ITool tool)
          Removes the Tool from the Tool list and map
 void setDirty(boolean isDirty)
          Sets the element's "dirty" (have I been modified?)
 void setExclude(boolean excluded)
          Sets the "excluded" flag for the resource.
 IOption setOption(IHoldsOptions parent, IOption option, boolean value)
          Sets the value of a boolean option for this resource configuration.
 IOption setOption(IHoldsOptions parent, IOption option, java.lang.String value)
          Sets the value of a string option for this resource configuration.
 IOption setOption(IHoldsOptions parent, IOption option, java.lang.String[] value)
          Sets the value of a list option for this resource configuration.
 void setRcbsApplicability(int value)
          Sets the new value representing the users desire for ordering the application of a resource custom build step tool.
 void setRebuildState(boolean rebuild)
          sets the resource configuration rebuild state
 void setResourcePath(java.lang.String path)
          Sets the resource path to which this resource configuration applies.
 void setToolCommand(ITool tool, java.lang.String command)
          Overrides the tool command for a tool defined in this resource configuration's tool.
 void setTools(ITool[] tools)
           
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IResourceInfo
canExclude, getCLanguageDatas, getKind, getPath, getResourceData, isExtensionElement, isValid, setOption, setPath, supportsBuild
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
getBaseId, getId, getManagedBuildRevision, getName, getVersion, setVersion
 

Field Detail

RESOURCE_CONFIGURATION_ELEMENT_NAME

static final java.lang.String RESOURCE_CONFIGURATION_ELEMENT_NAME
See Also:
Constant Field Values

RCBS_APPLICABILITY

static final java.lang.String RCBS_APPLICABILITY
See Also:
Constant Field Values

TOOLS_TO_INVOKE

static final java.lang.String TOOLS_TO_INVOKE
See Also:
Constant Field Values

APPLY_RCBS_TOOL_AS_OVERRIDE

static final java.lang.String APPLY_RCBS_TOOL_AS_OVERRIDE
See Also:
Constant Field Values

KIND_APPLY_RCBS_TOOL_AS_OVERRIDE

static final int KIND_APPLY_RCBS_TOOL_AS_OVERRIDE
See Also:
Constant Field Values

APPLY_RCBS_TOOL_BEFORE

static final java.lang.String APPLY_RCBS_TOOL_BEFORE
See Also:
Constant Field Values

KIND_APPLY_RCBS_TOOL_BEFORE

static final int KIND_APPLY_RCBS_TOOL_BEFORE
See Also:
Constant Field Values

APPLY_RCBS_TOOL_AFTER

static final java.lang.String APPLY_RCBS_TOOL_AFTER
See Also:
Constant Field Values

KIND_APPLY_RCBS_TOOL_AFTER

static final int KIND_APPLY_RCBS_TOOL_AFTER
See Also:
Constant Field Values

DISABLE_RCBS_TOOL

static final java.lang.String DISABLE_RCBS_TOOL
See Also:
Constant Field Values

KIND_DISABLE_RCBS_TOOL

static final int KIND_DISABLE_RCBS_TOOL
See Also:
Constant Field Values
Method Detail

getParent

IConfiguration getParent()
Returns the configuration that is the parent of this resource configuration.

Specified by:
getParent in interface IResourceInfo
Returns:
IConfiguration

isExcluded

boolean isExcluded()
Returns whether the resource referenced by this element should be excluded from builds of the parent configuration. Returns false if the attribute was not specified.

Specified by:
isExcluded in interface IResourceInfo
Returns:
boolean

getResourcePath

java.lang.String getResourcePath()
Returns the path of the project resource that this element references. TODO: What is the format of the path? Absolute? Relative? Canonical?

Returns:
String

getRcbsApplicability

int getRcbsApplicability()
Returns an integer constant representing the users desire for ordering the application of a resource custom build step tool.

Returns:
int

getToolsToInvoke

ITool[] getToolsToInvoke()
Returns the list of tools currently defined for the project resource that this element references. Updates the String attribute toolsToInvoke.

Returns:
String

setRcbsApplicability

void setRcbsApplicability(int value)
Sets the new value representing the users desire for ordering the application of a resource custom build step tool.

Parameters:
int -

setExclude

void setExclude(boolean excluded)
Sets the "excluded" flag for the resource. If true, the project resource identified by the resoursePath attribute is excluded from the build of the parent configuration.

Specified by:
setExclude in interface IResourceInfo
Parameters:
boolean -

setResourcePath

void setResourcePath(java.lang.String path)
Sets the resource path to which this resource configuration applies.


isDirty

boolean isDirty()
Returns true if this element has changes that need to be saved in the project file, else false.

Specified by:
isDirty in interface IResourceInfo
Returns:
boolean

setDirty

void setDirty(boolean isDirty)
Sets the element's "dirty" (have I been modified?) flag.

Specified by:
setDirty in interface IResourceInfo
Parameters:
isDirty -

getTools

ITool[] getTools()
Returns the list of tools associated with this resource configuration.

Specified by:
getTools in interface IResourceInfo
Returns:
ITool[]

getTool

ITool getTool(java.lang.String id)
Returns the tool in this resource configuration with the ID specified in the argument, or null

Parameters:
id - The ID of the requested tool
Returns:
ITool

removeTool

void removeTool(ITool tool)
Removes the Tool from the Tool list and map

Parameters:
Tool -

createTool

ITool createTool(ITool superClass,
                 java.lang.String Id,
                 java.lang.String name,
                 boolean isExtensionElement)
Creates a Tool child for this resource configuration.

Parameters:
ITool - The superClass, if any
String - The id for the new tool chain
String - The name for the new tool chain
boolean - Indicates whether this is an extension element or a managed project element
Returns:
ITool

setToolCommand

void setToolCommand(ITool tool,
                    java.lang.String command)
Overrides the tool command for a tool defined in this resource configuration's tool.

Parameters:
tool - The tool that will have its command modified
command - The command

setOption

IOption setOption(IHoldsOptions parent,
                  IOption option,
                  boolean value)
                  throws BuildException
Sets the value of a boolean option for this resource configuration.

Specified by:
setOption in interface IResourceInfo
Parameters:
parent - The holder/parent of the option.
option - The option to change.
value - The value to apply to the option.
Returns:
IOption The modified option. This can be the same option or a newly created option.
Throws:
BuildException
Since:
3.0 - The type of parent has changed from ITool to IHoldsOptions. Code assuming ITool as type, will continue to work unchanged.

setOption

IOption setOption(IHoldsOptions parent,
                  IOption option,
                  java.lang.String value)
                  throws BuildException
Sets the value of a string option for this resource configuration.

Specified by:
setOption in interface IResourceInfo
Parameters:
parent - The holder/parent of the option.
option - The option that will be effected by change.
value - The value to apply to the option.
Returns:
IOption The modified option. This can be the same option or a newly created option.
Throws:
BuildException
Since:
3.0 - The type of parent has changed from ITool to IHoldsOptions. Code assuming ITool as type, will continue to work unchanged.

setOption

IOption setOption(IHoldsOptions parent,
                  IOption option,
                  java.lang.String[] value)
                  throws BuildException
Sets the value of a list option for this resource configuration.

Specified by:
setOption in interface IResourceInfo
Parameters:
parent - The holder/parent of the option.
option - The option to change.
value - The values to apply to the option.
Returns:
IOption The modified option. This can be the same option or a newly created option.
Throws:
BuildException
Since:
3.0 - The type of parent has changed from ITool to IHoldsOptions. Code assuming ITool as type, will continue to work unchanged.

getOwner

org.eclipse.core.resources.IResource getOwner()
Returns the Eclipse project that owns the resource configuration.

Returns:
IResource

needsRebuild

boolean needsRebuild()
specifies whether the resource configuration is modified and needs rebuild

Specified by:
needsRebuild in interface IResourceInfo
Returns:
boolean

setRebuildState

void setRebuildState(boolean rebuild)
sets the resource configuration rebuild state

Specified by:
setRebuildState in interface IResourceInfo
Parameters:
rebuild -

setTools

void setTools(ITool[] tools)