Ever felt like reading a complex design document is just a wall of text? As developers, we know that visual diagrams are often the best way to understand the flow and interaction between different components in a system. Mermaid is a fantastic tool that lets you create these diagrams—like Sequence, Flowchart, and Gantt charts—using simple, markdown-like text.

But here’s the rub: if you’re an Eclipse user, viewing these beautifully simple diagrams directly in your IDE can be a pain, as the default Markdown previewer often doesn’t support them.

The good news? A quick plugin install is all it takes to bring the power of Mermaid visualization right into your favorite Java IDE!


The Challenge: Native Mermaid Support in Eclipse

Mermaid diagrams are written in Markdown files (usually .md). While Eclipse has a built-in Markdown editor, it typically lacks the interpreter needed to convert the Mermaid syntax (e.g., sequenceDiagram ...) into the rendered graphic.

This is where a dedicated Markdown enhancement plugin comes in handy.


💡 Solution: Install the “Previewer” Plugin

The “Previewer” plugin by Sebastian Thomschke is a lightweight and powerful solution that adds better Markdown rendering, including support for Mermaid sequence diagrams, directly to your Eclipse workspace.

Here’s the simple step-by-step process to get it installed:

1. Launch the Installation Manager

Go to Help > Install New Software… in your Eclipse menu bar.

2. Add the Update Site

In the “Work with:” field, you need to add the plugin’s update site URL.

  • Enter the following URL: https://raw.githubusercontent.com/sebthom/previewer-eclipse-plugin/updatesite

3. Select and Install

  • After a moment, the Previewer option should appear in the list below.
  • Check the box next to Previewer.
  • Click Next.
  • Review the installation details, accept the license agreement, and click Finish.

4. Restart Eclipse

Eclipse will prompt you to restart to complete the plugin installation. Go ahead and restart the IDE.


🎉 Visualize Your Logic!

Once restarted, open any Markdown file containing a Mermaid Sequence Diagram. You can now use Eclipse’s built-in preview functionality, and the “Previewer” plugin will handle the rendering, allowing you to instantly visualize the logic.

Example Mermaid Code:

Code snippet

sequenceDiagram
    participant C as Client
    participant A as AuthenticationService
    participant D as Database

    C->>A: Login Request (User, Pass)
    A->>D: Verify Credentials
    D-->>A: Credentials Valid
    A-->>C: Authentication Token

When you open this in Eclipse with the Previewer plugin installed, you will see the full, rendered sequence diagram.

This simple addition transforms your documentation workflow, making it much easier to both create and review complex system interactions without ever leaving your IDE.

By Ray Lee (System Analyst)

iDempeire ERP Contributor, 經濟部中小企業處財務管理顧問 李寶瑞

Leave a Reply

Your email address will not be published. Required fields are marked *