Debugger. Data Type Renderers
GoLand allows you to specify how different objects are displayed in the debugger on a class-by-class basis. You can assign the expressions to be displayed rather than rely on the object's String representation.
For example, if an object represents a user, you may want it to be represented by login names; or, for a cache entry object, its content may be appropriate. GoLand refers to these as type renderers.
All object types are supported (including primitive types and arrays).
If no rendering scheme is defined, this dialog does not show any controls. To start working with renderers, click .
The name of the renderer. This name is used for managing renderers and doesn't affect how actual data is displayed.
Apply renderer to objects of type (fully-qualified name)
The object type to which this renderer applies. Enter the fully qualified name of the class or click Browse and choose the desired type from the list.
If the class uses generics, use raw types for them. Due to type erasure, the types inside the diamond operator have no effect in renderers.
When rendering a node
This option determines how an object itself is displayed:
Show type and object id: controls whether class name and instance ID are shown.
Use default renderer: displays the object as it would be displayed without this renderer. This is useful if you want to only customize the way the object's contents are displayed.
Use following expression: lets you use the return value of some expression for displaying the object. All method calls and member variable access are relative to the rendered instance. For example,
this.getName() will use the result of the
getName() getter for displaying the object.
The On-demand option disables automatic evaluation of the expression and only calculates the result when you expressly request so.
When expanding a node
This option determines how the contents of an object are displayed when it is expanded.
Use default renderer: displays the node children as they would be displayed without this renderer. This is useful if you want to only customize the way the object itself is displayed.
Use following expression: lets you use the return value of some expression for displaying the contents of a node, for example,
this.toArray(). The expression has to return an array of primitive or reference types. The elements of the returned array are used to represent the node children.
Test if a node can be expanded (optional): adds an automatic check whether the node representing the object can be expanded. The check uses the specified boolean expression, for example
!this.isEmpty(). The expression is called on the instance, and if it evaluates to
true, the debugger makes the node expandable.
Use list of expressions: allows you to specify multiple expressions each providing its own representation of the object's children. The On-demand option disables their automatic evaluation and only calculates the result when you select a specific expression.
Append default children
Controls whether the fields of the object (that would be normally displayed when no renderer is specified) should appear along with the expression results. This option is only available with Use list of expressions.
Last modified: 31 August 2021