frysk.gui.srcwin
Class SourceWindow

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gtk.GtkObject
              extended by org.gnu.gtk.Widget
                  extended by org.gnu.gtk.Container
                      extended by org.gnu.gtk.Bin
                          extended by org.gnu.gtk.Window
                              extended by frysk.gui.srcwin.SourceWindow

public class SourceWindow
extends org.gnu.gtk.Window

The SourceWindow displays the source or assembly level view of a Task's current state of execution. It has the ability to display code that has been inlined as well as optimized out by the compiler. It also provides an interface to allow to user to query for variable values, set traces on variables, and perform other such traditional debugging tasks.


Field Summary
static String CASE_FIND
           
static String CLOSE_FIND
           
static String FILE_SELECTOR
           
static String FILECHOOSER_GLADE
           
static String FIND_BOX
           
static String FIND_LABEL
           
static String FIND_TEXT
           
static String GLADE_FILE
           
static String GLADE_TOOLBAR_NAME
           
static String HIGHLIGHT_FIND
           
static String LINE_ENTRY
           
static String LINE_LABEL
           
static String NEXT_FIND
           
static String PREV_FIND
           
static String PROC_LIST_GLADE
           
static String SOURCE_WINDOW
           
static String TEXT_WINDOW
           
static String VIEW_COMBO_BOX
           
 
Constructor Summary
SourceWindow(org.gnu.glade.LibGlade glade, DebugInfoFrame trace)
          Creates a new source window with the given properties.
SourceWindow(org.gnu.glade.LibGlade glade, DebugInfoFrame[] traces)
          Creates a new source window with the given properties.
SourceWindow(org.gnu.glade.LibGlade glade, Proc proc)
          Creates a new source window with the given properties.
SourceWindow(org.gnu.glade.LibGlade glade, Proc[] procs)
          Creates a new source window with the given properties.
SourceWindow(org.gnu.glade.LibGlade glade, Proc proc, frysk.gui.srcwin.SourceWindowFactory.AttachedObserver ao)
          Creates a new source window with the given properties.
 
Method Summary
 void activateProc()
          activateProc is called when the user has selected an executable from the FileChooserDialog.
 void addVariableTrace(String var)
          Adds the selected variable to the variable trace window
 void appendTask(Proc proc)
           
 DOMFrysk getDOM()
           
 frysk.gui.srcwin.SourceWindow.LockObserver getLockObserver()
           
 CurrentStackView getStackView()
           
 SteppingEngine getSteppingEngine()
           
 Proc getSwProc()
          Getters and Setters
 View getView()
           
 boolean isRunning()
           
 void populateStackBrowser(DebugInfoFrame[][] frames)
          Populates the stack browser window
 void removeDisplay(UpdatingDisplayValue disp)
          Removes the given display from the list of watched expressions
 void removeVariableTrace(String var)
          Removes the given variable from the list of watched variables.
 void setShowToolbar(boolean value)
          Toggles whether the toolbar is visible
 void updateThreads()
           
 
Methods inherited from class org.gnu.gtk.Window
addAccelGroup, deiconify, destroy, fullscreen, getAcceptFocus, getDefaultIconList, getFocusOnMap, getFocusWidget, getGravity, getIcon, getIconList, getIconName, getPosition, getScreen, getSize, getSkipPagerHint, getSkipTaskbarHint, getTitle, getTransientParent, getType, getWindow, hasToplevelFocus, iconify, isActive, isDestroyed, listToplevelWindows, maximize, move, present, removeAccelGroup, resize, setAcceptFocus, setAutoStartupNotification, setDecorated, setDefaultIcon, setDefaultIconFromFile, setDefaultIconList, setDefaultIconName, setDefaultSize, setDefaultWidget, setFocusOnMap, setFocusWidget, setGeometryHints, setGravity, setIcon, setIconFromFile, setIconList, setIconName, setKeepAbove, setKeepBelow, setModal, setPosition, setResizable, setScreen, setSkipPagerHint, setSkipTaskbarHint, setTitle, setTransientParent, stick, unfullscreen, unmaximize, unstick
 
Methods inherited from class org.gnu.gtk.Bin
getChild
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getEventListenerClass, getEventType, getIntChildProperty, getResizeMode, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getAllocation, getCanFocus, getColormap, getContext, getData, getDisplay, getDragData, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getSensitive, getStyle, getToplevel, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setCanFocus, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight
 
Methods inherited from class org.gnu.gtk.GtkObject
sink
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_ENTRY

public static final String LINE_ENTRY
See Also:
Constant Field Values

FIND_TEXT

public static final String FIND_TEXT
See Also:
Constant Field Values

FIND_BOX

public static final String FIND_BOX
See Also:
Constant Field Values

FIND_LABEL

public static final String FIND_LABEL
See Also:
Constant Field Values

LINE_LABEL

public static final String LINE_LABEL
See Also:
Constant Field Values

NEXT_FIND

