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

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.internal.core.ToolReference
All Implemented Interfaces:
IBuildObject, IHoldsOptions, ITool, IToolReference

public class ToolReference
extends java.lang.Object
implements IToolReference


Field Summary
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.ITool
ADVANCED_INPUT_CATEGORY, ANNOUNCEMENT, COMMAND, COMMAND_LINE_GENERATOR, COMMAND_LINE_PATTERN, CONVERT_TO_ID, CUSTOM_BUILD_STEP, DEP_CALC_ID, EMPTY_STRING, FILTER_BOTH, FILTER_C, FILTER_CC, INPUT_TYPE, INTERFACE_EXTS, IS_SYSTEM, NATURE, OPTIONPATHCONVERTER, OUTPUT_FLAG, OUTPUT_PREFIX, OUTPUT_TYPE, OUTPUTS, SOURCES, SUPPORTS_MANAGED_BUILD, TOOL_ELEMENT_NAME, VERSIONS_SUPPORTED, WHITE_SPACE
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IHoldsOptions
OPTION, OPTION_CAT, OPTION_REF
 
Constructor Summary
ToolReference(BuildObject owner, org.w3c.dom.Element element)
          Create a new tool reference based on information contained in a project file.
ToolReference(BuildObject owner, IManagedConfigElement element)
          Created tool reference from an extension defined in a plugin manifest.
ToolReference(BuildObject owner, ITool tool)
          Created a tool reference on the fly based on an existing tool or tool reference.
 
