|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.model.AbstractGlobalModel.ConcreteOpenDefDoc
edu.rice.cs.drjava.model.DefaultGlobalModel.ConcreteOpenDefDoc
class DefaultGlobalModel.ConcreteOpenDefDoc
Inner class to handle operations on each of the open DefinitionsDocuments by the GlobalModel.
This was at one time called the DefinitionsDocumentHandler
but was renamed (2004-Jun-8) to be more descriptive/intuitive.
| Field Summary | |
|---|---|
private InteractionsListener |
_runMain
|
| Fields inherited from class edu.rice.cs.drjava.model.AbstractGlobalModel.ConcreteOpenDefDoc |
|---|
_browserRegions, _caretPosition, _lexiName, _packageName |
| Fields inherited from interface javax.swing.text.Document |
|---|
StreamDescriptionProperty, TitleProperty |
| Constructor Summary | |
|---|---|
DefaultGlobalModel.ConcreteOpenDefDoc(java.io.File f)
Standard constructor for a document read from a file. |
|
DefaultGlobalModel.ConcreteOpenDefDoc(NullFile f)
|
|
| Method Summary | |
|---|---|
protected void |
_runInInteractions(java.lang.String command,
java.lang.String qualifiedClassName)
Runs the main method in this document in the interactions pane after resetting interactions with the source root for this document as the working directory. |
void |
generateJavadoc(FileSaveSelector saver)
Generates Javadoc for this document, saving the output to a temporary directory. |
void |
removeFromDebugger()
Called to indicate the document is being closed, so to remove all related state from the debug manager. |
void |
runApplet(java.lang.String qualifiedClassName)
Runs this document as applet in the interactions pane after resetting interactions with the source root for this document as the working directory. |
void |
runMain(java.lang.String qualifiedClassName)
Runs the main method in this document in the interactions pane after resetting interactions with the source root for this document as the working directory. |
void |
runSmart(java.lang.String qualifiedClassName)
Runs this document, and tries to be smart about it. |
void |
startCompile()
Starting compiling this document. |
void |
startJUnit()
Runs JUnit on the current document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private volatile InteractionsListener _runMain
| Constructor Detail |
|---|
DefaultGlobalModel.ConcreteOpenDefDoc(java.io.File f)
f - file describing DefinitionsDocument to manageDefaultGlobalModel.ConcreteOpenDefDoc(NullFile f)
| Method Detail |
|---|
public void startCompile()
throws java.io.IOException
startCompile in interface OpenDefinitionsDocumentstartCompile in class AbstractGlobalModel.ConcreteOpenDefDocjava.io.IOException - if a file with errors cannot be opened
protected void _runInInteractions(java.lang.String command,
java.lang.String qualifiedClassName)
throws ClassNameNotFoundException,
java.io.IOException
MessageFormat. That means that certain characters,
single quotes and curly braces, for example, are special. To write single quotes, you need to double them.
To write curly braces, you need to enclose them in single quotes. Example:
MessageFormat.format("Abc {0} ''foo'' '{'something'}'", "def") returns "Abc def 'foo' {something}".
command - the command to run, with {0} indicating the place where the class name will be writtenqualifiedClassName - the qualified name of the class (in this document) to run. If NULL, it is the name
of the top level class.
ClassNameNotFoundException - propagated from getFirstTopLevelClass()
java.io.IOException - propagated from GlobalModel.compileAll()
public void runMain(java.lang.String qualifiedClassName)
throws ClassNameNotFoundException,
java.io.IOException
runMain in interface OpenDefinitionsDocumentrunMain in class AbstractGlobalModel.ConcreteOpenDefDocqualifiedClassName - the qualified name of the class (in this document) to run. If NULL, it is the name
of the top level class.
ClassNameNotFoundException - propagated from getFirstTopLevelClass()
java.io.IOException - propagated from GlobalModel.compileAll()
public void runApplet(java.lang.String qualifiedClassName)
throws ClassNameNotFoundException,
java.io.IOException
runApplet in interface OpenDefinitionsDocumentrunApplet in class AbstractGlobalModel.ConcreteOpenDefDocqualifiedClassName - the qualified name of the class (in this document) to run. If NULL, it is the name
of the top level class.
ClassNameNotFoundException - propagated from getFirstTopLevelClass()
java.io.IOException - propagated from GlobalModel.compileAll()
public void runSmart(java.lang.String qualifiedClassName)
throws ClassNameNotFoundException,
java.io.IOException
runSmart in interface OpenDefinitionsDocumentrunSmart in class AbstractGlobalModel.ConcreteOpenDefDocqualifiedClassName - the qualified name of the class (in this document) to run. If NULL, it is the name
of the top level class.
ClassNameNotFoundException - propagated from getFirstTopLevelClass()
java.io.IOException - propagated from GlobalModel.compileAll()
public void startJUnit()
throws java.lang.ClassNotFoundException,
java.io.IOException
startJUnit in interface OpenDefinitionsDocumentstartJUnit in class AbstractGlobalModel.ConcreteOpenDefDocjava.lang.ClassNotFoundException - when the class is compiled to a location not on the classpath.
java.io.IOException - if a file with errors cannot be opened
public void generateJavadoc(FileSaveSelector saver)
throws java.io.IOException
generateJavadoc in interface OpenDefinitionsDocumentgenerateJavadoc in class AbstractGlobalModel.ConcreteOpenDefDocsaver - FileSaveSelector for saving the file if it needs to be saved
java.io.IOExceptionpublic void removeFromDebugger()
removeFromDebugger in interface OpenDefinitionsDocumentremoveFromDebugger in class AbstractGlobalModel.ConcreteOpenDefDoc
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||