IntelliJ IDEA 2016.3 Help

Java Type Renderers

File | Settings | Build, Execution, Deployment | Debugger | Data Views | Java Type Renderes for Windows and Linux
IntelliJ IDEA | Preferences | Build, Execution, Deployment | Debugger | Data Views | Java Type Renderes for OS X
Ctrl+Alt+S
/help/img/idea/2016.3/settings.png


IntelliJ IDEA 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 to see users represented by their login name; or, for a cache entry object, its content may be appropriate. IntelliJ IDEA refers to these as type renderers.

Besides objects, all the other 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 /help/img/idea/2016.3/new.png.

ItemDescription
/help/img/idea/2016.3/new.pngUse this icon to add a new rendering scheme to the list.
/help/img/idea/2016.3/delete.pngUse this icon to remove the selected scheme from the list.
/help/img/idea/2016.3/copy.gifUse this icon to create a copy of the selected scheme.
/help/img/idea/2016.3/arrowUp.png/help/img/idea/2016.3/arrowDown.pngUse these icons to move the selected item one line up or down in the list.

Note that the order of items in the list determines which renderer is used in the case of ambiguity stemming of class inheritance.

Renderer nameIn this field, specify the name of a new renderer, or edit an existing renderer name.
Apply renderer to objects of type (fully-qualified name)In this field, specify the type of objects that will be represented with this renderer. Type a fully qualified object name, or click the Browse button /help/img/idea/2016.3/browseButton.png and choose the desired type from the list in the Renderer Reference Type dialog.
When rendering a nodeThis option determines how an object is displayed in the debugger when nodes are collapsed:
  • Show type and object id: if this check box is cleared, then the types are shown without class information and id.
  • Use default renderer: select this option to display the node in the default way.
  • Use following expression: enter the Java expression you want to use to identify an object. You can use object properties, constants, and even a string math as part of your renderer.

    Note that you can use code completion (Ctrl+Space) when defining expressions.

    All method calls and member variable access are relative to the object you're rendering. Use this to refer to an instance to which the renderer applies.

When expanding a nodeThis option determines how an object is displayed in the debugger when nodes are expanded.

Normally, expanding a node in the debugger lists the object's member variables (using the renderer appropriate for the corresponding object types). This option lets you override this behavior and select a single expression or a series of expressions to be displayed. You may use this to limit the amount of information displayed, or to be more precise in how the information is presented.

  • Use default renderer: select this option to display the node children in the default way.
  • Use following expression: enter the Java expression you want to use to identify an object.

    Test if a node can be expanded (optional): enter a Boolean expression. If it is true, the renderer displays expandable nodes for the defined objects. Otherwise, no nodes are displayed.

  • Use list of expressions: create a list of separate expressions to be calculated and presented as node children. Use:

    /help/img/idea/2016.3/new.png (Alt+Insert) to create a new expression.

    /help/img/idea/2016.3/delete.png (Alt+Delete) to remove the selected expression from the list.

    /help/img/idea/2016.3/arrowUp.png (Alt+Up) to move the selected expression one line up in the list.

    /help/img/idea/2016.3/arrowDown.png (Alt+Down) to move the selected expression one line down in the list.

Note that you can use code completion (Ctrl+Space) when defining expressions.

Append default childrenSelect this check box to add default children to the list of expressions. This check box is only available when the check box Use list of expressions is selected.

See Also

Last modified: 7 December 2016