|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JEditorPane
edu.rice.cs.drjava.ui.ErrorPanel.ErrorListPane
public abstract class ErrorPanel.ErrorListPane
Pane to show compiler errors. Similar to a listbox (clicking selects an item) but items can each wrap, etc.
| Nested Class Summary | |
|---|---|
private class |
ErrorPanel.ErrorListPane.BackgroundColorListener
The OptionListener for compiler DEFINITIONS_BACKGROUND_COLOR. |
private class |
ErrorPanel.ErrorListPane.CompilerErrorColorOptionListener
The OptionListener for compiler COMPILER_ERROR_COLOR |
private class |
ErrorPanel.ErrorListPane.ForegroundColorListener
The OptionListener for compiler DEFINITIONS_NORMAL_COLOR |
| Nested classes/interfaces inherited from class javax.swing.JEditorPane |
|---|
JEditorPane.AccessibleJEditorPane, JEditorPane.AccessibleJEditorPaneHTML, JEditorPane.JEditorPaneAccessibleHypertextSupport |
| Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
|---|
JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected Position[] |
_errorListPositions
The start position of each error in the list. |
protected HashMap<Position,DJError> |
_errorTable
Table mapping Positions in the error list to CompilerErrors. |
private HighlightManager |
_highlightManager
|
protected Keymap |
_keymap
The custom keymap for the error list pane. |
private HighlightManager.HighlightInfo |
_listHighlightTag
|
private int |
_selectedIndex
Index into _errorListPositions of the currently selected error. |
(package private) Action |
copyAction
Default copy action. |
(package private) Action |
cutAction
Default cut action. |
protected MouseAdapter |
defaultMouseListener
|
(package private) Action |
pasteAction
No-op paste action. |
| Fields inherited from class javax.swing.JEditorPane |
|---|
HONOR_DISPLAY_PROPERTIES, W3C_LENGTH_UNITS |
| Fields inherited from class javax.swing.text.JTextComponent |
|---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ErrorPanel.ErrorListPane()
Constructs the CompilerErrorListPane. |
|
| Method Summary | |
|---|---|
protected DJError |
_errorAtPoint(Point p)
Returns DJError associated with the given visual coordinates. |
protected String |
_getErrorText()
Returns the string to identify an error. |
protected String |
_getErrorTitle()
Gets the message to title the block containing only errors. |
private int |
_getIndexForError(DJError error)
Returns the index into _errorListPositions corresponding to the given DJError. |
protected String |
_getNumErrorsMessage(String failureName,
String failureMeaning)
Gets the message indicating the number of errors and warnings. |
protected String |
_getWarningText()
Returns the string to identify a warning. |
protected String |
_getWarningTitle()
Gets the message to title the block containing only warnings. |
protected void |
_insertErrors(ErrorPanel.ErrorDocument doc)
Inserts all of the errors into the given document. |
protected void |
_insertErrorText(DJError error,
ErrorPanel.ErrorDocument doc)
Prints a message for the given error |
protected boolean |
_isEmptySelection()
Returns true if the text selection interval is empty. |
protected void |
_removeListHighlight()
When the selection of the current error changes, remove the highlight in the error pane. |
protected abstract void |
_updateNoErrors(boolean done)
|
protected void |
_updateScrollButtons()
|
protected abstract void |
_updateWithErrors()
|
protected void |
_updateWithErrors(String failureName,
String failureMeaning,
ErrorPanel.ErrorDocument doc)
Used to show that the last compile was unsuccessful. |
void |
addActionForKeyStroke(Vector<KeyStroke> stroke,
Action action)
Assigns the given keystroke to the given action in this pane. |
ErrorPanel.ErrorDocument |
getErrorDocument()
Gets the ErrorDocument associated with this ErrorListPane. |
String |
getErrorDocumentTitle()
|
int |
getSelectedIndex()
Get the index of the current error in the error array. |
boolean |
hasNextError()
Returns true if there is an error after the selected error. |
boolean |
hasPrevError()
Returns true if there is an error before the selected error. |
void |
lostOwnership(Clipboard clipboard,
Transferable contents)
We lost ownership of what we put in the clipboard. |
void |
nextError()
Switches to the next error. |
void |
prevError()
Switches to the previous error. |
void |
selectItem(DJError error)
Selects the given error inside the error list pane. |
void |
selectNothing()
Don't select any errors in the error pane. |
boolean |
shouldShowHighlightsInSource()
Returns true if the errors should be highlighted in the source |
(package private) void |
switchToError(DJError error)
Change all state to select a new error, including moving the caret to the error, if a corresponding position exists. |
(package private) void |
switchToError(int index)
Another interface to switchToError. |
protected void |
updateListPane(boolean done)
Update the pane which holds the list of errors for the viewer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected volatile Keymap _keymap
private volatile int _selectedIndex
protected volatile Position[] _errorListPositions
protected final HashMap<Position,DJError> _errorTable
private volatile HighlightManager.HighlightInfo _listHighlightTag
private volatile HighlightManager _highlightManager
volatile Action cutAction
volatile Action copyAction
volatile Action pasteAction
protected MouseAdapter defaultMouseListener
| Constructor Detail |
|---|
public ErrorPanel.ErrorListPane()
| Method Detail |
|---|
public ErrorPanel.ErrorDocument getErrorDocument()
public void addActionForKeyStroke(Vector<KeyStroke> stroke,
Action action)
stroke - keystroke that triggers the actionaction - Action to perform
public void lostOwnership(Clipboard clipboard,
Transferable contents)
lostOwnership in interface ClipboardOwnerpublic boolean shouldShowHighlightsInSource()
public int getSelectedIndex()
protected DJError _errorAtPoint(Point p)
private int _getIndexForError(DJError error)
protected boolean _isEmptySelection()
protected void updateListPane(boolean done)
protected abstract void _updateNoErrors(boolean done)
throws BadLocationException
BadLocationException
protected abstract void _updateWithErrors()
throws BadLocationException
BadLocationException
protected String _getNumErrorsMessage(String failureName,
String failureMeaning)
protected String _getErrorTitle()
protected String _getWarningTitle()
protected void _updateWithErrors(String failureName,
String failureMeaning,
ErrorPanel.ErrorDocument doc)
throws BadLocationException
BadLocationExceptionpublic boolean hasNextError()
public boolean hasPrevError()
public void nextError()
public void prevError()
protected void _insertErrors(ErrorPanel.ErrorDocument doc)
throws BadLocationException
doc - the document into which to insert the errors
BadLocationException
protected void _insertErrorText(DJError error,
ErrorPanel.ErrorDocument doc)
throws BadLocationException
error - the error to printdoc - the document in the error pane
BadLocationExceptionprotected String _getWarningText()
protected String _getErrorText()
protected void _removeListHighlight()
public void selectNothing()
public void selectItem(DJError error)
protected void _updateScrollButtons()
void switchToError(DJError error)
error - The error to switch tovoid switchToError(int index)
index - Index into the array of positions in the CompilerErrorListPanepublic String getErrorDocumentTitle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||