org.eclipse.cdt.managedbuilder.internal.core
Class ResourceConfiguration

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.internal.core.BuildObject
      extended by org.eclipse.cdt.managedbuilder.internal.core.ResourceInfo
          extended by org.eclipse.cdt.managedbuilder.internal.core.ResourceConfiguration
All Implemented Interfaces:
IBuildObject, IFileInfo, IResourceConfiguration, IResourceInfo

public class ResourceConfiguration
extends ResourceInfo
implements IFileInfo


Field Summary
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IFileInfo
FILE_INFO_ELEMENT_NAME
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IResourceConfiguration
APPLY_RCBS_TOOL_AFTER, APPLY_RCBS_TOOL_AS_OVERRIDE, APPLY_RCBS_TOOL_BEFORE, DISABLE_RCBS_TOOL, KIND_APPLY_RCBS_TOOL_AFTER, KIND_APPLY_RCBS_TOOL_AS_OVERRIDE, KIND_APPLY_RCBS_TOOL_BEFORE, KIND_DISABLE_RCBS_TOOL, RCBS_APPLICABILITY, RESOURCE_CONFIGURATION_ELEMENT_NAME, 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
 
Constructor Summary
ResourceConfiguration(FolderInfo folderInfo, ITool baseTool, java.lang.String id, java.lang.String resourceName, org.eclipse.core.runtime.IPath path)
           
ResourceConfiguration(IConfiguration parent, org.eclipse.cdt.core.settings.model.ICStorageElement element, java.lang.String managedBuildRevision)
          Create a ResourceConfiguration based on the specification stored in the project file (.cdtbuild).
ResourceConfiguration(IConfiguration parent, IManagedConfigElement element, java.lang.String managedBuildRevision)
          This constructor is called to create a resource configuration defined by an extension point in a plugin manifest file, or returned by a dynamic element provider
ResourceConfiguration(IConfiguration cfg, ResourceConfiguration cloneConfig, java.lang.String id, java.util.Map superClassIdMap, boolean cloneChildren)
          Create a new resource configuration based on one already defined.
ResourceConfiguration(ResourceConfiguration baseInfo, org.eclipse.core.runtime.IPath path, java.lang.String id, java.lang.String name)
           
 
Method Summary
 void addTool(Tool tool)
           
 java.util.Set contributeErrorParsers(java.util.Set set)
           
 ITool createTool(ITool superClass, java.lang.String id, java.lang.String name, boolean isExtensionElement)
          Creates a Tool child for this resource configuration.
 IToolChain getBaseToolChain()
           
 org.eclipse.cdt.core.settings.model.extension.CLanguageData[] getCLanguageDatas()
           
 org.eclipse.cdt.core.settings.model.extension.CFileData getFileData()
           
 int getKind()
           
 org.eclipse.core.resources.IResource getOwner()
          Returns the Eclipse project that owns the 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.
 org.eclipse.core.runtime.PluginVersionIdentifier getVersion()
           
 boolean hasCustomSettings()
           
 boolean isDirty()
          Returns true if this element has changes that need to be saved in the project file, else false.
 boolean isExtensionElement()
           
 boolean isExtensionResourceConfiguration()
           
 boolean isFolderInfo()
           
 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 reset()
           
 void resetErrorParsers()
           
 void resolveReferences()
           
 void serialize(org.eclipse.cdt.core.settings.model.ICStorageElement element)
          Persist the resource configuration to the project file.
 void setDirty(boolean isDirty)
          Sets the element's "dirty" (have I been modified?)
 void setRcbsApplicability(int newValue)
          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)
           
 void setVersion(org.eclipse.core.runtime.PluginVersionIdentifier version)
           
 boolean supportsBuild(boolean managed)
           
 void updateManagedBuildRevision(java.lang.String revision)
           
 
Methods inherited from class org.eclipse.cdt.managedbuilder.internal.core.ResourceInfo
canExclude, getParent, getParentResourceInfo, getPath, getResourceData, getToolById, isExcluded, isRoot, isValid, normalizePath, propertiesChanged, setExclude, setOption, setOption, setOption, setOption, setPath
 
