IntelliJ IDEA 2023.3 Help

Class diagram toolbar, context menu, and legend

For more information about using the UML class diagram, refer to UML class diagrams.

Toolbar

Item

Description

Fields

Click this button to show fields in the class nodes.

Constructors

Click this button to show constructors in the class nodes.

Methods

Click this button to show methods in the class nodes.

property

Click this button to show properties in the class nodes.

inner class

Click this button to show inner classes in the class nodes.

visibility level

Click this button to reveal the combo box, and select visibility level of the elements to be displayed in a diagram.

scope

Click this button to reveal the combo box, and select the desired scope of elements to be displayed in diagram, for example, project or non-project files. The elements out of the selected scope will be hidden.

the Edge Creation mode button

Click this button to enable creating extends or implements links between node elements. If this button is not pressed, links cannot be drawn.

show dependencies

Click this button to show dependencies of the selected class or package.

Change Item Ordering

Click this icon to configure the sorting order in the displayed diagram.

Zoom In

Click this button to increase the scale of the diagram, or press NumPad+.

Zoom Out

Click this button to decrease the scale of the diagram, or press NumPad-.

Actual Size

Click this button to restore the actual size of the diagram.

Fit Content

Click this button to make the contents fit into the current diagram size.

Apply Current Layout

Click this button to apply the current layout, selected from the context menu of the diagram, or press F5.

Route Edges

Click this icon to scale the diagram to the edges of the window.

Copy Diagram to Clipboard

Click this icon to copy the diagram into the clipboard.

Copy Selection to Clipboard

Click this icon and then select any diagram area with the mouse: the selected area will be copied into the clipboard.

Export Diagram

Click this icon to export a diagram using various formats, which are compatible with third-party tools, to a file, to an image, or open the diagram in the browser.

Export Diagram

You can select and configure the following options:

  • Open in Web Editor: click this button to select a third-party editor to which you can export the diagram.

  • Copy Diagram to Clipboard: click this button to save the diagram to a clipboard using one of the available formats.

  • Save diagram: click this button to save the current diagram as a file. You can use one of the available formats from the list.

  • Save image: click this button to save the current diagram in the PNG format.

  • Print: click this button to print the diagram.

Refresh Data Model

Click this button to refresh the whole diagram.

Open Diagram Settings

Click this button to open the Diagram settings where you can configure additional options.

This section describes only those context menu commands that are not available from the toolbar.

Item

Description

Selected Element Actions

Use this option to open a list of actions that is applied to a selected element in the diagram. You can select actions to copy an element, jump to its source, find its usages, use the Navigate actions, various Git actions, and so on.

Content

Use this option to open a list of actions that help you to add new elements, show dependencies, sort elements inside the diagram, and so on.

  • Add class to diagram (Space):

    Choose this command to add existing class to the diagram background.

  • New (Alt+Insert):

    Choose this command to create a new node element or member.

  • Show Categories: Choose this command to show the selected code element in the class nodes. For example, you can select Fields to see all the field elements in the classes.

    Fields in Classes

Show Implementations (Ctrl+Alt+B)

Choose this command to display implementations of the selected class.

Implementations

Show Parents (Ctrl+Alt+P)

Choose this command to display parent classes for the selected class.

Parent Classes

Collapse nodes (C)

Choose this command to show the containing package of the selected node.

Expand nodes (E)

Choose this command to show class diagram of the selected package.

Refactor

Point to this node to select one of the refactoring commands available in this context.

Analyze Graph

Use this node to select one of the commands to analyze a diagram. You can check the graph characteristics, change the focus of the graph, measure graph centrality, and so on.

Analyze

Point to this node to select one of the code analysis commands available in this context.

Actual Size

Use this option to restore the actual size of the diagram.

Fit Content

Use this option to fit the content into the current diagram size.

Layout

Use this option to select the desired diagram layout from the submenu.

Route Edges

Select this action to center the diagram in the editor.

Orientation

Use this command to select the following orientation options: Bottom to Top, Top to Bottom, and so on.

Apply Current Layout

Use this option to apply the current layout, selected from the Layout node of the diagram context menu

Show Edge Labels

Check this command to show multiplicities in diagram.

Appearance

Use this option to manage the way the diagram is presented by showing the grid, edge labels, bridges. This option also allows you to merge edges and select edge shapes.

Behavior

Use this option to select commands related to the diagram behavior sucha as aligning elements against the grid, showing structure view for the selected node, or fitting the content after the layout.

Legend of the Class Diagram

IntelliJ IDEA follows the UML conventions in showing relationships between the classes.

Diagram editor

Besides that, IntelliJ IDEA supports the following colors and arrows:

Item

Description

implements

The green arrow corresponds to the implements clause in a class declaration.

extends

The blue arrow corresponds to the extends clause in a class declaration.

inner class

This sign appears for the inner classes.

Last modified: 15 March 2024