UML class diagrams for Apex types
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)
-
repo owner -
repo owner Issue
#2037was marked as a duplicate of this issue. -
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 changingglobal
topublic
and removingwith/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. -
I’d be very interested in this as well.
-
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.
-
Fair enough. Thanks for the update Scott, hope you had a happy thanksgiving.
-
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.
-
repo owner - removed version
-
repo owner - changed title to UML class diagrams for Apex types
- Log in to comment
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!