|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.compiler.CompilerGroup | +--org.openide.compiler.ExternalCompilerGroup
A group holding several ExternalCompiler
s.
When they are compiled, all the filename arguments are collected and the process is run
only once.
ExternalCompiler
Inner Class Summary | |
static class |
ExternalCompilerGroup.Format
Default format that can format tags related to compilation. |
Constructor Summary | |
ExternalCompilerGroup()
Create an external compiler group. |
Method Summary | |
void |
add(Compiler c)
Add a compiler to the group. |
protected Process |
createProcess(NbProcessDescriptor desc,
String[] files)
Allows subclasses to provide their own format for parsing the arguments of NbProcessDescriptor contained in the ExternalCompiler. |
protected Process |
createProcess(NbProcessDescriptor desc,
String[] files,
File cwd)
Allows subclasses to provide their own format for parsing the arguments of NbProcessDescriptor contained in the ExternalCompiler. |
protected Process |
createProcess(NbProcessDescriptor desc,
String[] files,
Object compilerType)
Deprecated. Please instead directly override createProcess(NbProcessDescriptor,String[])
as this version does not use the now-deprecated "compiler type" object. |
protected Collection |
filterCompilers(Collection allCompilers)
This implementation filters compilers that have the same hashCode and equals, but they report different up-to-date status. |
protected ExternalCompiler[] |
getAllCompilers()
|
protected String |
getStatusLineText()
Creates human readable String used in status line - should contain information what is compiled - Compiling MyClass.java |
protected void |
notifyError(String file,
int line,
int column,
String message,
String ref)
Notifies (fires) about an error; all parameters are description of the error |
protected void |
parseErrors(ExternalCompiler.ErrorExpression err,
Reader parsedReader)
Parses a compiler errors described by err from parsedReader |
boolean |
start()
Start compilation. |
Methods inherited from class org.openide.compiler.CompilerGroup |
addCompilerListener, fireErrorEvent, fireProgressEvent, removeCompilerListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExternalCompilerGroup()
Method Detail |
public void add(Compiler c) throws IllegalArgumentException
CompilerGroup
This method is important for module authors, as it should keep track of the essential data from the compiler added to it, so that the group knows what files (e.g.) to compile.
add
in class CompilerGroup
org.openide.compiler.CompilerGroup
c
- the compiler to consumeIllegalArgumentException
- if the compiler
does not belong to this group (the group's class is not
assignable to the one returned from Compiler.compilerGroupClass()
)protected Process createProcess(NbProcessDescriptor desc, String[] files, Object compilerType) throws IOException
createProcess(NbProcessDescriptor,String[])
as this version does not use the now-deprecated "compiler type" object.
By default, delegates to the variant that does not take a "compiler type" argument, as this is deprecated usage.
desc
- description of program to startfiles
- the argument to compiler list of files to compile (or reference
to the file with @files)compilerType
- the type of compiler for all this files,
this is the compiler dependent object returned from method
ExternalCompiler.compilerType ()IOException
- if exec failsExternalCompiler.compilerType()
protected Process createProcess(NbProcessDescriptor desc, String[] files) throws IOException
This implementation creates new format Format with settings from NbClassPath.createXXXX and executes them in the provided process descriptor.
desc
- description of program to startfiles
- the argument to compiler list of files to compile (or reference
to the file with @files)IOException
- if exec failsprotected Process createProcess(NbProcessDescriptor desc, String[] files, File cwd) throws IOException
This implementation creates new format Format with settings from NbClassPath.createXXXX and executes them in the provided process descriptor.
desc
- description of program to startfiles
- the argument to compiler list of files to compile (or reference
to the file with @files)cwd
- current working directory. The parameter is taken into account only for JDK 1.3IOException
- if exec failsprotected String getStatusLineText()
protected final ExternalCompiler[] getAllCompilers()
protected Collection filterCompilers(Collection allCompilers)
public boolean start()
CompilerGroup
The compilation should report its progress to status listeners and report all errors to error listeners.
start
in class CompilerGroup
org.openide.compiler.CompilerGroup
true
if successful, false
if the compilation failedprotected void parseErrors(ExternalCompiler.ErrorExpression err, Reader parsedReader)
err
- describes format of errors of the related compilerparsedReader
- the parsed streamprotected void notifyError(String file, int line, int column, String message, String ref)
file
- in which fileline
- on which linecolumn
- on which columnmessage
- ref
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |