A tree describing the module hierarchy of the model being debugged.
The ProbeManager responsible for tracking and reading probes attached to the model being debugged.
Subscribe the tiler to frame
and add the frame to the desktop.
Subscribe the tiler to frame
and add the frame to the desktop.
Builds a cogdebugger.ui.DesktopFrame with the given title
to host
the given viewer
and adds it to the desktop.
Builds a cogdebugger.ui.DesktopFrame with the given title
to host
the given viewer
and adds it to the desktop. If the viewer is an
EventDrivenViewer, this method will create a cogdebugger.Probe to
drive it and subscribe the viewer to the probe before making the frame
visible.
All frames created by this method are listened to by the cogdebugger.coggui3ports.Tiler. As soon as they pack themselves, the Tiler will attempt to position them such they don't overlap any existing panels (note that this position is immediately overriden by restoreFrame if the viewer was added as part of the Desktop's restore process).
Title for the desktop frame that will be shown
The viewer to be installed in a frame and shown on the desktop
The ProbedField the viewer is visualizing
Constructs a Viewer for the target field, installs it in a frame, and adds that frame to the desktop.
All the InternalFrames currently on the desktp.
All the InternalFrames currently on the desktp.
Restores the state of the desktop to that described in the given xml
node savedState
.
Restores the state of the desktop to that described in the given xml
node savedState
. It's expected that savedState
describes the sizes,
positions, and viewers installed in any frames left open on the desktop
the last time the debugger was shut down. This method will recreate those
windows with the same sizes, positions, and installed viewers.
Note that any exception encountered while attempting to restore the desktop will immediately abort the remainder of the operation. Any visualizations that were successfully restored prior to the exception will remain, but everything else is simply dropped.
See cogdebugger.ui.Desktop#save for the expected format of the xml.
Attempts to restore an individual frame as described in an XML node.
Attempts to restore an individual frame as described in an XML node.
The XML node contains the long name of the field that was being
visualized. If the field still exists in the current compute graph (it
may have been removed or renamed in between debugger sessions), a
Viewer implementation is instantiated based on the class name saved in
the XML tag. If the Viewer implements cogdebugger.RestorableState,
it's handed the visualization
subtree/tag of the XML and can attempt to
restore its own saved state (see java.awt.Desktop#save for an example
of the XML). Lastly, the frame is sized and positioned according to the
details saved in the XML.
Produces an XML element describing the state of the Desktop, with the intent that this tag will be saved to disk and later used during the startup of a subsequent debugger session to arrange any open visualizations just as the user had left them.
Produces an XML element describing the state of the Desktop, with the intent that this tag will be saved to disk and later used during the startup of a subsequent debugger session to arrange any open visualizations just as the user had left them.
The desktop itself cannot save much information aside from which fields
are being visualized and the sizes and postitions of thier visualizations
on the desktop, as the inner details of any given viewer are unknown to
the desktop. Thus, individual Viewer implementations must also be able to
save to (and restore from) XML details about their internal state if
the user's debugger environment is to actually remain consistent across
runs. Each Viewer that implements cogdebugger.RestorableState will
have its own save
function called and its tag nested within Desktop's.
The viewer's tag will be used as an argument to its restore
method the
next time the debugger is launched (for the same app).
The tag produced by this function appears thusly:
<Desktop>
<frame>
<layout>
<size width=... height=.../>
<position x=... y=.../>
</layout>
<probes>
<probe>#Name of field being probed#</probe>
...
</probes>
<visualization>
<viewerclass class=.../>
#Installed viewer's XML tag goes here#
</visualization>
</frame>
...
</Desktop>
A desktop that hosts windows/frames that in turn host visualizations for fields.
The Desktop reacts to cogdebugger.ui.structure.InteractiveGraphEvents (produced by one of the classes in cogdebugger.ui.structure) that indicate that a user is interested in some field. Please remember to actually subscribe this class to an event source! In response to an event, a window is launched on the Desktop that contains some manner of visualization of the data within the field. Windows can be resized, repositioned, and closed by users.
If requested, the Desktop can encode the state of any open visualizations (size, position, installed Viewer implementation) into an XML tag. If peristed to disk, this tag can then later be used to restore the state of the Desktop in a subsequent debugger session.