|
Carbide.c++ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCommandLauncher
com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher
public class CarbideCommandLauncher
A utility class to handle windows process execution. This utility class handles all the execution, error processing, and console output.
Field Summary | |
---|---|
protected IConsole |
console
|
protected ConsoleOutputStream |
consoleErrorStream
|
protected ConsoleOutputStream |
consoleInfoStream
|
protected ConsoleOutputStream |
consoleOutStream
|
protected java.lang.String[] |
errorParserIds
|
protected IMarkerGenerator |
markerGen
|
protected IProgressMonitor |
monitor
|
protected IProject |
project
|
protected long |
startTime
|
protected ErrorParserManager |
stderrStream
|
protected ErrorParserManager |
stdoutStream
|
Constructor Summary | |
---|---|
CarbideCommandLauncher(IProject project,
IProgressMonitor monitor,
IConsole console)
Deprecated. use CarbideCommandLauncher(IProject, IProgressMonitor, String[], IPath) instead |
|
CarbideCommandLauncher(IProject project,
IProgressMonitor monitor,
IConsole console,
java.lang.String[] errorParserIds,
IPath workingDir)
Deprecated. don't pass in a console if you want to to get colored info/output/error streams. use CarbideCommandLauncher(IProject, IProgressMonitor, String[], IPath) instead,
or pass in CUIPlugin.getDefault().getConsoleManager().getConsole(project) |
|
CarbideCommandLauncher(IProject project,
IProgressMonitor monitor,
java.lang.String[] errorParserIds,
IPath workingDir)
Create an instance of the CarbideCommandLauncher with error parsing |
Method Summary | |
---|---|
void |
addMarker(IResource file,
int lineNumber,
java.lang.String errorDesc,
int severity,
java.lang.String errorVar)
|
void |
addMarker(ProblemMarkerInfo problemMarkerInfo)
|
int |
executeCommand(IPath command,
java.lang.String[] args,
java.lang.String[] env,
IPath workingDir)
Executes a single command. |
static IPath |
getCmdExeLocation()
Deprecated. don't use cmd.exe for calling executeCommand. just use the process you want to call, e.g. abld.bat. There have been intermittent problems canceling the cmd.exe process. |
ConsoleOutputStream |
getConsoleOutputStream()
Get the output stream for the console |
java.lang.String |
getTimingStats()
Get a formatted string of total time since timer was started. |
IPath |
getWorkingDirectory()
Returns the current working directory |
void |
init()
Initialize variables. |
void |
setErrorParserManager(IPath workingDir,
java.lang.String[] parserIDs)
Sets up the core ErrorParserManager |
void |
startTimingStats()
Sets the current system time as the starting time. |
void |
writeToConsole(java.lang.String msg)
Write a message to the console |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IProgressMonitor monitor
protected IConsole console
protected ErrorParserManager stdoutStream
protected ErrorParserManager stderrStream
protected ConsoleOutputStream consoleOutStream
protected ConsoleOutputStream consoleErrorStream
protected ConsoleOutputStream consoleInfoStream
protected IProject project
protected java.lang.String[] errorParserIds
protected IMarkerGenerator markerGen
protected long startTime
Constructor Detail |
---|
public CarbideCommandLauncher(IProject project, IProgressMonitor monitor, IConsole console, java.lang.String[] errorParserIds, IPath workingDir)
CarbideCommandLauncher(IProject, IProgressMonitor, String[], IPath)
instead,
or pass in CUIPlugin.getDefault().getConsoleManager().getConsole(project)
carbideProjectInfo
- - A valid ICarbideProjectInfo object interfacemonitor
- - The IProgressMonitorconsole
- - The console where output streams are written.errorParserIds
- - The list of error parser IDs used to parse the output streams. Can be null or empty array if no error parsing is required.workingDir
- - Location of program execution. Used init the ErrorParserManagerpublic CarbideCommandLauncher(IProject project, IProgressMonitor monitor, java.lang.String[] errorParserIds, IPath workingDir)
carbideProjectInfo
- - A valid ICarbideProjectInfo object interfacemonitor
- - The IProgressMonitorerrorParserIds
- - The list of error parser IDs used to parse the output streams. Can be null or empty array if no error parsing is required.workingDir
- - Location of program execution. Used init the ErrorParserManagerpublic CarbideCommandLauncher(IProject project, IProgressMonitor monitor, IConsole console)
CarbideCommandLauncher(IProject, IProgressMonitor, String[], IPath)
instead
carbideProjectInfo
- - A valid IProject object interfacemonitor
- - The IProgressMonitorconsole
- - The console where output streams are written.Method Detail |
---|
public void init()
public void setErrorParserManager(IPath workingDir, java.lang.String[] parserIDs)
workingDir
- - Location where file paths will be computed from (e.g. relative paths)parserIDs
- - The ID of plugin.xml parser extension IDs to be called on the process execution for stderr and stdoutpublic ConsoleOutputStream getConsoleOutputStream()
public void writeToConsole(java.lang.String msg)
public int executeCommand(IPath command, java.lang.String[] args, java.lang.String[] env, IPath workingDir)
command
- - The tool to callargs
- - argument array that 'command' consumesenv
- - Full list of environment variablesworkingDir
- - The current working directory the command is to be invoked in.
public void startTimingStats()
getTimingStats()
public java.lang.String getTimingStats()
public void addMarker(IResource file, int lineNumber, java.lang.String errorDesc, int severity, java.lang.String errorVar)
public void addMarker(ProblemMarkerInfo problemMarkerInfo)
public static IPath getCmdExeLocation()
public IPath getWorkingDirectory()
|
Carbide.c++ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |