edu.rice.cs.drjava.ui
Class CompilerErrorCaretListener
java.lang.Object
|
+--edu.rice.cs.drjava.ui.CompilerErrorCaretListener
- All Implemented Interfaces:
- CaretListener, EventListener
- public class CompilerErrorCaretListener
- extends Object
- implements CaretListener
Listens to the caret in a particular DefinitionsPane and
highlights the source containing CompilerErrors as appropriate.
- Version:
- $Id: CompilerErrorCaretListener.java,v 1.6 2002/08/15 23:03:58 jhsia Exp $
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
_openDoc
private final OpenDefinitionsDocument _openDoc
_errorListPane
private final CompilerErrorPanel.ErrorListPane _errorListPane
_definitionsPane
private final DefinitionsPane _definitionsPane
_document
private final Document _document
_model
private CompilerErrorModel _model
_positions
private Position[] _positions
CompilerErrorCaretListener
public CompilerErrorCaretListener(OpenDefinitionsDocument doc,
CompilerErrorPanel.ErrorListPane errorListPane,
DefinitionsPane defPane)
- Constructs a new caret listener to highlight compiler errors.
getOpenDefDoc
public OpenDefinitionsDocument getOpenDefDoc()
- Gets the OpenDefinitionsDocument corresponding to this listener.
resetErrorModel
public void resetErrorModel()
- Resets the CompilerErrorModel after a new compile.
caretUpdate
public void caretUpdate(CaretEvent evt)
- After each update to the caret, determine if changes in
highlighting need to be made.
- Specified by:
caretUpdate
in interface CaretListener
updateHighlight
public void updateHighlight(int curPos)
- Update the highlight appropriately.
_highlightErrorInSource
private void _highlightErrorInSource(int newIndex)
- Highlights the given error in the source.
- Parameters:
newIndex
- Index into _errors array