public abstract class CBuildConfiguration extends org.eclipse.core.runtime.PlatformObject implements ICBuildConfiguration, ICBuildConfiguration2, IMarkerGenerator, IConsoleParser2, IElementChangedListener
DEFAULT_NAME, TOOLCHAIN_ID, TOOLCHAIN_TYPE
SEVERITY_ERROR_BUILD, SEVERITY_ERROR_RESOURCE, SEVERITY_INFO, SEVERITY_WARNING
Modifier | Constructor and Description |
---|---|
protected |
CBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration config,
IToolChain toolChain) |
protected |
CBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration config,
String name) |
protected |
CBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration config,
String name,
IToolChain toolChain) |
protected |
CBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration config,
String name,
IToolChain toolChain,
String launchMode) |
Modifier and Type | Method and Description |
---|---|
void |
addMarker(org.eclipse.core.resources.IResource file,
int lineNumber,
String errorDesc,
int severity,
String errorVar) |
void |
addMarker(ProblemMarkerInfo problemMarkerInfo) |
void |
elementChanged(ElementChangedEvent event)
Notifies that one or more attributes of one or more C elements have changed.
|
protected Path |
findCommand(String command) |
String |
getBinaryParserId()
Ids for the Binary Parsers to use when checking whether a file is a
binary that can be launched.
|
org.eclipse.core.resources.IBuildConfiguration |
getBuildConfiguration()
Returns the resources build configuration that this CDT build configuration
is associated with.
|
org.eclipse.core.resources.IContainer |
getBuildContainer() |
Path |
getBuildDirectory() |
URI |
getBuildDirectoryURI()
The URI for the directory in which the build is executed.
|
IBinary[] |
getBuildOutput()
The binaries produced by the build.
|
static Path |
getCommandFromPath(Path command)
Takes a command path and returns either the command path itself if it is
absolute or the path to the command as it appears in the PATH environment
variable.
|
Map<String,String> |
getDefaultProperties()
Returns the default values for the properties.
|
String |
getLaunchMode()
Return the launch mode associated with this build configuration.
|
String |
getName() |
org.eclipse.core.resources.IProject |
getProject() |
Map<String,String> |
getProperties()
Return the properties for this build configuration.
|
String |
getProperty(String name)
Return the named property.
|
protected ScannerInfoCache |
getScannerInfoCache() |
IScannerInfo |
getScannerInformation(org.eclipse.core.resources.IResource resource)
The receiver will answer the current state of the build information for the
resource specified in the argument.
|
protected org.osgi.service.prefs.Preferences |
getSettings() |
IToolChain |
getToolChain()
Build Configurations are configurations for a given toolchain.
|
IEnvironmentVariable |
getVariable(String name)
Return a build environment variable with a given name.
|
IEnvironmentVariable[] |
getVariables()
Return all of the build environment variables for this configuration.
|
protected void |
loadScannerInfoCache() |
boolean |
processLine(String line)
Parse one line of output.
|
boolean |
processLine(String line,
List<org.eclipse.core.runtime.jobs.Job> jobsArray)
Process a compile line for Scanner info in a separate job
|
protected void |
refreshScannerInfo() |
void |
removeProperty(String name)
Remove the named property.
|
protected void |
saveScannerInfoCache() |
void |
setActive()
Mark the Build Configuration as active
|
void |
setActive(org.eclipse.core.runtime.IProgressMonitor monitor) |
void |
setBuildEnvironment(Map<String,String> env)
Set the environment for the builds.
|
protected void |
setLaunchMode(String launchMode) |
boolean |
setProperties(Map<String,String> properties)
Set the properties for this build configuration.
|
void |
setProperty(String name,
String value)
Set a property to the given value.
|
void |
shutdown()
Called to let the parser know that the end of the error stream has been reached.
|
Process |
startBuildProcess(List<String> commands,
IEnvironmentVariable[] envVars,
org.eclipse.core.runtime.IPath buildDirectory,
IConsole console,
org.eclipse.core.runtime.IProgressMonitor monitor) |
void |
subscribe(org.eclipse.core.resources.IResource resource,
IScannerInfoChangeListener listener)
The receiver will register the listener specified in the argument
to receive change notifications when the information for the
IResource it is responsible for changes. |
void |
unsubscribe(org.eclipse.core.resources.IResource resource,
IScannerInfoChangeListener listener)
The receiver will no longer notify the listener specified in
the argument when information about the reource it is responsible
for changes.
|
protected int |
watchProcess(Process process,
IConsole console) |
protected int |
watchProcess(Process process,
IConsoleParser[] consoleParsers) |
protected int |
watchProcess(Process process,
IConsoleParser[] consoleParsers,
IConsole console)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, clean, supportsProperties
protected CBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration config, String name) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected CBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration config, String name, IToolChain toolChain)
protected CBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration config, String name, IToolChain toolChain, String launchMode)
protected CBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration config, IToolChain toolChain)
public org.eclipse.core.resources.IBuildConfiguration getBuildConfiguration()
ICBuildConfiguration
getBuildConfiguration
in interface ICBuildConfiguration
public String getName()
public String getLaunchMode()
ICBuildConfiguration
getLaunchMode
in interface ICBuildConfiguration
protected void setLaunchMode(String launchMode)
public org.eclipse.core.resources.IProject getProject()
public String getBinaryParserId() throws org.eclipse.core.runtime.CoreException
ICBuildConfiguration
getBinaryParserId
in interface ICBuildConfiguration
org.eclipse.core.runtime.CoreException
public org.eclipse.core.resources.IContainer getBuildContainer() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public URI getBuildDirectoryURI() throws org.eclipse.core.runtime.CoreException
ICBuildConfiguration2
getBuildDirectoryURI
in interface ICBuildConfiguration2
org.eclipse.core.runtime.CoreException
public Path getBuildDirectory() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public void setBuildEnvironment(Map<String,String> env)
ICBuildConfiguration
setBuildEnvironment
in interface ICBuildConfiguration
env
- build environmentpublic IBinary[] getBuildOutput() throws org.eclipse.core.runtime.CoreException
ICBuildConfiguration
getBuildOutput
in interface ICBuildConfiguration
org.eclipse.core.runtime.CoreException
public void setActive(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected org.osgi.service.prefs.Preferences getSettings()
public IToolChain getToolChain() throws org.eclipse.core.runtime.CoreException
ICBuildConfiguration
getToolChain
in interface ICBuildConfiguration
org.eclipse.core.runtime.CoreException
public IEnvironmentVariable getVariable(String name)
ICBuildConfiguration
getVariable
in interface ICBuildConfiguration
name
- build environment variable namepublic IEnvironmentVariable[] getVariables()
ICBuildConfiguration
getVariables
in interface ICBuildConfiguration
public void addMarker(org.eclipse.core.resources.IResource file, int lineNumber, String errorDesc, int severity, String errorVar)
addMarker
in interface IMarkerGenerator
public void addMarker(ProblemMarkerInfo problemMarkerInfo)
addMarker
in interface IMarkerGenerator
public Process startBuildProcess(List<String> commands, IEnvironmentVariable[] envVars, org.eclipse.core.runtime.IPath buildDirectory, IConsole console, org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException, org.eclipse.core.runtime.CoreException
IOException
org.eclipse.core.runtime.CoreException
@Deprecated protected int watchProcess(Process process, IConsoleParser[] consoleParsers, IConsole console) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected int watchProcess(Process process, IConsole console) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected int watchProcess(Process process, IConsoleParser[] consoleParsers) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
protected void loadScannerInfoCache()
protected void saveScannerInfoCache()
protected ScannerInfoCache getScannerInfoCache()
public IScannerInfo getScannerInformation(org.eclipse.core.resources.IResource resource)
IScannerInfoProvider
getScannerInformation
in interface IScannerInfoProvider
public void elementChanged(ElementChangedEvent event)
IElementChangedListener
elementChanged
in interface IElementChangedListener
event
- the change eventpublic boolean processLine(String line)
IConsoleParser
processLine
in interface IConsoleParser
false - try other console parsers
public boolean processLine(String line, List<org.eclipse.core.runtime.jobs.Job> jobsArray)
processLine
in interface IConsoleParser2
line
- - line to processjobsArray
- - array of Jobs to keep track of open scanner info jobspublic void setActive()
ICBuildConfiguration2
setActive
in interface ICBuildConfiguration2
protected void refreshScannerInfo() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public void shutdown()
IConsoleParser
shutdown
in interface IConsoleParser
public void subscribe(org.eclipse.core.resources.IResource resource, IScannerInfoChangeListener listener)
IScannerInfoProvider
IResource
it is responsible for changes.subscribe
in interface IScannerInfoProvider
public void unsubscribe(org.eclipse.core.resources.IResource resource, IScannerInfoChangeListener listener)
IScannerInfoProvider
unsubscribe
in interface IScannerInfoProvider
public static Path getCommandFromPath(Path command)
public boolean setProperties(Map<String,String> properties)
ICBuildConfiguration
setProperties
in interface ICBuildConfiguration
properties
- build propertiespublic Map<String,String> getProperties()
ICBuildConfiguration
getProperties
in interface ICBuildConfiguration
public String getProperty(String name)
ICBuildConfiguration
getProperty
in interface ICBuildConfiguration
name
- the name of the propertypublic void setProperty(String name, String value)
ICBuildConfiguration
setProperty
in interface ICBuildConfiguration
name
- the name of the propertyvalue
- the new value for the propertypublic void removeProperty(String name)
ICBuildConfiguration
removeProperty
in interface ICBuildConfiguration
name
- name of the propertypublic Map<String,String> getDefaultProperties()
ICBuildConfiguration
getDefaultProperties
in interface ICBuildConfiguration
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.