Methods inherited from class org.eclipse.cdt.managedbuilder.internal.core.BuildObject
getBaseId, getId, getManagedBuildRevision, getName, getVersionFromId, setId, setManagedBuildRevision, setName, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IResourceConfiguration
getParent, isExcluded, setExclude, setOption, setOption, setOption
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IResourceInfo
canExclude, getPath, getResourceData, isValid, setOption, setPath
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
getBaseId, getId, getManagedBuildRevision, getName
 

Constructor Detail

ResourceConfiguration

public ResourceConfiguration(IConfiguration parent,
                             IManagedConfigElement element,
                             java.lang.String managedBuildRevision)
This constructor is called to create a resource configuration defined by an extension point in a plugin manifest file, or returned by a dynamic element provider

Parameters:
parent - The IConfiguration parent of this resource configuration
element - The resource configuration definition from the manifest file or a dynamic element provider
managedBuildRevision -

ResourceConfiguration

public ResourceConfiguration(IConfiguration parent,
                             org.eclipse.cdt.core.settings.model.ICStorageElement element,
                             java.lang.String managedBuildRevision)
Create a ResourceConfiguration based on the specification stored in the project file (.cdtbuild).

Parameters:
parent - The IConfiguration the resource configuration will be added to.
element - The XML element that contains the resource configuration settings.
managedBuildRevision -

ResourceConfiguration

public ResourceConfiguration(FolderInfo folderInfo,
                             ITool baseTool,
                             java.lang.String id,
                             java.lang.String resourceName,
                             org.eclipse.core.runtime.IPath path)

ResourceConfiguration

public ResourceConfiguration(IConfiguration cfg,
                             ResourceConfiguration cloneConfig,
                             java.lang.String id,
                             java.util.Map superClassIdMap,
                             boolean cloneChildren)
Create a new resource configuration based on one already defined.

Parameters:
managedProject - The ManagedProject the configuration will be added to.
parentConfig - The IConfiguration to copy the settings from.
id - A unique ID for the new configuration.

ResourceConfiguration

public ResourceConfiguration(ResourceConfiguration baseInfo,
                             org.eclipse.core.runtime.IPath path,
                             java.lang.String id,
                             java.lang.String name)
Method Detail

serialize

public void serialize(org.eclipse.cdt.core.settings.model.ICStorageElement element)
Persist the resource configuration to the project file.

Parameters:
doc -
element -

getTools

public ITool[] getTools()
Description copied from interface: IResourceConfiguration
Returns the list of tools associated with this resource configuration.

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

getTool

public ITool getTool(java.lang.String id)
Description copied from interface: IResourceConfiguration
Returns the tool in this resource configuration with the ID specified in the argument, or null

Specified by:
getTool in interface IResourceConfiguration
Parameters:
id - The ID of the requested tool
Returns:
ITool

addTool

public void addTool(Tool tool)

removeTool

public void removeTool(ITool tool)
Description copied from interface: IResourceConfiguration
Removes the Tool from the Tool list and map

Specified by:
removeTool in interface IResourceConfiguration

getResourcePath

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

Specified by:
getResourcePath in interface IResourceConfiguration
Returns:
String

getRcbsApplicability

public int getRcbsApplicability()
Description copied from interface: IResourceConfiguration
Returns an integer constant representing the users desire for ordering the application of a resource custom build step tool.

Specified by:
getRcbsApplicability in interface IResourceConfiguration
Returns:
int

getToolsToInvoke

public ITool[] getToolsToInvoke()
Description copied from interface: IResourceConfiguration
Returns the list of tools currently defined for the project resource that this element references. Updates the String attribute toolsToInvoke.

Specified by:
getToolsToInvoke in interface IResourceConfiguration
Returns:
String

setRcbsApplicability

public void setRcbsApplicability(int newValue)
Description copied from interface: IResourceConfiguration
Sets the new value representing the users desire for ordering the application of a resource custom build step tool.

Specified by:
setRcbsApplicability in interface IResourceConfiguration

setResourcePath

public void setResourcePath(java.lang.String path)
Description copied from interface: IResourceConfiguration
Sets the resource path to which this resource configuration applies.

Specified by:
setResourcePath in interface IResourceConfiguration

isExtensionResourceConfiguration

public boolean isExtensionResourceConfiguration()

isDirty