Method Summary
 void addOptionCategory(IOptionCategory category)
          Adds the IOptionCategory to this Option Holder's list of Option Categories.
 void addOptionReference(OptionReference optionRef)
          Adds the option reference specified in the argument to the receiver.
 boolean buildsFileType(java.lang.String extension)
          Return true if the receiver builds files with the specified extension, else false.
 IInputType createInputType(IInputType superClass, java.lang.String Id, java.lang.String name, boolean isExtensionElement)
          Creates a child InputType for this tool.
 IOption createOption(IOption superClass, java.lang.String Id, java.lang.String name, boolean b)
          Creates a child Option
 OptionReference createOptionReference(IOption option)
          Answers a reference to the option.
 void createOptions(IHoldsOptions options)
          Creates options from the superclass and adds it to this class.
 IOutputType createOutputType(IOutputType superClass, java.lang.String Id, java.lang.String name, boolean isExtensionElement)
          Creates a child OutputType for this tool.
 org.eclipse.core.runtime.IPath[] getAdditionalDependencies()
          Returns all of the additional dependency resources of all InputType children.
 org.eclipse.core.runtime.IPath[] getAdditionalResources()
          Returns all of the additional input resources of all InputType children.
 boolean getAdvancedInputCategory()
          Returns true if the Tool wants the MBS to display the Advanced Input category that allows the user to specify additional input resources and dependencies, else false.
 java.lang.String[] getAllDependencyExtensions()
          Returns the array of all valid dependency extensions for this tool's inputs.
 java.lang.String[] getAllInputExtensions()
          Returns the array of all valid source extensions this tool knows how to build.
 java.lang.String[] getAllOutputExtensions()
          Returns the array of all valid output extensions this tool can create.
 java.lang.String getAnnouncement()
          Returns the announcement string for this tool
 java.lang.String getBaseId()
           
 IOptionCategory[] getChildCategories()
          Returns the option category children of this tool.
 org.eclipse.cdt.core.settings.model.extension.CLanguageData getCLanguageData(IInputType type)
           
 org.eclipse.cdt.core.settings.model.extension.CLanguageData[] getCLanguageDatas()
           
 java.lang.String[] getCommandFlags()
          Returns an array of command line arguments that have been specified for the tool.
 IManagedCommandLineGenerator getCommandLineGenerator()
          Returns the command line generator specified for this tool
 org.eclipse.core.runtime.IConfigurationElement getCommandLineGeneratorElement()
          Returns the plugin.xml element of the commandLineGenerator extension or null if none.
 java.lang.String getCommandLinePattern()
          Returns command line pattern for this tool
 java.lang.String getConvertToId()
          Returns the 'convertToId' of this tool
 boolean getCustomBuildStep()
          Returns true if the Tool represents a user-define custom build step, else false.
 java.lang.String getDefaultInputExtension()
          Returns the default input extension for the primary input of the tool
 IManagedDependencyGenerator getDependencyGenerator()
          Returns a class instance that implements an interface to generate source-level dependencies for the tool specified in the argument.
 org.eclipse.core.runtime.IConfigurationElement getDependencyGeneratorElement()
          Returns the plugin.xml element of the dependencyGenerator extension or null if none.
 org.eclipse.core.runtime.IConfigurationElement getDependencyGeneratorElementForExtension(java.lang.String sourceExt)
           
 IManagedDependencyGeneratorType getDependencyGeneratorForExtension(java.lang.String sourceExt)
          Returns a class instance that implements an interface to generate source-level dependencies for the tool specified in the argument.
 IInputType getEdtableInputType(IInputType base)
           
 IOutputType getEdtableOutputType(IOutputType base)
           
 IEnvVarBuildPath[] getEnvVarBuildPaths()
          Returns an array of the Environment Build Path variable descriptors
 java.lang.String getErrorParserIds()
          Returns the semicolon separated list of unique IDs of the error parsers associated with the tool.
 java.lang.String[] getErrorParserList()
          Returns the ordered list of unique IDs of the error parsers associated with the tool.
 java.lang.String getId()
           
 java.util.List getInputExtensions()
          Returns the list of valid source extensions this tool knows how to build.
 IInputType getInputType(java.lang.String inputExtension)
          Returns the IInputType in the tool that uses the specified extension.
 IInputType getInputTypeById(java.lang.String id)
          Returns the IInputType in the tool with the specified ID.
 IInputType getInputTypeForCLanguageData(org.eclipse.cdt.core.settings.model.extension.CLanguageData data)
           
 IInputType[] getInputTypes()
          Returns the complete list of input types that are available for this tool.
 java.util.List getInterfaceExtensions()
          Returns the list of valid header extensions for this tool.
 java.lang.String getManagedBuildRevision()
           
 java.lang.String getName()
           
 int getNatureFilter()
          Answers a constant corresponding to the project nature the tool should be used for.
 IOption getOption(java.lang.String id)
          This is a deprecated method for retrieving an IOption from the receiver based on an ID.
 IOption getOptionById(java.lang.String id)
          Get the IOption in the receiver with the specified ID.
 IOption getOptionBySuperClassId(java.lang.String id)
          Get the IOption in the receiver with the specified ID, or an option with a superclass with this id.
 IOptionCategory getOptionCategory(java.lang.String id)
          Answers the IOptionCategory that has the unique identifier specified in the argument.
 IOptionPathConverter getOptionPathConverter()
          Returns an IOptionPathConverter implementation for this tool or null, if no conversion is required
 java.util.List getOptionReferenceList()
          Answers the list of option references contained in the receiver.
 IOption[] getOptions()
          Returns the complete list of options that are available for this object.
 IOption getOptionToSet(IOption option, boolean adjustExtension)
          This method should be called in order to obtain the option whose value and attributes could be directly changed/adjusted
 java.lang.String getOutputExtension(java.lang.String inputExtension)
          Answer the output extension the receiver will create from the input, or null if the tool does not understand that extension.
 java.lang.String[] getOutputExtensions()
          Answers all of the output extensions that the receiver can build.
 java.lang.String getOutputFlag()
          Answers the argument that must be passed to a specific tool in order to control the name of the output artifact.
 java.lang.String getOutputPrefix()
          Answers the prefix that the tool should prepend to the name of the build artifact.
 java.lang.String[] getOutputsAttribute()
          Answers all of the output extensions that the receiver can build, from the value of the outputs attribute
 IOutputType getOutputType(java.lang.String outputExtension)
          Returns the IOutputType in the tool that creates the specified extension.
 IOutputType getOutputTypeById(java.lang.String id)
          Get the IOutputType in the receiver with the specified ID.
 IOutputType[] getOutputTypes()
          Returns the complete list of output types that are available for this tool.
 IBuildObject getParent()
          Returns the tool-chain or resource configuration that is the parent of this tool.
 IResourceInfo getParentResourceInfo()
           
 java.lang.String[] getPrimaryInputExtensions()
          Returns the array of valid primary source extensions this tool knows how to build.
 IInputType getPrimaryInputType()
          Returns the primary IInputType in this tool If the receiver has no InputTypes, the method returns null.
 IOutputType getPrimaryOutputType()
          Returns the primary IOutputType in this tool If the receiver has no OutputTypes, the method returns null.
 java.lang.String getRawOutputExtensions()
          Answers all of the output extensions that the receiver can build.
 java.lang.String getRawOutputFlag()
          Answers the argument that must be passed to a specific tool in order to control the name of the output artifact.
 java.lang.String getRawOutputPrefix()
          Answers the prefix that the tool should prepend to the name of the build artifact.
 java.lang.String getRawToolCommand()
          Answers the command-line invocation defined for the receiver.
 ITool getSuperClass()
          Returns the ITool that is the superclass of this tool, or null if the attribute was not specified.
 ITool getTool()
          Answers the tool that the reference has been created for.
 java.lang.String getToolCommand()
          Answers the command-line invocation defined for the receiver.
 java.lang.String[] getToolCommandFlags(org.eclipse.core.runtime.IPath inputFileLocation, org.eclipse.core.runtime.IPath outputFileLocation)
          Returns an array of command line arguments that have been specified for the tool.
 java.lang.String getToolCommandFlagsString(org.eclipse.core.runtime.IPath inputFileLocation, org.eclipse.core.runtime.IPath outputFileLocation)
          Returns the command line arguments that have been specified for the tool.
 java.lang.String getToolFlags()
          Returns the command line arguments that have been specified for the tool.
 IOptionCategory getTopOptionCategory()
          Options are organized into categories for UI purposes.
 java.lang.String getUniqueRealName()
           
 java.lang.String getUnusedChildren()
          Returns a semi-colon delimited list of child Ids of the superclass' children that should not be automatically inherited by this element.
 org.eclipse.core.runtime.PluginVersionIdentifier getVersion()
           
 java.lang.String getVersionsSupported()
          Returns the 'versionsSupported' of this tool
 boolean isAbstract()
          Returns whether this element is abstract.
 boolean isDirty()
          Returns true if this tool has changes that need to be saved in the project file, else false.
 boolean isEnabled()
           
 boolean isExtensionElement()
          Returns true if this tool was loaded from a manifest file, and false if it was loaded from a project (.cdtbuild) file.
 boolean isHeaderFile(java.lang.String ext)
          Answers true if the tool considers the file extension to be one associated with a header file.
 boolean isInputFileType(java.lang.String extension)
          Return true if the receiver uses files with the specified extension as input, else false.
 boolean isReal()
           
 boolean isSystemObject()
           
 boolean matches(ITool tool)
           
 boolean needsRebuild()
          specifies whether the option holder is modified and needs rebuild
 boolean ownedByConfiguration(IConfigurationV2 config)
          Answers true if the owner of the receiver matches the argument.
 boolean producesFileType(java.lang.String outputExtension)
          Answers true if the receiver builds a file with the extension specified in the argument, else false.
 boolean references(ITool target)
          Answers true if the reference is a reference to the tool specified in the argument.
 void removeInputType(IInputType type)
          Removes an InputType from the tool's list.
 void removeOption(IOption o)
          Removes an option.
 void removeOutputType(IOutputType type)
          Removes an OutputType from the tool's list.
 void resolveReferences()
           
 void serialize(org.w3c.dom.Document doc, org.w3c.dom.Element element)
          Persist receiver to project file.
 void setAdvancedInputCategory(boolean display)
          Sets whether the Tool wants the MBS to display the Advanced Input category that allows the user to specify additional input resources and dependencies.
 void setAnnouncement(java.lang.String announcement)
          Sets the announcement string for this tool
 void setCommandLineGeneratorElement(org.eclipse.core.runtime.IConfigurationElement element)
          Sets the CommandLineGenerator plugin.xml element
 void setCommandLinePattern(java.lang.String pattern)
          Sets the command line pattern for this tool
 void setConvertToId(java.lang.String convertToId)
          Sets the 'convertToId' attribute of the tool.
 void setCustomBuildStep(boolean customBuildStep)
          Sets whether the Tool represents a user-define custom build step.
 void setDependencyGeneratorElement(org.eclipse.core.runtime.IConfigurationElement element)
          Sets the DependencyGenerator plugin.xml element
 void setDirty(boolean isDirty)
          Sets the element's "dirty" (have I been modified?)
 void setErrorParserIds(java.lang.String ids)
          Sets the semicolon separated list of error parser ids
 void setIsAbstract(boolean b)
          Sets the isAbstract attribute of the tool-chain.
 void setOutputExtensions(java.lang.String ext)
           
 void setOutputFlag(java.lang.String flag)
          Sets the argument that must be passed to a specific tool in order to control the name of the output artifact.
 void setOutputPrefix(java.lang.String prefix)
          Sets the prefix that the tool should prepend to the name of the build artifact.
 void setOutputPrefixForPrimaryOutput(java.lang.String prefix)
           
 void setOutputsAttribute(java.lang.String extensions)
          Sets all of the output extensions that the receiver can build, into the outputs attribute.
 void setRebuildState(boolean rebuild)
          sets the holder rebuild state
 boolean setToolCommand(java.lang.String cmd)
          Sets the command-line invocation command defined for this tool.
 void setToolParent(IBuildObject newParent)
           
 void setVersion(org.eclipse.core.runtime.PluginVersionIdentifier version)
           
 void setVersionsSupported(java.lang.String versionsSupported)
          Sets the 'versionsSupported' attribute of the tool.
 boolean supportsBuild(boolean managed)
           
 boolean supportsManagedBuild()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToolReference

public ToolReference(BuildObject owner,
                     org.w3c.dom.Element element)
Create a new tool reference based on information contained in a project file.

Parameters:
owner - The ConfigurationV2 the receiver will be added to.
element - The element defined in the project file containing build information for the receiver.

ToolReference

public ToolReference(BuildObject owner,
                     IManagedConfigElement element)
Created tool reference from an extension defined in a plugin manifest.

Parameters:
owner - The BuildObject the receiver will be added to.
element - The element containing build information for the reference.

ToolReference

public ToolReference(BuildObject owner,
                     ITool tool)
Created a tool reference on the fly based on an existing tool or tool reference.

Parameters:
owner - The BuildObject the receiver will be added to.
tool - The ITooltool the reference will be based on.
Method Detail

references

public boolean references(ITool target)
Description copied from interface: IToolReference
Answers true if the reference is a reference to the tool specified in the argument.

Specified by:
references in interface IToolReference
Returns:
boolean

resolveReferences

public void resolveReferences()

addOptionReference

public void addOptionReference(OptionReference optionRef)
Adds the option reference specified in the argument to the receiver.

Parameters:
optionRef -

buildsFileType

public boolean buildsFileType(java.lang.String extension)
Description copied from interface: ITool
Return true if the receiver builds files with the specified extension, else false.

Specified by:
buildsFileType in interface ITool
Parameters:
extension - file extension of the source
Returns:
boolean

isInputFileType

public boolean isInputFileType(java.lang.String extension)
Description copied from interface: ITool
Return true if the receiver uses files with the specified extension as input, else false. This returns true for a superset of the extensions that buildFileType returns true for - it includes secondary inputs.

Specified by:
isInputFileType in interface ITool
Parameters:
extension - file extension of the source
Returns:
boolean

createOptionReference

public OptionReference createOptionReference(IOption option)
Description copied from interface: IToolReference
Answers a reference to the option. If the reference does not exist, a new reference is created.

Specified by:
createOptionReference in interface IToolReference
Returns:
OptionReference

getId

public java.lang.String getId()
Specified by:
getId in interface IBuildObject

getBaseId

public java.lang.String getBaseId()
Specified by:
getBaseId in interface IBuildObject

getInputExtensions

public java.util.List getInputExtensions()
Description copied from interface: ITool
Returns the list of valid source extensions this tool knows how to build. The list may be empty but will never be null.

Specified by:
getInputExtensions in interface ITool
Returns:
List

getName

public java.lang.String getName()
Specified by:
getName in interface IBuildObject

getNatureFilter

public int getNatureFilter()
Description copied from interface: ITool
Answers a constant corresponding to the project nature the tool should be used for. Possible answers are:
ITool.FILTER_C
The tool should only be displayed for C projects. Notes: even though a C++ project has a C nature, this flag will mask the tool for C++ projects.
ITool.FILTER_CC
The tool should only be displayed for C++ projects.
ITool.FILTER_BOTH
The tool should be displayed for projects with both natures.

Specified by:
getNatureFilter in interface ITool
Returns:
int

getOption

public IOption getOption(java.lang.String id)
Description copied from interface: IHoldsOptions
This is a deprecated method for retrieving an IOption from the receiver based on an ID. It is preferred that you use the newer method getOptionById

Specified by:
getOption in interface IHoldsOptions
Parameters:
id - unique identifier of the option to search for
Returns:
IOption
See Also:
org.eclipse.cdt.core.build.managed.IHoldsOptions#getOptionById(java.lang.String)

getOptionById

public IOption getOptionById(java.lang.String id)
Description copied from interface: IHoldsOptions
Get the IOption in the receiver with the specified ID. This is an efficient search in the receiver.

If the receiver does not have an option with that ID, the method returns null. It is the responsibility of the caller to verify the return value.

Specified by:
getOptionById in interface IHoldsOptions
Parameters:
id - unique identifier of the option to search for
Returns:
IOption

producesFileType

public boolean producesFileType(java.lang.String outputExtension)
Description copied from interface: ITool
Answers true if the receiver builds a file with the extension specified in the argument, else false.

Specified by:
producesFileType in interface ITool
Parameters:
outputExtension - extension of the file being produced by a tool
Returns:
boolean

getTool

public ITool getTool()
Description copied from interface: IToolReference
Answers the tool that the reference has been created for.

Specified by:
getTool in interface IToolReference
Returns:

getToolCommand

public java.lang.String getToolCommand()
Description copied from interface: ITool
Answers the command-line invocation defined for the receiver.

Specified by:
getToolCommand in interface ITool
Returns:
String

getToolFlags

public java.lang.String getToolFlags()
                              throws BuildException
Description copied from interface: ITool
Returns the command line arguments that have been specified for the tool. The string contains build macros resolved to the makefile format. That is if a user has chosen to expand all macros in the buildfile, the string contains all macro references resolved, otherwise, if a user has chosen to keep the environment build macros unresolved, the string contains the environment macro references converted to the buildfile variable format, all other macro references are resolved

Specified by:
getToolFlags in interface ITool
Returns:
String
Throws:
BuildException

getTopOptionCategory

public IOptionCategory getTopOptionCategory()
Description copied from interface: ITool
Options are organized into categories for UI purposes. These categories are organized into a tree. This is the root of that tree.

Specified by:
getTopOptionCategory in interface ITool
Returns:
IOptionCategory

getOptionReferenceList

public java.util.List getOptionReferenceList()
Description copied from interface: IToolReference
Answers the list of option references contained in the receiver.

Specified by:
getOptionReferenceList in interface IToolReference
Returns:
List

getOptions

public IOption[] getOptions()
Description copied from interface: IHoldsOptions
Returns the complete list of options that are available for this object. The list is a merging of the options specified for this object with the options of its superclasses. The lowest option instance in the hierarchy takes precedence.

Specified by:
getOptions in interface IHoldsOptions
Returns:
IOption[]

getOutputExtensions

public java.lang.String[] getOutputExtensions()
Description copied from interface: ITool
Answers all of the output extensions that the receiver can build. This routine returns the value if the outputs attribute.

Specified by:
getOutputExtensions in interface ITool
Returns:
String[] of extensions

getOutputExtension

public java.lang.String getOutputExtension(java.lang.String inputExtension)
Description copied from interface: ITool
Answer the output extension the receiver will create from the input, or null if the tool does not understand that extension.

Specified by:
getOutputExtension in interface ITool
Parameters:
inputExtension - The extension of the source file.
Returns:
String

getOutputFlag

public java.lang.String getOutputFlag()
Description copied from interface: ITool
Answers the argument that must be passed to a specific tool in order to control the name of the output artifact. For example, the GCC compile and linker use '-o', while the archiver does not.

Specified by:
getOutputFlag in interface ITool
Returns:
String

getOutputPrefix

public java.lang.String getOutputPrefix()
Description copied from interface: ITool
Answers the prefix that the tool should prepend to the name of the build artifact. For example, a librarian usually prepends 'lib' to the target.a

Specified by:
getOutputPrefix in interface ITool
Returns:
String

isDirty

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

Specified by:
isDirty in interface ITool
Specified by:
isDirty in interface IToolReference
Returns:
boolean

isHeaderFile

public boolean isHeaderFile(java.lang.String ext)
Description copied from interface: ITool
Answers true if the tool considers the file extension to be one associated with a header file.

Specified by:
isHeaderFile in interface ITool
Parameters:
ext - file extension of the source
Returns:
boolean

ownedByConfiguration

public boolean ownedByConfiguration(IConfigurationV2 config)
Answers true if the owner of the receiver matches the argument.

Parameters:
config -
Returns:

serialize

public void serialize(org.w3c.dom.Document doc,
                      org.w3c.dom.Element element)
Persist receiver to project file.

Parameters:
doc - The persistent store for the reference information.
element - The root element in the store the receiver must use to persist settings.

setDirty

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

Specified by:
setDirty in interface ITool
Specified by:
setDirty in interface IToolReference
Parameters:
isDirty - The value to set the dirty flag to in the receiver

setToolCommand

public boolean setToolCommand(java.lang.String cmd)
Description copied from interface: ITool
Sets the command-line invocation command defined for this tool.

Specified by:
setToolCommand in interface ITool
Specified by:
setToolCommand in interface IToolReference
Returns:
boolean if true, then the tool command was modified

setOutputFlag

public void setOutputFlag(java.lang.String flag)
Description copied from interface: ITool
Sets the argument that must be passed to a specific tool in order to control the name of the output artifact. For example, the GCC compile and linker use '-o', while the archiver does not.

Specified by:
setOutputFlag in interface ITool

setOutputPrefix

public void setOutputPrefix(java.lang.String prefix)
Description copied from interface: ITool
Sets the prefix that the tool should prepend to the name of the build artifact. For example, a librarian usually prepends 'lib' to the target.a

Specified by:
setOutputPrefix in interface ITool
See Also:
#setOutputPrefixForPrimaryOutput(String)}

setOutputExtensions

public void setOutputExtensions(java.lang.String ext)

setToolParent

public void setToolParent(IBuildObject newParent)

getParent

public IBuildObject getParent()
Description copied from interface: ITool
Returns the tool-chain or resource configuration that is the parent of this tool.

Specified by:
getParent in interface ITool
Returns:
IBuildObject

getCommandLinePattern

public java.lang.String getCommandLinePattern()
Description copied from interface: ITool
Returns command line pattern for this tool

Specified by:
getCommandLinePattern in interface ITool
Returns:
String

getCommandLineGenerator

public IManagedCommandLineGenerator getCommandLineGenerator()
Description copied from interface: ITool
Returns the command line generator specified for this tool

Specified by:
getCommandLineGenerator in interface ITool
Returns:
IManagedCommandLineGenerator

getDependencyGenerator

public IManagedDependencyGenerator getDependencyGenerator()
Description copied from interface: ITool
Returns a class instance that implements an interface to generate source-level dependencies for the tool specified in the argument. This method may return null in which case, the receiver should assume that the tool does not require dependency information when the project is built.

Specified by:
getDependencyGenerator in interface ITool
Returns:
IManagedDependencyGenerator

getCommandFlags

public java.lang.String[] getCommandFlags()
                                   throws BuildException
Description copied from interface: ITool
Returns an array of command line arguments that have been specified for the tool. The flags contain build macros resolved to the makefile format. That is if a user has chosen to expand all macros in the buildfile, the flags contain all macro references resolved, otherwise, if a user has chosen to keep the environment build macros unresolved, the flags contain the environment macro references converted to the buildfile variable format, all other macro references are resolved

Specified by:
getCommandFlags in interface ITool
Returns:
String[]
Throws:
BuildException

getToolCommandFlags

public java.lang.String[] getToolCommandFlags(org.eclipse.core.runtime.IPath inputFileLocation,
                                              org.eclipse.core.runtime.IPath outputFileLocation)
                                       throws BuildException
Description copied from interface: ITool
Returns an array of command line arguments that have been specified for the tool. The flags contain build macros resolved to the makefile format. That is if a user has chosen to expand all macros in the buildfile, the flags contain all macro references resolved, otherwise, if a user has chosen to keep the environment build macros unresolved, the flags contain the environment macro references converted to the buildfile variable format, all other macro references are resolved

Specified by:
getToolCommandFlags in interface ITool
Returns:
Throws:
BuildException

getToolCommandFlagsString

public java.lang.String getToolCommandFlagsString(org.eclipse.core.runtime.IPath inputFileLocation,
                                                  org.eclipse.core.runtime.IPath outputFileLocation)
                                           throws BuildException
Description copied from interface: ITool
Returns the command line arguments that have been specified for the tool. The string contains build macros resolved to the makefile format. That is if a user has chosen to expand all macros in the buildfile, the string contains all macro references resolved, otherwise, if a user has chosen to keep the environment build macros unresolved, the string contains the environment macro references converted to the buildfile variable format, all other macro references are resolved

Specified by:
getToolCommandFlagsString in interface ITool
Returns:
Throws:
BuildException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSuperClass

public ITool getSuperClass()
Description copied from interface: ITool
Returns the ITool that is the superclass of this tool, or null if the attribute was not specified.

Specified by:
getSuperClass in interface ITool
Returns:
ITool

isAbstract

public boolean isAbstract()
Description copied from interface: ITool
Returns whether this element is abstract. Returns false if the attribute was not specified.

Specified by:
isAbstract in interface ITool
Returns:
boolean

getUnusedChildren

public java.lang.String getUnusedChildren()
Description copied from interface: ITool
Returns a semi-colon delimited list of child Ids of the superclass' children that should not be automatically inherited by this element. Returns an empty string if the attribute was not specified.

Specified by:
getUnusedChildren in interface ITool
Returns:
String

getErrorParserList

public java.lang.String[] getErrorParserList()
Description copied from interface: ITool
Returns the ordered list of unique IDs of the error parsers associated with the tool.

Specified by:
getErrorParserList in interface ITool
Returns:
String[]

getErrorParserIds

public java.lang.String getErrorParserIds()
Description copied from interface: ITool
Returns the semicolon separated list of unique IDs of the error parsers associated with the tool.

Specified by:
getErrorParserIds in interface ITool
Returns:
String

setErrorParserIds

public void setErrorParserIds(java.lang.String ids)
Description copied from interface: ITool
Sets the semicolon separated list of error parser ids

Specified by:
setErrorParserIds in interface ITool

getInterfaceExtensions

public java.util.List getInterfaceExtensions()
Description copied from interface: ITool
Returns the list of valid header extensions for this tool. Returns the value of the headerExtensions attribute The list may be empty but will never be null.

Specified by:
getInterfaceExtensions in interface ITool
Returns:
List

isExtensionElement

public boolean isExtensionElement()
Description copied from interface: ITool
Returns true if this tool was loaded from a manifest file, and false if it was loaded from a project (.cdtbuild) file.

Specified by:
isExtensionElement in interface ITool
Returns:
boolean

createOption

public IOption createOption(IOption superClass,
                            java.lang.String Id,
                            java.lang.String name,
                            boolean b)
Description copied from interface: IHoldsOptions
Creates a child Option

Specified by:
createOption in interface IHoldsOptions
Returns:
IOption

createOptions

public void createOptions(IHoldsOptions options)
Description copied from interface: IHoldsOptions
Creates options from the superclass and adds it to this class. Each individual option in superclass, will become the superclass for the new option.

Specified by:
createOptions in interface IHoldsOptions

removeOption

public void removeOption(IOption o)
Description copied from interface: IHoldsOptions
Removes an option.

Specified by:
removeOption in interface IHoldsOptions

getChildCategories

public IOptionCategory[] getChildCategories()
Description copied from interface: IHoldsOptions
Returns the option category children of this tool.

Specified by:
getChildCategories in interface IHoldsOptions
Returns:
IOptionCategory[]

setIsAbstract

public void setIsAbstract(boolean b)
Description copied from interface: ITool
Sets the isAbstract attribute of the tool-chain.

Specified by:
setIsAbstract in interface ITool

setCommandLinePattern

public void setCommandLinePattern(java.lang.String pattern)
Description copied from interface: ITool
Sets the command line pattern for this tool

Specified by:
setCommandLinePattern in interface ITool

setCommandLineGeneratorElement

public void setCommandLineGeneratorElement(org.eclipse.core.runtime.IConfigurationElement element)
Description copied from interface: ITool
Sets the CommandLineGenerator plugin.xml element

Specified by:
setCommandLineGeneratorElement in interface ITool

getDependencyGeneratorElement

public org.eclipse.core.runtime.IConfigurationElement getDependencyGeneratorElement()
Description copied from interface: ITool
Returns the plugin.xml element of the dependencyGenerator extension or null if none.

Specified by:
getDependencyGeneratorElement in interface ITool
Returns:
IConfigurationElement

setDependencyGeneratorElement

public void setDependencyGeneratorElement(org.eclipse.core.runtime.IConfigurationElement element)
Description copied from interface: ITool
Sets the DependencyGenerator plugin.xml element

Specified by:
setDependencyGeneratorElement in interface ITool

getCommandLineGeneratorElement

public org.eclipse.core.runtime.IConfigurationElement getCommandLineGeneratorElement()
Description copied from interface: ITool
Returns the plugin.xml element of the commandLineGenerator extension or null if none.

Specified by:
getCommandLineGeneratorElement in interface ITool
Returns:
IConfigurationElement

getAdvancedInputCategory

public boolean getAdvancedInputCategory()
Description copied from interface: ITool
Returns true if the Tool wants the MBS to display the Advanced Input category that allows the user to specify additional input resources and dependencies, else false.

Specified by:
getAdvancedInputCategory in interface ITool
Returns:
boolean

setAdvancedInputCategory

public void setAdvancedInputCategory(boolean display)
Description copied from interface: ITool
Sets whether the Tool wants the MBS to display the Advanced Input category that allows the user to specify additional input resources and dependencies.

Specified by:
setAdvancedInputCategory in interface ITool

createInputType

public IInputType createInputType(IInputType superClass,
                                  java.lang.String Id,
                                  java.lang.String name,
                                  boolean isExtensionElement)
Description copied from interface: ITool
Creates a child InputType for this tool.

Specified by:
createInputType in interface ITool
Returns:
IInputType

createOutputType

public IOutputType createOutputType(IOutputType superClass,
                                    java.lang.String Id,
                                    java.lang.String name,
                                    boolean isExtensionElement)
Description copied from interface: ITool
Creates a child OutputType for this tool.

Specified by:
createOutputType in interface ITool
Returns:
IOutputType

getAnnouncement

public java.lang.String getAnnouncement()
Description copied from interface: ITool
Returns the announcement string for this tool

Specified by:
getAnnouncement in interface ITool
Returns:
String

getInputTypeById

public IInputType getInputTypeById(java.lang.String id)
Description copied from interface: ITool
Returns the IInputType in the tool with the specified ID. This is an efficient search in the receiver.

If the receiver does not have an InputType with that ID, the method returns null. It is the responsibility of the caller to verify the return value.

Specified by:
getInputTypeById in interface ITool
Parameters:
id - unique identifier of the InputType to search for
Returns:
IInputType

getInputTypes

public IInputType[] getInputTypes()
Description copied from interface: ITool
Returns the complete list of input types that are available for this tool. The list is a merging of the input types specified for this tool with the input types of its superclasses. The lowest input type instance in the hierarchy takes precedence.

Specified by:
getInputTypes in interface ITool
Returns:
IInputType[]

getOutputTypeById

public IOutputType getOutputTypeById(java.lang.String id)
Description copied from interface: ITool
Get the IOutputType in the receiver with the specified ID. This is an efficient search in the receiver.

If the receiver does not have an OutputType with that ID, the method returns null. It is the responsibility of the caller to verify the return value.

Specified by:
getOutputTypeById in interface ITool
Parameters:
id - unique identifier of the OutputType to search for
Returns:
IOutputType

getOutputTypes

public IOutputType[] getOutputTypes()
Description copied from interface: ITool
Returns the complete list of output types that are available for this tool. The list is a merging of the output types specified for this tool with the output types of its superclasses. The lowest output type instance in the hierarchy takes precedence.

Specified by:
getOutputTypes in interface ITool
Returns:
IOutputType[]

removeInputType

public void removeInputType(IInputType type)
Description copied from interface: ITool
Removes an InputType from the tool's list.

Specified by:
removeInputType in interface ITool

removeOutputType

public void removeOutputType(IOutputType type)
Description copied from interface: ITool
Removes an OutputType from the tool's list.

Specified by:
removeOutputType in interface ITool

setAnnouncement

public void setAnnouncement(java.lang.String announcement)
Description copied from interface: ITool
Sets the announcement string for this tool

Specified by:
setAnnouncement in interface ITool

getDefaultInputExtension

public java.lang.String getDefaultInputExtension()
Description copied from interface: ITool
Returns the default input extension for the primary input of the tool

Specified by:
getDefaultInputExtension in interface ITool
Returns:
String

getAllInputExtensions

public java.lang.String[] getAllInputExtensions()
Description copied from interface: ITool
Returns the array of all valid source extensions this tool knows how to build. The array may be empty but will never be null.

Specified by:
getAllInputExtensions in interface ITool
Returns:
String[]

getPrimaryInputExtensions

public java.lang.String[] getPrimaryInputExtensions()
Description copied from interface: ITool
Returns the array of valid primary source extensions this tool knows how to build. The array may be empty but will never be null.

Specified by:
getPrimaryInputExtensions in interface ITool
Returns:
String[]

getInputType

public IInputType getInputType(java.lang.String inputExtension)
Description copied from interface: ITool
Returns the IInputType in the tool that uses the specified extension.

If the receiver does not have an InputType that uses the extension, the method returns null. It is the responsibility of the caller to verify the return value.

Specified by:
getInputType in interface ITool
Parameters:
inputExtension - File extension
Returns:
IInputType

getOutputsAttribute

public java.lang.String[] getOutputsAttribute()
Description copied from interface: ITool
Answers all of the output extensions that the receiver can build, from the value of the outputs attribute

Specified by:
getOutputsAttribute in interface ITool
Returns:
String[] of extensions

getOutputType

public IOutputType getOutputType(java.lang.String outputExtension)
Description copied from interface: ITool
Returns the IOutputType in the tool that creates the specified extension.

If the receiver does not have an OutputType that creates the extension, the method returns null. It is the responsibility of the caller to verify the return value.

Specified by:
getOutputType in interface ITool
Parameters:
outputExtension - File extension
Returns:
IOutputType

setOutputsAttribute

public void setOutputsAttribute(java.lang.String extensions)
Description copied from interface: ITool
Sets all of the output extensions that the receiver can build, into the outputs attribute. Note that the outputs attribute is ignored when one or more outputTypes are specified.

Specified by:
setOutputsAttribute in interface ITool

getAllOutputExtensions

public java.lang.String[] getAllOutputExtensions()
Description copied from interface: ITool
Returns the array of all valid output extensions this tool can create. The array may be empty but will never be null.

Specified by:
getAllOutputExtensions in interface ITool
Returns:
String[]

getAllDependencyExtensions

public java.lang.String[] getAllDependencyExtensions()
Description copied from interface: ITool
Returns the array of all valid dependency extensions for this tool's inputs. The array may be empty but will never be null.

Specified by:
getAllDependencyExtensions in interface ITool
Returns:
String[]

getPrimaryInputType

public IInputType getPrimaryInputType()
Description copied from interface: ITool
Returns the primary IInputType in this tool

If the receiver has no InputTypes, the method returns null. It is the responsibility of the caller to verify the return value.

Specified by:
getPrimaryInputType in interface ITool
Returns:
IInputType

getPrimaryOutputType

public IOutputType getPrimaryOutputType()
Description copied from interface: ITool
Returns the primary IOutputType in this tool

If the receiver has no OutputTypes, the method returns null. It is the responsibility of the caller to verify the return value.

Specified by:
getPrimaryOutputType in interface ITool
Returns:
IOutputType

getAdditionalDependencies

public org.eclipse.core.runtime.IPath[] getAdditionalDependencies()
Description copied from interface: ITool
Returns all of the additional dependency resources of all InputType children. Note: This does not include the primary InputType and does not include additional inputs.

Specified by:
getAdditionalDependencies in interface ITool
Returns:
IPath[]

getAdditionalResources

public org.eclipse.core.runtime.IPath[] getAdditionalResources()
Description copied from interface: ITool
Returns all of the additional input resources of all InputType children. Note: This does not include the primary InputType and does not include additional dependencies.

Specified by:
getAdditionalResources in interface ITool
Returns:
IPath[]

getDependencyGeneratorElementForExtension

public org.eclipse.core.runtime.IConfigurationElement getDependencyGeneratorElementForExtension(java.lang.String sourceExt)

getDependencyGeneratorForExtension

public IManagedDependencyGeneratorType getDependencyGeneratorForExtension(java.lang.String sourceExt)
Description copied from interface: ITool
Returns a class instance that implements an interface to generate source-level dependencies for the tool specified in the argument. This method may return null in which case, the receiver should assume that the tool does not require dependency information when the project is built.

Specified by:
getDependencyGeneratorForExtension in interface ITool
Parameters:
sourceExt - source file extension
Returns:
IManagedDependencyGeneratorType

getCustomBuildStep

public boolean getCustomBuildStep()
Description copied from interface: ITool
Returns true if the Tool represents a user-define custom build step, else false.

Specified by:
getCustomBuildStep in interface ITool
Returns:
boolean

setCustomBuildStep

public void setCustomBuildStep(boolean customBuildStep)
Description copied from interface: ITool
Sets whether the Tool represents a user-define custom build step.

Specified by:
setCustomBuildStep in interface ITool

getOptionBySuperClassId

public IOption getOptionBySuperClassId(java.lang.String id)
Description copied from interface: IHoldsOptions
Get the IOption in the receiver with the specified ID, or an option with a superclass with this id.

If the receiver does not have an option with that ID, the method returns null. It is the responsibility of the caller to verify the return value.

Specified by:
getOptionBySuperClassId in interface IHoldsOptions
Parameters:
id - unique identifier of the option to search for
Returns:
IOption

getOptionCategory

public IOptionCategory getOptionCategory(java.lang.String id)
Description copied from interface: IHoldsOptions
Answers the IOptionCategory that has the unique identifier specified in the argument.

