Package eu.simuline.testhelpers
Class GUIRunner.StackTraceLister
- java.lang.Object
-
- eu.simuline.testhelpers.GUIRunner.StackTraceLister
-
- All Implemented Interfaces:
java.util.EventListener,javax.swing.event.ListSelectionListener
- Enclosing class:
- GUIRunner
static class GUIRunner.StackTraceLister extends java.lang.Object implements javax.swing.event.ListSelectionListenerRepresents the stack trace of the throwable,thrwcurrently selected in the error list. The representation consists in the string representationthrwMessagerand in the stack trace given bystacktrace.This class is also a
ListSelectionListenerwhich opensemacsclientwith the source file and the line number given by the selected stack trace element.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.ListSelectionModelstackElemSelectionThe selection of this stack trace: This is either empty (which is mandatory for emptythrwMessager) or selects a single stack element.private javax.swing.DefaultListModel<java.lang.String>stacktraceIs either empty or contains the stacktrace of the represented throwablethrw.private java.lang.ThrowablethrwRepresents a throwable or isnullif no throwable is represented.private javax.swing.JLabelthrwMessager
-
Constructor Summary
Constructors Constructor Description StackTraceLister()Creates a new StackTraceLister with empty throwable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidclearStack()Clears the represented stack includingthrwand text.(package private) java.awt.ComponentgetStackTraceBox()Returns a graphical representation of this StackTraceLister.(package private) voidsetStack(java.lang.Throwable thrw)Represents the throwablethrwif this is notnull; otherwise just clears this stack trace lister as is done byclearStack().voidvalueChanged(javax.swing.event.ListSelectionEvent lse)If an entry is selected, move with emacs to the according place.
-
-
-
Field Detail
-
thrw
private java.lang.Throwable thrw
Represents a throwable or isnullif no throwable is represented. This is also the initial value.
-
thrwMessager
private final javax.swing.JLabel thrwMessager
-
stacktrace
private final javax.swing.DefaultListModel<java.lang.String> stacktrace
Is either empty or contains the stacktrace of the represented throwablethrw.
-
stackElemSelection
private final javax.swing.ListSelectionModel stackElemSelection
The selection of this stack trace: This is either empty (which is mandatory for emptythrwMessager) or selects a single stack element. If so, by selectionemacsclientis started at the place the stack element points to.
-
-
Method Detail
-
getStackTraceBox
java.awt.Component getStackTraceBox()
Returns a graphical representation of this StackTraceLister.
-
clearStack
void clearStack()
Clears the represented stack includingthrwand text.
-
setStack
void setStack(java.lang.Throwable thrw)
Represents the throwablethrwif this is notnull; otherwise just clears this stack trace lister as is done byclearStack(). The selection is cleared anyway.
-
valueChanged
public void valueChanged(javax.swing.event.ListSelectionEvent lse)
If an entry is selected, move with emacs to the according place.- Specified by:
valueChangedin interfacejavax.swing.event.ListSelectionListener
-
-