public boolean isDirty()
Description copied from interface: IResourceConfiguration
Returns true if this element has changes that need to be saved in the project file, else false.

Specified by:
isDirty in interface IResourceConfiguration
Specified by:
isDirty in interface IResourceInfo
Overrides:
isDirty in class ResourceInfo
Returns:
boolean

setDirty

public void setDirty(boolean isDirty)
Description copied from interface: IResourceConfiguration
Sets the element's "dirty" (have I been modified?) flag.

Specified by:
setDirty in interface IResourceConfiguration
Specified by:
setDirty in interface IResourceInfo
Overrides:
setDirty in class ResourceInfo

resolveReferences

public void resolveReferences()

createTool

public ITool createTool(ITool superClass,
                        java.lang.String id,
                        java.lang.String name,
                        boolean isExtensionElement)
Description copied from interface: IResourceConfiguration
Creates a Tool child for this resource configuration.

Specified by:
createTool in interface IResourceConfiguration
Returns:
ITool

reset

public void reset()

setToolCommand

public void setToolCommand(ITool tool,
                           java.lang.String command)
Description copied from interface: IResourceConfiguration
Overrides the tool command for a tool defined in this resource configuration's tool.

Specified by:
setToolCommand in interface IResourceConfiguration
Parameters:
tool - The tool that will have its command modified
command - The command

getOwner

public org.eclipse.core.resources.IResource getOwner()
Description copied from interface: IResourceConfiguration
Returns the Eclipse project that owns the resource configuration.

Specified by:
getOwner in interface IResourceConfiguration
Returns:
IResource

getVersion

public org.eclipse.core.runtime.PluginVersionIdentifier getVersion()
Specified by:
getVersion in interface IBuildObject
Overrides:
getVersion in class BuildObject
Returns:
Returns the version.

setVersion

public void setVersion(org.eclipse.core.runtime.PluginVersionIdentifier version)
Specified by:
setVersion in interface IBuildObject
Overrides:
setVersion in class BuildObject
Parameters:
version - The version to set.

updateManagedBuildRevision

public void updateManagedBuildRevision(java.lang.String revision)
Overrides:
updateManagedBuildRevision in class BuildObject

needsRebuild

public boolean needsRebuild()
Description copied from interface: IResourceConfiguration
specifies whether the resource configuration is modified and needs rebuild

Specified by:
needsRebuild in interface IResourceConfiguration
Specified by:
needsRebuild in interface IResourceInfo
Overrides:
needsRebuild in class ResourceInfo
Returns:
boolean

setRebuildState

public void setRebuildState(boolean rebuild)
Description copied from interface: IResourceConfiguration
sets the resource configuration rebuild state

Specified by:
setRebuildState in interface IResourceConfiguration
Specified by:
setRebuildState in interface IResourceInfo
Overrides:
setRebuildState in class ResourceInfo

getKind

public final int getKind()
Specified by:
getKind in interface IResourceInfo

getFileData

public org.eclipse.cdt.core.settings.model.extension.CFileData getFileData()
Specified by:
getFileData in interface IFileInfo

getCLanguageDatas

public org.eclipse.cdt.core.settings.model.extension.CLanguageData[] getCLanguageDatas()
Specified by:
getCLanguageDatas in interface IResourceInfo

getBaseToolChain

public IToolChain getBaseToolChain()

isExtensionElement

public boolean isExtensionElement()
Specified by:
isExtensionElement in interface IResourceInfo
Specified by:
isExtensionElement in class ResourceInfo

supportsBuild

public boolean supportsBuild(boolean managed)
Specified by:
supportsBuild in interface IResourceInfo

contributeErrorParsers

public java.util.Set contributeErrorParsers(java.util.Set set)
Specified by:
contributeErrorParsers in class ResourceInfo

resetErrorParsers

public void resetErrorParsers()
Specified by:
resetErrorParsers in class ResourceInfo

hasCustomSettings

public boolean hasCustomSettings()
Specified by:
hasCustomSettings in class ResourceInfo

setTools

public void setTools(ITool[] tools)
Specified by:
setTools in interface IResourceConfiguration

isFolderInfo

public boolean isFolderInfo()
Specified by:
isFolderInfo in class ResourceInfo