|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.et.gui.AbstractSourceCodeViewer
abstract class AbstractSourceCodeViewer
An abstract class that turns an editor into a source code viewer. A source code viewer can to hightlight the source code line corresponding to an error message.
| Field Summary | |
|---|---|
protected ActionFactory |
actionFactory
The action factory to store unsaved edits if any. |
protected Editor |
editor
The editor to be used as a source code viewer. |
| Constructor Summary | |
|---|---|
AbstractSourceCodeViewer(ActionFactory af,
Editor editor)
Creates a source code viewer that uses the given action factory and the editor. |
|
| Method Summary | |
|---|---|
Action |
getPasteAction()
Returns a paste action that should be enabled when a copy action is performed. |
void |
highlight(String file,
int line)
Highlights the given line of the given file, if necessary, by first bringing in the file into the source code viewer. |
void |
highlight(String file,
int line,
int column)
Highlights the given line and column of the given file, if necessary, by first bringing in the file into the source code viewer. |
protected abstract File |
locateFile(String fileName)
Locates the file whose name is given as the argument. |
private boolean |
openFile(String fileName)
Opens the given file using the editor given to the constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ActionFactory actionFactory
protected Editor editor
| Constructor Detail |
|---|
public AbstractSourceCodeViewer(ActionFactory af,
Editor editor)
| Method Detail |
|---|
public Action getPasteAction()
getPasteAction in interface SourceCodeViewer
public void highlight(String file,
int line,
int column)
T.java and ../T.java) identified from
the error messages of external tools such as javac
and jmlc.
highlight in interface SourceCodeViewer
public void highlight(String file,
int line)
T.java and
../T.java) identified from the error messages of
external tools such as javac and
jmlc.
highlight in interface SourceCodeViewerprotected abstract File locateFile(String fileName)
private boolean openFile(String fileName)
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||