Specified by:
getOptionCategory in interface IHoldsOptions
Parameters:
id - The unique identifier of the option category
Returns:
IOptionCategory with the id specified in the argument

addOptionCategory

public void addOptionCategory(IOptionCategory category)
Description copied from interface: IHoldsOptions
Adds the IOptionCategory to this Option Holder's list of Option Categories.

Specified by:
addOptionCategory in interface IHoldsOptions
Parameters:
category - The option category to be added

getRawOutputExtensions

public java.lang.String getRawOutputExtensions()
Description copied from interface: IToolReference
Answers all of the output extensions that the receiver can build.

Specified by:
getRawOutputExtensions in interface IToolReference
Returns:
String

getRawOutputFlag

public java.lang.String getRawOutputFlag()
Description copied from interface: IToolReference
Answers the argument that must be passed to a specific tool in order to control the name of the output artifact. For example, the GCC compile and linker use '-o', while the archiver does not.

Specified by:
getRawOutputFlag in interface IToolReference
Returns:
String

getRawOutputPrefix

public java.lang.String getRawOutputPrefix()
Description copied from interface: IToolReference
Answers the prefix that the tool should prepend to the name of the build artifact. For example, a librarian usually prepends 'lib' to the target.a

Specified by:
getRawOutputPrefix in interface IToolReference
Returns:
String

getRawToolCommand

public java.lang.String getRawToolCommand()
Description copied from interface: IToolReference
Answers the command-line invocation defined for the receiver.

Specified by:
getRawToolCommand in interface IToolReference
Returns:
String

getConvertToId

public java.lang.String getConvertToId()
Description copied from interface: ITool
Returns the 'convertToId' of this tool

Specified by:
getConvertToId in interface ITool
Returns:
String

setConvertToId

public void setConvertToId(java.lang.String convertToId)
Description copied from interface: ITool
Sets the 'convertToId' attribute of the tool.

Specified by:
setConvertToId in interface ITool

getVersionsSupported

public java.lang.String getVersionsSupported()
Description copied from interface: ITool
Returns the 'versionsSupported' of this tool

Specified by:
getVersionsSupported in interface ITool
Returns:
String

setVersionsSupported

public void setVersionsSupported(java.lang.String versionsSupported)
Description copied from interface: ITool
Sets the 'versionsSupported' attribute of the tool.

Specified by:
setVersionsSupported in interface ITool

getEnvVarBuildPaths

public IEnvVarBuildPath[] getEnvVarBuildPaths()
Description copied from interface: ITool
Returns an array of the Environment Build Path variable descriptors

Specified by:
getEnvVarBuildPaths in interface ITool
Returns:
IEnvVarBuildPath[]

getVersion

public org.eclipse.core.runtime.PluginVersionIdentifier getVersion()
Specified by:
getVersion in interface IBuildObject

setVersion

public void setVersion(org.eclipse.core.runtime.PluginVersionIdentifier version)
Specified by:
setVersion in interface IBuildObject

getManagedBuildRevision

public java.lang.String getManagedBuildRevision()
Specified by:
getManagedBuildRevision in interface IBuildObject

getOptionToSet

public IOption getOptionToSet(IOption option,
                              boolean adjustExtension)
Description copied from interface: IHoldsOptions
This method should be called in order to obtain the option whose value and attributes could be directly changed/adjusted

Specified by:
getOptionToSet in interface IHoldsOptions
adjustExtension - - if false, modifications are to be made for the non-extension element (only for some particular configuration associated with some eclipse project) This is the most common use of this method. True is allowed only while while handling the LOAD value handler event. In this case modifications are to be made for the extension element. This could be used for adjusting extension options Note: changing this option will affect all non-extension configurations using this option!

needsRebuild

public boolean needsRebuild()
Description copied from interface: IHoldsOptions
specifies whether the option holder is modified and needs rebuild

Specified by:
needsRebuild in interface IHoldsOptions
Returns:
boolean

setRebuildState

public void setRebuildState(boolean rebuild)
Description copied from interface: IHoldsOptions
sets the holder rebuild state

Specified by:
setRebuildState in interface IHoldsOptions

getOptionPathConverter

public IOptionPathConverter getOptionPathConverter()
Description copied from interface: ITool
Returns an IOptionPathConverter implementation for this tool or null, if no conversion is required

Specified by:
getOptionPathConverter in interface ITool

getCLanguageData

public org.eclipse.cdt.core.settings.model.extension.CLanguageData getCLanguageData(IInputType type)
Specified by:
getCLanguageData in interface ITool

getCLanguageDatas

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

getInputTypeForCLanguageData

public IInputType getInputTypeForCLanguageData(org.eclipse.cdt.core.settings.model.extension.CLanguageData data)
Specified by:
getInputTypeForCLanguageData in interface ITool

getParentResourceInfo

public IResourceInfo getParentResourceInfo()
Specified by:
getParentResourceInfo in interface ITool

getEdtableInputType

public IInputType getEdtableInputType(IInputType base)
Specified by:
getEdtableInputType in interface ITool

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface ITool

isReal

public boolean isReal()

supportsManagedBuild

public boolean supportsManagedBuild()

supportsBuild

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

matches

public boolean matches(ITool tool)
Specified by:
matches in interface ITool

isSystemObject

public boolean isSystemObject()
Specified by:
isSystemObject in interface ITool

getUniqueRealName

public java.lang.String getUniqueRealName()
Specified by:
getUniqueRealName in interface ITool

getEdtableOutputType

public IOutputType getEdtableOutputType(IOutputType base)
Specified by:
getEdtableOutputType in interface ITool

setOutputPrefixForPrimaryOutput

public void setOutputPrefixForPrimaryOutput(java.lang.String prefix)
Specified by:
setOutputPrefixForPrimaryOutput in interface ITool