|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CompilerModel
Interface for all compiler functionality in the model. The compilation process itself can be monitored through the CompilerListener interface. The four primary uses of this interface will be to manage listeners, to trigger compilation of (a) document(s), to handle the results, and to manage available compilers.
Field Summary | |
---|---|
static String[] |
EXTENSIONS
Legal source file name extensions |
Method Summary | |
---|---|
void |
addCompiler(CompilerInterface compiler)
Add a compiler to the active list |
void |
addListener(CompilerListener listener)
Add a CompilerListener to the model. |
void |
compile(List<OpenDefinitionsDocument> docs)
Compiles the specified documents which must be saved first. |
void |
compile(OpenDefinitionsDocument doc)
Compiles a single document which must be saved first. |
void |
compileAll()
Compiles all documents, which requires that the documents be saved first. |
void |
compileProject()
Compiles all documents in the project source tree, which requires that the documents be saved first. |
CompilerInterface |
getActiveCompiler()
Gets the compiler that is the "active" compiler. |
Iterable<CompilerInterface> |
getAvailableCompilers()
Returns all registered compilers that are actually available. |
CompilerErrorModel |
getCompilerErrorModel()
Gets the CompilerErrorModel representing the last compile. |
Object |
getCompilerLock()
Returns the lock used to prevent simultaneous compilation and JUnit testing |
int |
getNumErrors()
Gets the total number of current errors. |
void |
removeAllListeners()
Removes all CompilerListeners from this model. |
void |
removeListener(CompilerListener listener)
Remove a CompilerListener from the model. |
void |
resetCompilerErrors()
Resets the compiler error state to have no errors. |
void |
setActiveCompiler(CompilerInterface compiler)
Sets which compiler is the "active" compiler. |
Field Detail |
---|
static final String[] EXTENSIONS
Method Detail |
---|
Object getCompilerLock()
void addListener(CompilerListener listener)
listener
- a listener that reacts to compiler eventsvoid removeListener(CompilerListener listener)
listener
- a listener that reacts to compiler eventsvoid removeAllListeners()
void compileAll() throws IOException
IOException
- if a filesystem-related problem prevents compilationvoid compileProject() throws IOException
IOException
- if a filesystem-related problem prevents compilationvoid compile(List<OpenDefinitionsDocument> docs) throws IOException
docs
- the documents to be compiled
IOException
- if a filesystem-related problem prevents compilationvoid compile(OpenDefinitionsDocument doc) throws IOException
doc
- the document to be compiled
IOException
- if a filesystem-related problem prevents compilationCompilerErrorModel getCompilerErrorModel()
int getNumErrors()
void resetCompilerErrors()
Iterable<CompilerInterface> getAvailableCompilers()
NoCompilerAvailable.ONLY
.
CompilerInterface getActiveCompiler()
setActiveCompiler(edu.rice.cs.drjava.model.compiler.CompilerInterface)
void setActiveCompiler(CompilerInterface compiler)
compiler
- Compiler to set active.
IllegalArgumentException
- If the compiler is not in the list of available compilersgetActiveCompiler()
void addCompiler(CompilerInterface compiler)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |