org.eclipse.cdt.managedbuilder.core
Interface IManagedBuildInfo

All Known Implementing Classes:
ManagedBuildInfo

public interface IManagedBuildInfo


Field Summary
static java.lang.String DEFAULT_CONFIGURATION
           
static java.lang.String DEFAULT_TARGET
           
 
Method Summary
 void addTarget(ITarget target)
          Add a new target to the build information for the receiver
 boolean buildsFileType(java.lang.String srcExt)
          Answers true if the build system knows how to build a file with the extension passed in the argument.
 IManagedCommandLineInfo generateCommandLineInfo(java.lang.String sourceExtension, java.lang.String[] flags, java.lang.String outputFlag, java.lang.String outputPrefix, java.lang.String outputName, java.lang.String[] inputResources)
          Deprecated. - use generateToolCommandLineInfo instead
 IManagedCommandLineInfo generateToolCommandLineInfo(java.lang.String sourceExtension, java.lang.String[] flags, java.lang.String outputFlag, java.lang.String outputPrefix, java.lang.String outputName, java.lang.String[] inputResources, org.eclipse.core.runtime.IPath inputLocation, org.eclipse.core.runtime.IPath outputLocation)
          Returns IManagedCommandLineInfo for source with extension The command line info contains values with build macros resolved to the makefile format.
 java.lang.String getBuildArguments()
          Answers a String containing the arguments to be passed to make.
 java.lang.String getBuildArtifactExtension()
          Answers the file extension for the receivers build goal without a separator.
 java.lang.String getBuildArtifactName()
          Returns the name of the artifact to build for the receiver.
 java.lang.String getBuildCommand()
          Answers a String containing the make command invocation for the default configuration.
 java.lang.String getCleanCommand()
          Answers the command needed to remove files on the build machine
 java.lang.String getConfigurationName()
          Answers the name of the default configuration, for example Debug or Release.
 java.lang.String[] getConfigurationNames()
          Answers a String array containing the names of all the configurations defined for the project.
 IConfiguration getDefaultConfiguration()
          Get the default configuration associated with the receiver
 IManagedDependencyGeneratorType getDependencyGenerator(java.lang.String sourceExtension)
           
 java.lang.String getFlagsForConfiguration(java.lang.String extension)
          Deprecated. - use getToolFlagsForConfiguration
 java.lang.String getFlagsForSource(java.lang.String extension)
          Deprecated. - use getToolFlagsForSource
 java.lang.String[] getLibsForConfiguration(java.lang.String extension)
          Answers the libraries the project links in.
 IManagedProject getManagedProject()
          Returns the ManagedProject associated with this build info
 java.lang.String getOutputExtension(java.lang.String resourceExtension)
          Answers the extension that will be built by the current configuration for the extension passed in the argument or null.
 java.lang.String getOutputFlag(java.lang.String outputExt)
          Answers the flag to be passed to the build tool to produce a specific output or an empty String if there is no special flag.
 java.lang.String getOutputPrefix(java.lang.String outputExtension)
          Answers the prefix that should be prepended to the name of the build artifact.
 java.lang.String getPostannouncebuildStep()
          Answers the display string associated with the postbuild step for the default configuration
 java.lang.String getPostbuildStep()
          Answers the postbuild step for the default configuration
 java.lang.String getPreannouncebuildStep()
          Answers the display string associated with the prebuild step for the default configuration
 java.lang.String getPrebuildStep()
          Answers the prebuild step for the default configuration
 IConfiguration getSelectedConfiguration()
          Returns the currently selected configuration.
 ITarget getTarget(java.lang.String id)
          Get the target specified in the argument.
 java.util.List getTargets()
          Get all of the targets associated with the receiver.
 java.lang.String getToolFlagsForConfiguration(java.lang.String extension, org.eclipse.core.runtime.IPath inputLocation, org.eclipse.core.runtime.IPath outputLocation)
          Returns a String containing the flags, including those overridden by the user, for the tool in the configuration defined by the argument.
 java.lang.String getToolFlagsForSource(java.lang.String extension, org.eclipse.core.runtime.IPath inputLocation, org.eclipse.core.runtime.IPath outputLocation)
          Returns a String containing the flags, including those overridden by the user, for the tool that handles the type of source file defined by the argument.
 java.lang.String getToolForConfiguration(java.lang.String extension)
          Returns a String containing the command-line invocation for the tool associated with the output extension.
 java.lang.String getToolForSource(java.lang.String sourceExtension)
          Returns a String containing the command-line invocation for the tool associated with the source extension.
 ITool getToolFromInputExtension(java.lang.String extension)
          Returns a ITool for the tool associated with the input extension.
 ITool getToolFromOutputExtension(java.lang.String extension)
          Returns a ITool for the tool associated with the output extension.
 java.lang.String[] getUserObjectsForConfiguration(java.lang.String extension)
          Answers a String array containing the contents of the user objects option, if one is defined for the target.
 java.lang.String getVersion()
          Answers the version of the build information in the format
 boolean isDirty()
          Answers true if the build model has been changed by the user.
 boolean isHeaderFile(java.lang.String ext)
          Answers true if the extension matches one of the special file extensions the tools for the configuration consider to be a header file.
 boolean isReadOnly()
          Gets the read only status of Managed Build Info
 boolean isValid()
          Gets the "valid" status of Managed Build Info.
 boolean needsRebuild()
          Answers whether the receiver has been changed and requires the project to be rebuilt.
 void removeTarget(java.lang.String id)
           
 void setDefaultConfiguration(IConfiguration configuration)
          Set the primary configuration for the receiver.
 boolean setDefaultConfiguration(java.lang.String configName)
           
 void setDirty(boolean isDirty)
          Sets the dirty flag for the build model to the value of the argument.
 void setManagedProject(IManagedProject project)
          Sets the ManagedProject associated with this build info
 void setReadOnly(boolean readOnly)
          sets the read only status of Managed Build Info
 void setRebuildState(boolean rebuild)
          Sets the rebuild state in the receiver to the value of the argument.
 void setSelectedConfiguration(IConfiguration configuration)
          Sets the currently selected configuration.
 void setValid(boolean isValid)
          Sets the valid flag for the build model to the value of the argument.
 

