Class 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.ListSelectionListener
    Represents the stack trace of the throwable, thrw currently selected in the error list. The representation consists in the string representation thrwMessager and in the stack trace given by stacktrace.

    This class is also a ListSelectionListener which opens emacsclient with 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.ListSelectionModel stackElemSelection
      The selection of this stack trace: This is either empty (which is mandatory for empty thrwMessager) or selects a single stack element.
      private javax.swing.DefaultListModel<java.lang.String> stacktrace
      Is either empty or contains the stacktrace of the represented throwable thrw.
      private java.lang.Throwable thrw
      Represents a throwable or is null if no throwable is represented.
      private javax.swing.JLabel thrwMessager
      Is empty iff thrw is null and contains the string representation of the represented throwable thrw.
    • 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) void clearStack()
      Clears the represented stack including thrw and text.
      (package private) java.awt.Component getStackTraceBox()
      Returns a graphical representation of this StackTraceLister.
      (package private) void setStack​(java.lang.Throwable thrw)
      Represents the throwable thrw if this is not null; otherwise just clears this stack trace lister as is done by clearStack().
      void valueChanged​(javax.swing.event.ListSelectionEvent lse)
      If an entry is selected, move with emacs to the according place.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • thrw

        private java.lang.Throwable thrw
        Represents a throwable or is null if no throwable is represented. This is also the initial value.
      • thrwMessager

        private final javax.swing.JLabel thrwMessager
        Is empty iff thrw is null and contains the string representation of the represented throwable thrw.
      • stacktrace

        private final javax.swing.DefaultListModel<java.lang.String> stacktrace
        Is either empty or contains the stacktrace of the represented throwable thrw.
      • stackElemSelection

        private final javax.swing.ListSelectionModel stackElemSelection
        The selection of this stack trace: This is either empty (which is mandatory for empty thrwMessager) or selects a single stack element. If so, by selection emacsclient is started at the place the stack element points to.
    • Constructor Detail

      • StackTraceLister

        StackTraceLister()
        Creates a new StackTraceLister with empty throwable.
    • Method Detail

      • getStackTraceBox

        java.awt.Component getStackTraceBox()
        Returns a graphical representation of this StackTraceLister.
      • clearStack

        void clearStack()
        Clears the represented stack including thrw and text.
      • setStack

        void setStack​(java.lang.Throwable thrw)
        Represents the throwable thrw if this is not null; otherwise just clears this stack trace lister as is done by clearStack(). 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:
        valueChanged in interface javax.swing.event.ListSelectionListener