public interface Viewer
Views must be named using the full type name, followed by an underscore,
followed by alpha-numeric characters ending in "View". For Java, the type
name is encoded as follows:
. -> __
_ -> _U
$ -> _S
[] -> _A
match any type -> _X
so a java.lang.String viewer class would be named
java__lang__String_SomethingView , and a general array viewer would be named
_X_A_SomethingView.
Viewers are multi-threaded, so synchronization is necessary. jgrdi methods must only be used from the debugger thread, and Swing methods should not be called from that thread.
For more info on creating viewers in jGRASP, see the viewer package docs.
Modifier and Type | Method and Description |
---|---|
void |
build(ViewerInitData vid,
Element initDataIn)
Builds the viewer non-gui internals.
|
void |
destroy()
Called when the viewer is closed or frozen.
|
void |
getInfo(ViewerInfo vi)
Retrieves optional information about the viewer, such as a text
description.
|
int |
getPriority(ViewerPriorityData vpd)
Gets the viewer priority.
|
String |
getViewName()
Gets the display name of the viewer.
|
boolean |
toXML(Document doc,
Element e)
Stores the state of the viewer in an XML dom element.
|
void |
update(ViewerValueData valueData,
ViewerUpdateData data,
DebugContext context)
Updates the viewer.
|
void build(ViewerInitData vid, Element initDataIn)
vid
- initialization and control element for the viewer.initDataIn
- XML initialization data for the viewer.void destroy()
void getInfo(ViewerInfo vi)
vi
- object which holds the retrieved information.int getPriority(ViewerPriorityData vpd)
vpd
- data about how the viewer will be used.Integer.MIN_VALUE
indicates that the viewer
dialog or canvas should change viewers.String getViewName()
boolean toXML(Document doc, Element e)
doc
- the document to which the element applies.e
- the element to be populated.void update(ViewerValueData valueData, ViewerUpdateData data, DebugContext context) throws ViewerException
valueData
- the new value and associated information, such as
declared type. This will be null for animation updates.data
- information about this update, such as why it was triggered,
and if it was triggered by a flagged method entry, the method argument
values.context
- debugger context that is necessary for working with
values, and provides some global debugger access. This will be null for
animation updates.ViewerException
- if an exception is encountered.