Field Detail

DEFAULT_CONFIGURATION

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

DEFAULT_TARGET

static final java.lang.String DEFAULT_TARGET
See Also:
Constant Field Values
Method Detail

addTarget

void addTarget(ITarget target)
Add a new target to the build information for the receiver

Parameters:
target -

buildsFileType

boolean buildsFileType(java.lang.String srcExt)
Answers true if the build system knows how to build a file with the extension passed in the argument.

Parameters:
srcExt -
Returns:

generateCommandLineInfo

IManagedCommandLineInfo generateCommandLineInfo(java.lang.String sourceExtension,
                                                java.lang.String[] flags,
                                                java.lang.String outputFlag,
                                                java.lang.String outputPrefix,
                                                java.lang.String outputName,
                                                java.lang.String[] inputResources)
Deprecated. - use generateToolCommandLineInfo instead

Returns IManagedCommandLineInfo for source with extension The command line info contains values with build macros resolved to the makefile format. That is if a user has chosen to expand all macros in the buildfile, command line info contains values contain all macro references resolved, otherwise, if a user has chosen to keep the environment build macros unresolved, the command line info contains values contain the environment macro references converted to the buildfile variable format, all other macro references are resolved

Parameters:
sourceExtension - - source extension
flags - - build flags
outputFlag - - output flag for build tool
outputPrefix -
outputName -
inputResources -
Returns:
IManagedCommandLineInfo

generateToolCommandLineInfo

IManagedCommandLineInfo generateToolCommandLineInfo(java.lang.String sourceExtension,
                                                    java.lang.String[] flags,
                                                    java.lang.String outputFlag,
                                                    java.lang.String outputPrefix,
                                                    java.lang.String outputName,
                                                    java.lang.String[] inputResources,
                                                    org.eclipse.core.runtime.IPath inputLocation,
                                                    org.eclipse.core.runtime.IPath outputLocation)
Returns IManagedCommandLineInfo for source with extension The command line info contains values with build macros resolved to the makefile format. That is if a user has chosen to expand all macros in the buildfile, command line info contains values contain all macro references resolved, otherwise, if a user has chosen to keep the environment build macros unresolved, the command line info contains values contain the environment macro references converted to the buildfile variable format, all other macro references are resolved

Parameters:
sourceExtension -
flags -
outputFlag -
outputPrefix -
outputName -
inputResources -
inputLocation -
outputLocation -
Returns:

getBuildArguments

java.lang.String getBuildArguments()
Answers a String containing the arguments to be passed to make. For example, if the user has selected a build that keeps going on error, the answer would contain {"-k"}.

Returns:
String

getBuildArtifactExtension

java.lang.String getBuildArtifactExtension()
Answers the file extension for the receivers build goal without a separator.

Returns:
the extension or an empty string if none is defined

getBuildArtifactName

java.lang.String getBuildArtifactName()
Returns the name of the artifact to build for the receiver.

Returns:

getBuildCommand

java.lang.String getBuildCommand()
Answers a String containing the make command invocation for the default configuration.


getPrebuildStep

java.lang.String getPrebuildStep()
Answers the prebuild step for the default configuration

Returns:
String

getPostbuildStep

java.lang.String getPostbuildStep()
Answers the postbuild step for the default configuration

Returns:
String

getPreannouncebuildStep

java.lang.String getPreannouncebuildStep()
Answers the display string associated with the prebuild step for the default configuration

Returns:
String

getPostannouncebuildStep

java.lang.String getPostannouncebuildStep()
Answers the display string associated with the postbuild step for the default configuration

Returns:
String

getCleanCommand

java.lang.String getCleanCommand()
Answers the command needed to remove files on the build machine

Returns:

getConfigurationName

java.lang.String getConfigurationName()
Answers the name of the default configuration, for example Debug or Release.

Returns:

getConfigurationNames

java.lang.String[] getConfigurationNames()
Answers a String array containing the names of all the configurations defined for the project.

Returns:

getDefaultConfiguration

IConfiguration getDefaultConfiguration()
Get the default configuration associated with the receiver

Returns:

getDependencyGenerator

IManagedDependencyGeneratorType getDependencyGenerator(java.lang.String sourceExtension)
Parameters:
sourceExtension -
Returns:

getFlagsForConfiguration

java.lang.String getFlagsForConfiguration(java.lang.String extension)
Deprecated. - use getToolFlagsForConfiguration

Returns a String containing the flags, including those overridden by the user, for the tool in the configuration defined by the argument. 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

Parameters:
extension -
Returns:

getToolFlagsForConfiguration

java.lang.String getToolFlagsForConfiguration(java.lang.String extension,
                                              org.eclipse.core.runtime.IPath inputLocation,
                                              org.eclipse.core.runtime.IPath outputLocation)
Returns a String containing the flags, including those overridden by the user, for the tool in the configuration defined by the argument. 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

Parameters:
extension -
inputLocation -
outputLocation -
Returns:

getFlagsForSource

java.lang.String getFlagsForSource(java.lang.String extension)
Deprecated. - use getToolFlagsForSource

Returns a String containing the flags, including those overridden by the user, for the tool that handles the type of source file defined by the argument. 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

Parameters:
extension -
Returns:

getToolFlagsForSource

java.lang.String getToolFlagsForSource(java.lang.String extension,
                                       org.eclipse.core.runtime.IPath inputLocation,
                                       org.eclipse.core.runtime.IPath outputLocation)
Returns a String containing the flags, including those overridden by the user, for the tool that handles the type of source file defined by the argument. 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

Parameters:
extension -
inputLocation -
outputLocation -
Returns:

getLibsForConfiguration

java.lang.String[] getLibsForConfiguration(java.lang.String extension)
Answers the libraries the project links in.

Parameters:
extension -
Returns:

getManagedProject

IManagedProject getManagedProject()
Returns the ManagedProject associated with this build info

Returns:
IManagedProject

getOutputExtension

java.lang.String getOutputExtension(java.lang.String resourceExtension)
Answers the extension that will be built by the current configuration for the extension passed in the argument or null.

Parameters:
resourceName -
Returns:

getOutputFlag

java.lang.String getOutputFlag(java.lang.String outputExt)
Answers the flag to be passed to the build tool to produce a specific output or an empty String if there is no special flag. For example, the GCC tools use the '-o' flag to produce a named output, for example gcc -c foo.c -o foo.o

Parameters:
outputExt -
Returns:

getOutputPrefix

java.lang.String getOutputPrefix(java.lang.String outputExtension)
Answers the prefix that should be prepended to the name of the build artifact. For example, a library foo, should have the prefix 'lib' and the extension '.a', so the final goal would be 'libfoo.a'

Parameters:
extension -
Returns:
the prefix or an empty string

getSelectedConfiguration

IConfiguration getSelectedConfiguration()
Returns the currently selected configuration. This is used while the project property pages are displayed

Returns:
IConfiguration

getTarget

ITarget getTarget(java.lang.String id)
Get the target specified in the argument.

Parameters:
id -
Returns:

getTargets

java.util.List getTargets()
Get all of the targets associated with the receiver.

Returns:

getToolForConfiguration

java.lang.String getToolForConfiguration(java.lang.String extension)
Returns a String containing the command-line invocation for the tool associated with the output extension.

Parameters:
extension - the file extension of the output file
Returns:
a String containing the command line invocation for the tool

getToolForSource

java.lang.String getToolForSource(java.lang.String sourceExtension)
Returns a String containing the command-line invocation for the tool associated with the source extension.

Parameters:
sourceExtension - the file extension of the file to be built
Returns:
a String containing the command line invocation for the tool

getToolFromInputExtension

ITool getToolFromInputExtension(java.lang.String extension)
Returns a ITool for the tool associated with the input extension.

Parameters:
extension - the file extension of the input file
Returns:
ITool

getToolFromOutputExtension

ITool getToolFromOutputExtension(java.lang.String extension)
Returns a ITool for the tool associated with the output extension.

Parameters:
extension - the file extension of the output file
Returns:
ITool

getUserObjectsForConfiguration

java.lang.String[] getUserObjectsForConfiguration(java.lang.String extension)
Answers a String array containing the contents of the user objects option, if one is defined for the target.

Parameters:
extension - the file ecxtension of the build target
Returns:

getVersion

java.lang.String getVersion()
Answers the version of the build information in the format

Returns:
a String containing the build information version

isDirty

boolean isDirty()
Answers true if the build model has been changed by the user.

Returns:
boolean

isHeaderFile

boolean isHeaderFile(java.lang.String ext)
Answers true if the extension matches one of the special file extensions the tools for the configuration consider to be a header file.

Parameters:
ext - the file extension of the resource
Returns:
boolean

isReadOnly

boolean isReadOnly()
Gets the read only status of Managed Build Info

Returns:
true if Managed Build Info is read only otherwise returns false

isValid

boolean isValid()
Gets the "valid" status of Managed Build Info. Managed Build Info is invalid if the loading of, or conversion to, the Managed Build Info failed.

Returns:
true if Managed Build Info is valid, otherwise returns false

needsRebuild

boolean needsRebuild()
Answers whether the receiver has been changed and requires the project to be rebuilt. When a project is first created, it is assumed that the user will need it to be fully rebuilt. However only option and tool command changes will trigger the build information for an existing project to require a rebuild.

Clients can reset the state to force or clear the rebuild status using setRebuildState()

Returns:
true if the resource managed by the receiver needs to be rebuilt
See Also:
ManagedBuildInfo#setRebuildState(boolean)

removeTarget

void removeTarget(java.lang.String id)

setDefaultConfiguration

void setDefaultConfiguration(IConfiguration configuration)
Set the primary configuration for the receiver.

Parameters:
configuration - The IConfiguration that will be used as the default for all building.

setDefaultConfiguration

boolean setDefaultConfiguration(java.lang.String configName)
Parameters:
configuration -
Returns:

setDirty

void setDirty(boolean isDirty)
Sets the dirty flag for the build model to the value of the argument.

Parameters:
isDirty -

setValid

void setValid(boolean isValid)
Sets the valid flag for the build model to the value of the argument.

Parameters:
isValid -

setManagedProject

void setManagedProject(IManagedProject project)
Sets the ManagedProject associated with this build info

Parameters:
project -

setReadOnly

void setReadOnly(boolean readOnly)
sets the read only status of Managed Build Info

Parameters:
readOnly -

setRebuildState

void setRebuildState(boolean rebuild)
Sets the rebuild state in the receiver to the value of the argument. This is a potentially expensive option, so setting it to true should only be done if a project resource or setting has been modified in a way that would invalidate the previous build.

Parameters:
true - will force a rebuild the next time the project builds

setSelectedConfiguration

void setSelectedConfiguration(IConfiguration configuration)
Sets the currently selected configuration. This is used while the project property pages are displayed

Parameters:
configuration - the user selection