Modifier and Type | Class and Description |
---|---|
static class |
GenericLinkedView.ArrayStructureType
Class describing an array-wrapper structure.
|
static class |
GenericLinkedView.BinaryTreeStructureType
Class describing a binary tree structure.
|
static class |
GenericLinkedView.HashTableStructureType
Class describing a hash table structure.
|
static interface |
GenericLinkedView.HelpResponder
Interface for responding to help.
|
static class |
GenericLinkedView.ListStructureType
Class describing a list structure.
|
static class |
GenericLinkedView.StructureType
Abstract base class for classes describing actual or potential structure
types for the object being viewed.
|
static class |
GenericLinkedView.StructureTypeOption
Class that encapsulates a potential structure type and confidence level.
|
Constructor and Description |
---|
GenericLinkedView(ViewerCreateData vcd)
Creates a new GenericLinkedView.
|
Modifier and Type | Method and Description |
---|---|
void |
build(ViewerInitData vid,
Element initDataIn)
Builds the viewer non-gui internals.
|
static JComboBox<String> |
createLabelAndCombo(grasp.util.GBLPanel panel,
String label,
String label2,
boolean top)
Adds one or two labels and combo box to a GBLPanel.
|
void |
createModifyButton()
Creates the configure button.
|
void |
destroy()
Called when the viewer is closed or frozen.
|
static List<GenericLinkedView.StructureTypeOption> |
findPossibleStructures(Value value,
DebugContext context,
boolean[] lowPriorityOut)
Gets a list of possible linked structures for a value.
|
jgrasp.viewer.presentation.GenericLinkedView.STHandler |
getHandler(GenericLinkedView.StructureType st)
Gets the STHandler corresponding a specified StructureType.
|
void |
getInfo(ViewerInfo vi)
Retrieves optional information about the viewer, such as a text
description.
|
int |
getPriority(ViewerPriorityData vpd)
Adjusts the priority of this viewer, based on how confident we are that
we can identify the data structure.
|
String |
getViewName()
Gets the display name of the viewer.
|
static String |
memberAccess(Type t,
Member m,
String varName,
DebugContext context)
Gets a member access expression.
|
static void |
setHelpResponder(GenericLinkedView.HelpResponder responder)
Sets the help responder.
|
static String |
toLowerCaseEnglish(String str)
Converts a string to lower case using the ENGLISH locale.
|
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.
|
public GenericLinkedView(ViewerCreateData vcd)
vcd
- creation data.public static JComboBox<String> createLabelAndCombo(grasp.util.GBLPanel panel, String label, String label2, boolean top)
panel
- the GBLPanel.label
- the label text.label2
- text for the second label, or null if there will not be a
second label.top
- if true, add space above the label.public static List<GenericLinkedView.StructureTypeOption> findPossibleStructures(Value value, DebugContext context, boolean[] lowPriorityOut) throws ViewerException
value
- the value of interest.context
- current debugger context.lowPriorityOut
- output parameter. If viewers derived from the
structures found should be given a low priority, true is returned in the
first element. Otherwise, false is returned in the first element. This
parameter will be ignored if it is null.ViewerException
- if an exception is encountered while using jgrdi
methods.public static String memberAccess(Type t, Member m, String varName, DebugContext context)
t
- the type to which the member belongs.m
- the member of interest.varName
- the variable name that will represent the instance. This
may be null if the member is static.context
- the current debugger context.public static void setHelpResponder(GenericLinkedView.HelpResponder responder)
responder
- the new help responder.public static String toLowerCaseEnglish(String str)
str
- the string to be converted.public void build(ViewerInitData vid, Element initDataIn)
public void createModifyButton()
public void destroy()
Viewer
public jgrasp.viewer.presentation.GenericLinkedView.STHandler getHandler(GenericLinkedView.StructureType st)
st
- the StructureType of interest.st
.public void getInfo(ViewerInfo vi)
Viewer
public int getPriority(ViewerPriorityData vpd)
getPriority
in interface Viewer
vpd
- priority data.Integer.MIN_VALUE
indicates that the viewer
dialog or canvas should change viewers.public String getViewName()
Viewer
getViewName
in interface Viewer
public boolean toXML(Document doc, Element e)
public void update(ViewerValueData valueData, ViewerUpdateData data, DebugContext context) throws ViewerException
update
in interface Viewer
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.