public static final String NEXT_FIND
See Also:
Constant Field Values

PREV_FIND

public static final String PREV_FIND
See Also:
Constant Field Values

HIGHLIGHT_FIND

public static final String HIGHLIGHT_FIND
See Also:
Constant Field Values

CASE_FIND

public static final String CASE_FIND
See Also:
Constant Field Values

CLOSE_FIND

public static final String CLOSE_FIND
See Also:
Constant Field Values

GLADE_TOOLBAR_NAME

public static final String GLADE_TOOLBAR_NAME
See Also:
Constant Field Values

FILE_SELECTOR

public static final String FILE_SELECTOR
See Also:
Constant Field Values

VIEW_COMBO_BOX

public static final String VIEW_COMBO_BOX
See Also:
Constant Field Values

TEXT_WINDOW

public static final String TEXT_WINDOW
See Also:
Constant Field Values

SOURCE_WINDOW

public static final String SOURCE_WINDOW
See Also:
Constant Field Values

GLADE_FILE

public static final String GLADE_FILE
See Also:
Constant Field Values

FILECHOOSER_GLADE

public static final String FILECHOOSER_GLADE
See Also:
Constant Field Values

PROC_LIST_GLADE

public static final String PROC_LIST_GLADE
See Also:
Constant Field Values
Constructor Detail

SourceWindow

public SourceWindow(org.gnu.glade.LibGlade glade,
                    Proc proc)
Creates a new source window with the given properties. This constructor should not be called explicitly, SourceWindow objects should be created through the SourceWindowFactory class.

Parameters:
glade - The LibGlade object that contains the window for this instance
proc - The Proc to have this SourceWindow observe

SourceWindow

public SourceWindow(org.gnu.glade.LibGlade glade,
                    Proc[] procs)
Creates a new source window with the given properties. This constructor should not be called explicitly, SourceWindow objects should be created through the SourceWindowFactory class.

Parameters:
glade - The LibGlade object that contains the window for this instance
procs - The array of Procs to have this new SourceWindow observes

SourceWindow

public SourceWindow(org.gnu.glade.LibGlade glade,
                    DebugInfoFrame trace)
Creates a new source window with the given properties. This constructor builds a SourceWindow based off of a stack trace, and thus has no usable or running process. This constructor should not be called explicitly, SourceWindow objects should be created through the SourceWindowFactory class.

Parameters:
glade - The LibGlade object that contains the window for this instance
trace - The stack frame that represents the current state of execution

SourceWindow

public SourceWindow(org.gnu.glade.LibGlade glade,
                    DebugInfoFrame[] traces)
Creates a new source window with the given properties. This constructor builds a SourceWindow based off of a stack trace, and thus has no usable or running process. This constructor should not be called explicitly, SourceWindow objects should be created through the SourceWindowFactory class.

Parameters:
glade - The LibGlade object that contains the window for this instance
traces - The stack frames that represents the current state of execution

SourceWindow

public SourceWindow(org.gnu.glade.LibGlade glade,
                    Proc proc,
                    frysk.gui.srcwin.SourceWindowFactory.AttachedObserver ao)
Creates a new source window with the given properties. This constructor should not be called explicitly, SourceWindow objects should be created through the SourceWindowFactory class.

Parameters:
glade - The LibGlade object that contains the window for this instance
proc - The Proc to have this SourceWindow observe
ao - The AttachedObserver currently blocking the given Proc
Method Detail

populateStackBrowser

public void populateStackBrowser(DebugInfoFrame[][] frames)
Populates the stack browser window

Parameters:
frames - An array of DebugInfoFrames used to popuate information inside the stack frame window.

addVariableTrace

public void addVariableTrace(String var)
Adds the selected variable to the variable trace window

Parameters:
var - The variable to trace

removeVariableTrace

public void removeVariableTrace(String var)
Removes the given variable from the list of watched variables. The variable is assumed to come from the current context.

Parameters:
var - The value to remove

removeDisplay

public void removeDisplay(UpdatingDisplayValue disp)
Removes the given display from the list of watched expressions

Parameters:
disp - The display to remove

updateThreads

public void updateThreads()

appendTask

public void appendTask(Proc proc)

getSwProc

public Proc getSwProc()
Getters and Setters


getDOM

public DOMFrysk getDOM()

getView

public View getView()

getStackView

public CurrentStackView getStackView()

isRunning

public boolean isRunning()

getLockObserver

public frysk.gui.srcwin.SourceWindow.LockObserver getLockObserver()

getSteppingEngine

public SteppingEngine getSteppingEngine()

activateProc

public void activateProc()
activateProc is called when the user has selected an executable from the FileChooserDialog. It checks to see if a gnome terminal is to be activated if so the selected process' STDIN/STDOUT/STDERR will be assigned to it.


setShowToolbar

public void setShowToolbar(boolean value)
Toggles whether the toolbar is visible

Parameters:
value - Whether or not to show the toolbar