Sam's Blog

07 Jan

GraphViz viewer for NetBeans

Today I’m releasing a small utility for quickly viewing GraphViz (DOT) files which I’ve used many times over the past year. The project source is hosted on GitHub.

Block.dot Visual

Overview

This extension integrates a modified version of the standalone ZGRViewer into the NetBeans IDE. When a GraphViz file (*.dot or *.gv) file is opened, a plain text editor is presented along with “Source” and “Visual” buttons on the document’s tool bar. When the document is saved, the plugin uses GraphViz to generate an SVG for the file which can be viewed by clicking the “Visual” button. Further changes to the graph may be made by switching back to the “Source” view. Note: if changes are made to the source file, the visual graph is only updated after the file is saved.

Here is an example from editing Block.dot in the ANTLR 4 runtime documentation. The “Visual” pane for this file is shown above.

Block.dot Source

Installation

Prerequisites

This extension requires the following to be installed separately.

Plugin

  1. Open the NetBeans plugin manager. On the Settings tab, click Add to add the following customizer:

ZGRNBViewer Update Center Customizer

  1. On the Available Plugins tab, you should now see an option to install the “ZGRViewer Integration” plugin. After accepting the license and installing the plugin, you should be ready to configure and use the viewer. :)

ZGRNBViewer Integration

Configuration

After installation, if the dot executable is not in your system path, you’ll need to configure the path to dot before using the plugin. In the editor options under the Miscellaneous section is a GraphViz tab. Here is an example configuration on the Directories tab:

ZGRNBViewer Directories

You may also wish to enable anti-aliasing on the Visualizer tab:

ZGRNBViewerOptions

One Response to “GraphViz viewer for NetBeans”

  1. 1
    Kari Hirvi Says:

    Hi,

    This is quite useful plugin for me. Is there a way to have the visual and code windows visible simultaneously?

    Kari

  2. 2
    svg files cuts Says:

    hi there! , I like a person’s composing quite definitely! percentage most of us connect extra concerning your submit on America online? I demand a specialist with this area to solve my personal dilemma svg files cuts. Might be that is definitely you actually! Looking forward to look at you.

Leave a Reply

© 2017 Sam's Blog | Entries (RSS) and Comments (RSS)

Your Index Web Directorywordpress logo