|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITool
This interface represents a utility of some sort that is used in the build process. A tool will generally process one or more resources to produce output resources. Most tools have a set of options that can be used to modify the behavior of the tool.
Field Summary | |
---|---|
static java.lang.String |
ADVANCED_INPUT_CATEGORY
|
static java.lang.String |
ANNOUNCEMENT
|
static java.lang.String |
COMMAND
|
static java.lang.String |
COMMAND_LINE_GENERATOR
|
static java.lang.String |
COMMAND_LINE_PATTERN
|
static java.lang.String |
CONVERT_TO_ID
|
static java.lang.String |
CUSTOM_BUILD_STEP
|
static java.lang.String |
DEP_CALC_ID
|
static java.lang.String |
EMPTY_STRING
|
static int |
FILTER_BOTH
|
static int |
FILTER_C
|
static int |
FILTER_CC
|
static java.lang.String |
INPUT_TYPE
|
static java.lang.String |
INTERFACE_EXTS
|
static java.lang.String |
IS_SYSTEM
|
static java.lang.String |
NATURE
|
static java.lang.String |
OPTIONPATHCONVERTER
|
static java.lang.String |
OUTPUT_FLAG
|
static java.lang.String |
OUTPUT_PREFIX
|
static java.lang.String |
OUTPUT_TYPE
|
static java.lang.String |
OUTPUTS
|
static java.lang.String |
SOURCES
|
static java.lang.String |
SUPPORTS_MANAGED_BUILD
|
static java.lang.String |
TOOL_ELEMENT_NAME
|
static java.lang.String |
VERSIONS_SUPPORTED
|
static java.lang.String |
WHITE_SPACE
|
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IHoldsOptions |
---|
OPTION, OPTION_CAT, OPTION_REF |
Method Summary | |
---|---|
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. |
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 |
org.eclipse.cdt.core.settings.model.extension.CLanguageData |
getCLanguageData(IInputType type)
|
org.eclipse.cdt.core.settings.model.extension.CLanguageData[] |
getCLanguageDatas()
|
java.lang.String[] |
getCommandFlags()
Deprecated. - use getToolCommandFlags instead |
IManagedCommandLineGenerator |
getCommandLineGenerator()
Returns the command line generator specified for this tool |
org.eclipse.core.runtime.IConfigurationElement |
getCommandLineGeneratorElement()
Deprecated. - use getCommandLineGenerator |
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()
Deprecated. - use getDependencyGeneratorForExtension or IInputType method |
org.eclipse.core.runtime.IConfigurationElement |
getDependencyGeneratorElement()
Deprecated. - use getDependencyGeneratorForExtension or IInputType#getDependencyGenerator method |
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.util.List |
getInputExtensions()
Deprecated. - use getPrimaryInputExtensions or getAllInputExtensions |
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()
Deprecated. - use getDependency* methods |
int |
getNatureFilter()
Answers a constant corresponding to the project nature the tool should be used for. |
IOptionPathConverter |
getOptionPathConverter()
Returns an IOptionPathConverter implementation for this tool or null, if no conversion is required |
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()
Deprecated. - use getAllOutputExtensions |
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 . |
ITool |
getSuperClass()
Returns the ITool that is the superclass of this
tool, or null if the attribute was not specified. |
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()
Deprecated. - use getToolCommandFlagsString instead |
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. |
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 |
isSystemObject()
|
boolean |
matches(ITool tool)
|
boolean |
producesFileType(java.lang.String outputExtension)
Answers true if the receiver builds a file with the extension specified
in the argument, else false . |
void |
removeInputType(IInputType type)
Removes an InputType from the tool's list. |
void |
removeOutputType(IOutputType type)
Removes an OutputType from the tool's list. |
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)
Deprecated. |
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)
Deprecated. |
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 |
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. |
boolean |
setToolCommand(java.lang.String command)
Sets the command-line invocation command defined for this tool. |
void |
setVersionsSupported(java.lang.String versionsSupported)
Sets the 'versionsSupported' attribute of the tool. |
boolean |
supportsBuild(boolean managed)
|
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IHoldsOptions |
---|
addOptionCategory, createOption, createOptions, getChildCategories, getOption, getOptionById, getOptionBySuperClassId, getOptionCategory, getOptions, getOptionToSet, needsRebuild, removeOption, setRebuildState |
Field Detail |
---|
static final java.lang.String COMMAND
static final java.lang.String COMMAND_LINE_PATTERN
static final java.lang.String COMMAND_LINE_GENERATOR
static final java.lang.String DEP_CALC_ID
static final java.lang.String INTERFACE_EXTS
static final java.lang.String NATURE
static final java.lang.String OUTPUT_FLAG
static final java.lang.String INPUT_TYPE
static final java.lang.String OUTPUT_TYPE
static final java.lang.String OUTPUT_PREFIX
static final java.lang.String OUTPUTS
static final java.lang.String SOURCES
static final java.lang.String ADVANCED_INPUT_CATEGORY
static final java.lang.String CUSTOM_BUILD_STEP
static final java.lang.String ANNOUNCEMENT
static final java.lang.String TOOL_ELEMENT_NAME
static final java.lang.String WHITE_SPACE
static final java.lang.String EMPTY_STRING
static final java.lang.String IS_SYSTEM
static final java.lang.String VERSIONS_SUPPORTED
static final java.lang.String CONVERT_TO_ID
static final java.lang.String OPTIONPATHCONVERTER
static final java.lang.String SUPPORTS_MANAGED_BUILD
static final int FILTER_C
static final int FILTER_CC
static final int FILTER_BOTH
Method Detail |
---|
IBuildObject getParent()
IInputType createInputType(IInputType superClass, java.lang.String Id, java.lang.String name, boolean isExtensionElement)
InputType
- The superClass, if anyString
- The id for the new InputTypeString
- The name for the new InputTypeboolean
- Indicates whether this is an extension element or a managed project element
void removeInputType(IInputType type)
type
- IInputType[] getInputTypes()
IInputType getInputTypeById(java.lang.String id)
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.
id
- unique identifier of the InputType to search for
IInputType
IInputType getInputType(java.lang.String inputExtension)
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.
inputExtension
- File extension
IInputType
IInputType getPrimaryInputType()
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.
IInputType
org.eclipse.core.runtime.IPath[] getAdditionalResources()
org.eclipse.core.runtime.IPath[] getAdditionalDependencies()
IOutputType createOutputType(IOutputType superClass, java.lang.String Id, java.lang.String name, boolean isExtensionElement)
OutputType
- The superClass, if anyString
- The id for the new OutputTypeString
- The name for the new OutputTypeboolean
- Indicates whether this is an extension element or a managed project element
void removeOutputType(IOutputType type)
type
- IOutputType[] getOutputTypes()
IOutputType getOutputTypeById(java.lang.String id)
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.
id
- unique identifier of the OutputType to search for
IOutputType
IOutputType getOutputType(java.lang.String outputExtension)
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.
outputExtension
- File extension
IOutputType
IOutputType getPrimaryOutputType()
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.
IOutputType
ITool getSuperClass()
ITool
that is the superclass of this
tool, or null
if the attribute was not specified.
boolean isAbstract()
false
if the attribute was not specified.
void setIsAbstract(boolean b)
b
- java.lang.String getUnusedChildren()
java.lang.String getErrorParserIds()
java.lang.String[] getErrorParserList()
void setErrorParserIds(java.lang.String ids)
ids
- java.util.List getInputExtensions()
null
.
java.lang.String[] getPrimaryInputExtensions()
null
.
java.lang.String[] getAllInputExtensions()
null
.
java.lang.String getDefaultInputExtension()
java.lang.String[] getAllDependencyExtensions()
null
.
java.util.List getInterfaceExtensions()
null
.
int getNatureFilter()
java.lang.String[] getAllOutputExtensions()
null
.
java.lang.String[] getOutputExtensions()
String[]
of extensionsjava.lang.String[] getOutputsAttribute()
String[]
of extensionsjava.lang.String getOutputExtension(java.lang.String inputExtension)
null
if the tool does not understand that extension.
inputExtension
- The extension of the source file.
void setOutputsAttribute(java.lang.String extensions)
String
- java.lang.String getOutputFlag()
void setOutputFlag(java.lang.String flag)
String
- java.lang.String getOutputPrefix()
void setOutputPrefix(java.lang.String prefix)
String
- #setOutputPrefixForPrimaryOutput(String)}
void setOutputPrefixForPrimaryOutput(java.lang.String prefix)
boolean getAdvancedInputCategory()
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
.
void setAdvancedInputCategory(boolean display)
display
- boolean getCustomBuildStep()
true
if the Tool represents a user-define custom build
step, else false
.
void setCustomBuildStep(boolean customBuildStep)
customBuildStep
- java.lang.String getAnnouncement()
void setAnnouncement(java.lang.String announcement)
announcement
- java.lang.String getToolCommand()
boolean setToolCommand(java.lang.String command)
String
-
true
, then the tool command was modifiedjava.lang.String getCommandLinePattern()
void setCommandLinePattern(java.lang.String pattern)
String
- org.eclipse.core.runtime.IConfigurationElement getCommandLineGeneratorElement()
null
if none.
void setCommandLineGeneratorElement(org.eclipse.core.runtime.IConfigurationElement element)
element
- IManagedCommandLineGenerator getCommandLineGenerator()
org.eclipse.core.runtime.IConfigurationElement getDependencyGeneratorElement()
null
if none.
void setDependencyGeneratorElement(org.eclipse.core.runtime.IConfigurationElement element)
element
- IManagedDependencyGenerator getDependencyGenerator()
null
in which case, the receiver
should assume that the tool does not require dependency information
when the project is built.
IManagedDependencyGeneratorType getDependencyGeneratorForExtension(java.lang.String sourceExt)
null
in which case, the receiver
should assume that the tool does not require dependency information
when the project is built.
sourceExt
- source file extension
java.lang.String[] getCommandFlags() throws BuildException
BuildException
java.lang.String getToolFlags() throws BuildException
BuildException
java.lang.String[] getToolCommandFlags(org.eclipse.core.runtime.IPath inputFileLocation, org.eclipse.core.runtime.IPath outputFileLocation) throws BuildException
inputFileLocation
- outputFileLocation
-
BuildException
java.lang.String getToolCommandFlagsString(org.eclipse.core.runtime.IPath inputFileLocation, org.eclipse.core.runtime.IPath outputFileLocation) throws BuildException
inputFileLocation
- outputFileLocation
-
BuildException
IOptionCategory getTopOptionCategory()
boolean buildsFileType(java.lang.String extension)
true
if the receiver builds files with the
specified extension, else false
.
extension
- file extension of the source
boolean isInputFileType(java.lang.String extension)
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.
extension
- file extension of the source
boolean isHeaderFile(java.lang.String ext)
true
if the tool considers the file extension to be
one associated with a header file.
ext
- file extension of the source
boolean producesFileType(java.lang.String outputExtension)
true
if the receiver builds a file with the extension specified
in the argument, else false
.
outputExtension
- extension of the file being produced by a tool
boolean isDirty()
true
if this tool has changes that need to
be saved in the project file, else false
.
void setDirty(boolean isDirty)
isDirty
- boolean isExtensionElement()
true
if this tool was loaded from a manifest file,
and false
if it was loaded from a project (.cdtbuild) file.
java.lang.String getVersionsSupported()
java.lang.String getConvertToId()
void setVersionsSupported(java.lang.String versionsSupported)
versionsSupported
- void setConvertToId(java.lang.String convertToId)
convertToId
- IEnvVarBuildPath[] getEnvVarBuildPaths()
IOptionPathConverter getOptionPathConverter()
org.eclipse.cdt.core.settings.model.extension.CLanguageData getCLanguageData(IInputType type)
org.eclipse.cdt.core.settings.model.extension.CLanguageData[] getCLanguageDatas()
IInputType getInputTypeForCLanguageData(org.eclipse.cdt.core.settings.model.extension.CLanguageData data)
IResourceInfo getParentResourceInfo()
IInputType getEdtableInputType(IInputType base)
IOutputType getEdtableOutputType(IOutputType base)
boolean isEnabled()
boolean supportsBuild(boolean managed)
boolean matches(ITool tool)
boolean isSystemObject()
java.lang.String getUniqueRealName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |