DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Hey Developers: Diagrams Don’t Need to Be So Complex
  • Evolving Domain-Specific Languages
  • Remote Pair Programming with IntelliJ, Eclipse and VS Code
  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3

Trending

  • Teradata Performance and Skew Prevention Tips
  • Understanding Java Signals
  • Solid Testing Strategies for Salesforce Releases
  • The Role of Retrieval Augmented Generation (RAG) in Development of AI-Infused Enterprise Applications
  1. DZone
  2. Data Engineering
  3. Data
  4. Create UML Diagrams With Simple DSLs in Eclipse and IntelliJ

Create UML Diagrams With Simple DSLs in Eclipse and IntelliJ

How to create flow chart diagrams for whatever DSL you may be using in popular IDEs.

By 
Lubos Krnac user avatar
Lubos Krnac
·
Apr. 04, 16 · Tutorial
Likes (20)
Comment
Save
Tweet
Share
36.9K Views

Join the DZone community and get the full member experience.

Join For Free
Historically I disliked creating design UML diagrams, because the tooling for it mostly requires drawing boxes and connecting them with lines or arrows. I find such workflows very time consuming and wasteful. This short blog post will describe a much better way to create UML diagrams.

But first, you may argue that UML's importance in today’s agile software development world is fading out. I would agree partially.

Creating UML Class Diagrams

From my point of view, UML class diagrams are needed very rarely. I can find only two use cases for it:

  • To analyze an existing code base.
  • To communicate a suggested design with the team.

When you need to analyze an existing code base, class diagrams can be easily generated by your IDE from the existing code. IntelliJ idea provides this as part of its paid version:

Image title

To find out how to create such diagram, read this IntelliJ IDEA documentation. It is also easy with Eclipse or its various flavors (e.g. Spring Tool Suite):

Image title

You just need to use plugin called ObjectAid.

When we need to sketch class diagram upfront to consult design with the team, I would suggest to create prototype with desired class structure instead and generate class diagram from the live code (again with IDE). You may find some important facts about the design while creating prototype. There’s no need to create logic and tests, just APIs of the design.

And of course when you don’t need such generated diagram anymore, just wipe it out. Low-level design may change easily and you don’t want to keep outdated diagrams around. You can generate new diagram from live code easily.

Non-class Diagrams

So when we need Class diagram, it’s smart to generate it from live code. But what about other UML diagrams like:

  • Structure diagrams (except Class diagram)
  • Behavioral diagrams
  • Interaction diagrams (especially useful is Sequence diagram from this bucket)

I personally created only few use case and flow chart diagrams during my career. But Sequence and Component diagrams are very useful to document high-level design decisions. Of course you don’t want to have them very detailed, but at high level designer intentions and considerations are sometimes good to document.

But the tool that is used for designing these diagrams has to be very easy to use and flexible. Sorry Visio or Enterprise Architect, I don’t include you in this bucket (although I have to admit I haven’t used EA for long time).

My tool of choice is PlantUML.  We can define design with very simple DSL. Therefore, instead of connecting boxes and lines on canvas, we can focus on design itself. It can be used as a standalone application but it also has an impressive list of integrations. So you can easily use it with your IntelliJ IDEA, Eclipse, or Spring Tool Suite.

A very compelling fact for me is that DSLs which define diagrams can live with the project code-base and be handled by the source control system, with all the goodness it brings. This is a screenshot from IntelliJ:

Image title

Diagram UML intellij Eclipse

Published at DZone with permission of Lubos Krnac, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Hey Developers: Diagrams Don’t Need to Be So Complex
  • Evolving Domain-Specific Languages
  • Remote Pair Programming with IntelliJ, Eclipse and VS Code
  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: