|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo
public class ManagedBuildInfo
Field Summary | |
---|---|
static org.eclipse.cdt.core.model.IContainerEntry |
containerEntry
|
static java.lang.String |
MAJOR_SEPERATOR
|
static java.lang.String |
MINOR_SEPERATOR
|
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo |
---|
DEFAULT_CONFIGURATION, DEFAULT_TARGET |
Constructor Summary | |
---|---|
ManagedBuildInfo(org.eclipse.core.resources.IResource owner)
Basic contructor used when the project is brand new. |
|
ManagedBuildInfo(org.eclipse.core.resources.IResource owner,
org.eclipse.cdt.core.settings.model.ICStorageElement element,
boolean loadConfigs,
java.lang.String managedBuildRevision)
Reads the build information from the project file and creates the internal representation of the build settings for the project. |
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)
Returns IManagedCommandLineInfo for source with extension
The command line info contains values with
build macros resolved to the makefile format. |
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. |
org.eclipse.cdt.core.model.ICProject |
getCProject()
|
IConfiguration |
getDefaultConfiguration()
Get the default configuration associated with the receiver |
java.util.Map |
getDefinedSymbols()
|
IManagedDependencyGeneratorType |
getDependencyGenerator(java.lang.String sourceExtension)
|
java.lang.String |
getFlagsForConfiguration(java.lang.String extension)
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 |
getFlagsForSource(java.lang.String extension)
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[] |
getIncludePaths()
|
java.lang.String[] |
getLibsForConfiguration(java.lang.String extension)
Answers the libraries the project links in. |
org.eclipse.cdt.core.model.IPathEntry[] |
getManagedBuildBuiltIns()
Obtain all possible Managed build built-ins |
org.eclipse.cdt.core.model.IPathEntry[] |
getManagedBuildBuiltIns(int entryType)
|
org.eclipse.cdt.core.model.IPathEntry[] |
getManagedBuildValues()
Obtain all possible Managed build values |
org.eclipse.cdt.core.model.IPathEntry[] |
getManagedBuildValues(int entryType)
|
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. |
org.eclipse.core.resources.IResource |
getOwner()
|
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 sourceExtension)
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 |
void |
initializePathEntries()
|
boolean |
isContainerInited()
|
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 |
serializeLegacy(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
Write the contents of the build model to the persistent store specified in the argument. |
void |
setContainerInited(boolean bInited)
|
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 managedProject)
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 config)
Sets the currently selected configuration. |
void |
setValid(boolean isValid)
Sets the valid flag for the build model to the value of the argument. |
void |
setVersion(java.lang.String version)
|
java.lang.String |
toString()
|
void |
updateOwner(org.eclipse.core.resources.IResource resource)
Sets the owner of the receiver to be the IResource specified
in the argument. |
void |
updateRevision(java.lang.String revision)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final org.eclipse.cdt.core.model.IContainerEntry containerEntry
public static final java.lang.String MAJOR_SEPERATOR
public static final java.lang.String MINOR_SEPERATOR
Constructor Detail |
---|
public ManagedBuildInfo(org.eclipse.core.resources.IResource owner)
owner
- public ManagedBuildInfo(org.eclipse.core.resources.IResource owner, org.eclipse.cdt.core.settings.model.ICStorageElement element, boolean loadConfigs, java.lang.String managedBuildRevision)
owner
- element
- managedBuildRevision
- Method Detail |
---|
public void setManagedProject(IManagedProject managedProject)
IManagedBuildInfo
setManagedProject
in interface IManagedBuildInfo
public IManagedProject getManagedProject()
IManagedBuildInfo
getManagedProject
in interface IManagedBuildInfo
public boolean buildsFileType(java.lang.String srcExt)
IManagedBuildInfo
true
if the build system knows how to
build a file with the extension passed in the argument.
buildsFileType
in interface IManagedBuildInfo
public java.lang.String getBuildArtifactExtension()
IManagedBuildInfo
getBuildArtifactExtension
in interface IManagedBuildInfo
public java.lang.String getBuildArtifactName()
IManagedBuildInfo
getBuildArtifactName
in interface IManagedBuildInfo
public java.lang.String getCleanCommand()
IManagedBuildInfo
getCleanCommand
in interface IManagedBuildInfo
public java.lang.String getConfigurationName()
IManagedBuildInfo
Debug
or Release
.
getConfigurationName
in interface IManagedBuildInfo
public java.lang.String[] getConfigurationNames()
IManagedBuildInfo
String
array containing the names of all the configurations
defined for the project.
getConfigurationNames
in interface IManagedBuildInfo
public org.eclipse.cdt.core.model.ICProject getCProject()
public IConfiguration getDefaultConfiguration()
IManagedBuildInfo
getDefaultConfiguration
in interface IManagedBuildInfo
public java.util.Map getDefinedSymbols()
getDefinedSymbols
in interface org.eclipse.cdt.core.parser.IScannerInfo
public IManagedDependencyGeneratorType getDependencyGenerator(java.lang.String sourceExtension)
getDependencyGenerator
in interface IManagedBuildInfo
public java.lang.String getFlagsForSource(java.lang.String extension)
IManagedBuildInfo
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
getFlagsForSource
in interface IManagedBuildInfo
public java.lang.String getToolFlagsForSource(java.lang.String extension, org.eclipse.core.runtime.IPath inputLocation, org.eclipse.core.runtime.IPath outputLocation)
IManagedBuildInfo
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
getToolFlagsForSource
in interface IManagedBuildInfo
public java.lang.String getFlagsForConfiguration(java.lang.String extension)
IManagedBuildInfo
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
getFlagsForConfiguration
in interface IManagedBuildInfo
public java.lang.String getToolFlagsForConfiguration(java.lang.String extension, org.eclipse.core.runtime.IPath inputLocation, org.eclipse.core.runtime.IPath outputLocation)
IManagedBuildInfo
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
getToolFlagsForConfiguration
in interface IManagedBuildInfo
public java.lang.String[] getIncludePaths()
getIncludePaths
in interface org.eclipse.cdt.core.parser.IScannerInfo
public java.lang.String[] getLibsForConfiguration(java.lang.String extension)
IManagedBuildInfo
getLibsForConfiguration
in interface IManagedBuildInfo
public java.lang.String getBuildArguments()
IManagedBuildInfo
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"}.
getBuildArguments
in interface IManagedBuildInfo
public java.lang.String getBuildCommand()
IManagedBuildInfo
String
containing the make command invocation
for the default configuration.
getBuildCommand
in interface IManagedBuildInfo
public java.lang.String getPrebuildStep()
IManagedBuildInfo
getPrebuildStep
in interface IManagedBuildInfo
public java.lang.String getPostbuildStep()
IManagedBuildInfo
getPostbuildStep
in interface IManagedBuildInfo
public java.lang.String getPreannouncebuildStep()
IManagedBuildInfo
getPreannouncebuildStep
in interface IManagedBuildInfo
public java.lang.String getPostannouncebuildStep()
IManagedBuildInfo
getPostannouncebuildStep
in interface IManagedBuildInfo
public java.lang.String getOutputExtension(java.lang.String resourceExtension)
IManagedBuildInfo
null
.
getOutputExtension
in interface IManagedBuildInfo
public java.lang.String getOutputFlag(java.lang.String outputExt)
IManagedBuildInfo
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
getOutputFlag
in interface IManagedBuildInfo
public java.lang.String getOutputPrefix(java.lang.String outputExtension)
IManagedBuildInfo
getOutputPrefix
in interface IManagedBuildInfo
public org.eclipse.core.resources.IResource getOwner()
public java.lang.String getToolForSource(java.lang.String sourceExtension)
IManagedBuildInfo
String
containing the command-line invocation
for the tool associated with the source extension.
getToolForSource
in interface IManagedBuildInfo
sourceExtension
- the file extension of the file to be built
public java.lang.String getToolForConfiguration(java.lang.String extension)
IManagedBuildInfo
String
containing the command-line invocation
for the tool associated with the output extension.
getToolForConfiguration
in interface IManagedBuildInfo
extension
- the file extension of the output file
public ITool getToolFromInputExtension(java.lang.String sourceExtension)
IManagedBuildInfo
ITool
for the tool associated with the
input extension.
getToolFromInputExtension
in interface IManagedBuildInfo
sourceExtension
- the file extension of the input file
public ITool getToolFromOutputExtension(java.lang.String extension)
IManagedBuildInfo
ITool
for the tool associated with the
output extension.
getToolFromOutputExtension
in interface IManagedBuildInfo
extension
- the file extension of the output file
public 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)
IManagedBuildInfo
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
generateCommandLineInfo
in interface IManagedBuildInfo
sourceExtension
- - source extensionflags
- - build flagsoutputFlag
- - output flag for build tool
public 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)
IManagedBuildInfo
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
generateToolCommandLineInfo
in interface IManagedBuildInfo
public java.lang.String[] getUserObjectsForConfiguration(java.lang.String extension)
IManagedBuildInfo
String
array containing the contents of the
user objects option, if one is defined for the target.
getUserObjectsForConfiguration
in interface IManagedBuildInfo
extension
- the file ecxtension of the build target
public java.lang.String getVersion()
IManagedBuildInfo
getVersion
in interface IManagedBuildInfo
String
containing the build information
versionpublic void initializePathEntries()
public boolean isDirty()
IManagedBuildInfo
isDirty
in interface IManagedBuildInfo
public boolean isValid()
IManagedBuildInfo
isValid
in interface IManagedBuildInfo
true
if Managed Build Info is valid,
otherwise returns false
public boolean isReadOnly()
IManagedBuildInfo
isReadOnly
in interface IManagedBuildInfo
true
if Managed Build Info is read only
otherwise returns false
public boolean isHeaderFile(java.lang.String ext)
IManagedBuildInfo
true
if the extension matches one of the special
file extensions the tools for the configuration consider to be a header file.
isHeaderFile
in interface IManagedBuildInfo
ext
- the file extension of the resource
public boolean isContainerInited()
public boolean needsRebuild()
IManagedBuildInfo
Clients can reset the state to force or clear the rebuild status
using setRebuildState()
needsRebuild
in interface IManagedBuildInfo
true
if the resource managed by the
receiver needs to be rebuiltManagedBuildInfo#setRebuildState(boolean)
public void serializeLegacy(org.w3c.dom.Document doc, org.w3c.dom.Element element)
doc
- element
- public void setDefaultConfiguration(IConfiguration configuration)
IManagedBuildInfo
setDefaultConfiguration
in interface IManagedBuildInfo
configuration
- The IConfiguration
that will be used as the default
for all building.public boolean setDefaultConfiguration(java.lang.String configName)
setDefaultConfiguration
in interface IManagedBuildInfo
public void setDirty(boolean isDirty)
IManagedBuildInfo
setDirty
in interface IManagedBuildInfo
public void setValid(boolean isValid)
IManagedBuildInfo
setValid
in interface IManagedBuildInfo
public void setReadOnly(boolean readOnly)
IManagedBuildInfo
setReadOnly
in interface IManagedBuildInfo
public void setRebuildState(boolean rebuild)
IManagedBuildInfo
setRebuildState
in interface IManagedBuildInfo
public void setVersion(java.lang.String version)
version
- public void setContainerInited(boolean bInited)
boolean
- public java.lang.String toString()
toString
in class java.lang.Object
public void updateOwner(org.eclipse.core.resources.IResource resource)
IResource
specified
in the argument.
resource
- public IConfiguration getSelectedConfiguration()
IManagedBuildInfo
getSelectedConfiguration
in interface IManagedBuildInfo
public void setSelectedConfiguration(IConfiguration config)
IManagedBuildInfo
setSelectedConfiguration
in interface IManagedBuildInfo
config
- the user selectionpublic void addTarget(ITarget target)
IManagedBuildInfo
addTarget
in interface IManagedBuildInfo
public void removeTarget(java.lang.String id)
removeTarget
in interface IManagedBuildInfo
public ITarget getTarget(java.lang.String id)
IManagedBuildInfo
getTarget
in interface IManagedBuildInfo
public java.util.List getTargets()
IManagedBuildInfo
getTargets
in interface IManagedBuildInfo
public org.eclipse.cdt.core.model.IPathEntry[] getManagedBuildValues()
public org.eclipse.cdt.core.model.IPathEntry[] getManagedBuildBuiltIns()
public org.eclipse.cdt.core.model.IPathEntry[] getManagedBuildValues(int entryType)
entryType
-
public org.eclipse.cdt.core.model.IPathEntry[] getManagedBuildBuiltIns(int entryType)
entryType
-
public void updateRevision(java.lang.String revision)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |