View the Source Code in the Diagram View

The diagram view differs from the diagram editor in that the diagram view is mainly a navigation tool. It is extremely handy to have a visualization of the code next to the actual code. It is not meant for extensive diagram editing.

Right-click on the package name in the package editor to open the context menu and select 'Open in Diagram View'.

The source code remains open in the Java Editor, and you may edit the code as you like. The diagram automatically opens in the Diagram View.

From the Diagram View, you can easily select a class and move to the Java code for that class. Right-click the class to open the context menu and select 'Navigate -> Java Source'.

The class opens in the Java Source Editor.

Linking Views and Editors

Views and editors may be linked so that a selection in an editor or view automatically selects the corresponding selection in the linked editor or view.

The link button in the Navigators and Explorers connects the Navigator or Explorer to the Editor. Any item selected in the Editor will be selected by the Navigator, and any item selected in the Navigator will be selected in the Editor.

The link button in the Diagram View also synchronizes the selection between the Diagram View and the Editor. A selection in either will be automatically reflected in the other.

In the following example, all three panes have been synchronized by activating both link buttons.