UML class diagrams for Apex types

Issue #615 new
Neil Morris created an issue

Hi Scott,

This may be a crazy thing to ask but, I wanted to at least bring it to your attention in case it's something easy.

I just started playing around with the UML Support default intellIj Plugin. It's pretty cool being able to generate UML diagrams from the code structure. I was really hoping the plugin would just work almost automatically since, I feel like java and apex extends / class hierarchy is so similar.

I was wondering if this is something you've looked into in the past or if you have any ideas around this. I understand there's a good chance there's something in the UML Support plugin that's not done in an elegant way to support different language support.

Thanks, -Neil

Comments (9)

  1. Scott Wells repo owner

    Hi, Neil. I actually have looked at this a bit. Because the UML Support plugin is for Ultimate Edition only and IC users are about 50/50 Community/Ultimate, I haven't put much emphasis on it. However, it does look like it's something I could implement that would be useful to those who have access to it. I'll keep this open as the primary enhancement request for it and see when I might be able to take a closer look. Thanks for reporting!

  2. Scott Wells repo owner

    Echoing a comment I just added to #2037, a dupe of this one:

    It's worth pointing out that some folks have had some success with a workaround where they take the sources that they want to model, rename the files from *.cls to *.java, and remove/change the Apex-specific parts so that at least the high-level skeletal types are "Java"--particularly changing global to public and removing with/without/inherited sharing--then they're able to generate very nice UML diagrams against those types. Assuming this is for the most part a one-time thing and not something you'll be doing frequently, might be a decent way to visualize the contents of those packages without waiting on this to be implemented in IC2.

  3. Scott Wells repo owner

    To be candid, this is pretty unlikely to happen. As noted when this issue was first logged, UML support is only present in IntelliJ IDEA Ultimate Edition, and at this point that represents a smaller subset of the total user base, particularly since adding support for JetBrains' lightweight IDEs such as WebStorm, PyCharm, etc. It would be a non-trivial time investment in a feature that wouldn’t be available to as many IC2 users. I think the only way I’d consider doing this is if I could implement it in a way that worked for the entire install base. I might spend a few hours investigating other options to render simple UML class diagrams from Apex types at some point and, if there’s a good option, see if I can provide it that way.

  4. Scott Wells repo owner

    I may revisit this in the relatively near future using Mermaid class diagrams instead of the commercial IDEs' native feature. That’s the same diagram tech used for Flow diagrams now. The big open question would be how to allow the user to create and manage class diagrams for subsets of the project’s classes.

  5. Log in to comment