ActionScript/Flex UML Class Diagrams in IntelliJ IDEA 9
December 11th, 2009 by ksafonovIf you read our recent posts on ActionScript/Flex refactorings, you might have noticed that UML diagramming in freshly released IntelliJ IDEA 9 works not only for Java. That’s right, you can use it to analyze your ActionScript and Flex classes.

Diagram can be shown either in a popup (i.e. to for quick glance at classes and their relationships), or in an editor tab for a more detailed drill down. Availablility of Show UML popup and Show UML Diagram context menu actions depends on what node is selected in Project view or what element or reference is under caret in AS/MXML file editor.
You can open a UML diagram for a class or package. The former displays all superclasses of selected class, the latter — all classes and subpackages of selected package. This way you may choose whether to inspect classes hierarchy or package contents.
UML diagram shows classes, interfaces and packages as top-level nodes, and members inside parent node. Links denote inheritance relationships between classes or interfaces: implements or extends. With different types of layouts it’s very simple to get a structural overview of classes hierarchy and relationships.

Using UML toolbar you can easily control which types of class members are visible: fields, constructors, methods and properties. Also, you can filter visible members by access type. Elements in namespaces are shown when protected & internal or all visibility mode is selected.

Many of the familiar refactorings are accessible right from UML diagram! You can rename classes or members, move static members, pull members up or push them down. To invoke operations on members, first double-click class node or select it and press Enter or F2. You may also quickly add class supers or inheritors with a context menu action:


To remove unneeded nodes from the diagram, select them and press Delete. To add classes/packages to the opened diagram, just drag the items from Project view.
UML with pleasure!
Tags: ActionScript, Flex, UML

December 11th, 2009 at 8:54 pm
This is certainly a good feature, however I am noticing several inconsistencies between the ActionScript and Java UML functionality. First, if you create a UML diagram of a package, it doesn’t detect any ActionScript classes within the package. In addition, I can’t drag ActionScript classes onto an existing UML diagram. Is anyone else seeing this?
December 11th, 2009 at 9:41 pm
Wow, that attracts me to use IntelliJ IDEA. Nice feature introduced.
December 14th, 2009 at 4:05 am
Hello David,
Unfortunately the latest UML improvements didn’t get into the release build, we’ll deliver all of them in 9.0.1 fix release shortly.
December 20th, 2009 at 11:13 pm
When will the 9.0.1 fix release come?
December 21st, 2009 at 6:01 am
9.0.1 EAP will be out these days.
January 23rd, 2010 at 1:31 am
I just updated to 9.0.1, and it looks like the same problems are there. What is the ETA on these fixes?
January 25th, 2010 at 7:31 am
David, I cannot reproduce the problems you’ve found. Could you please file the issue(s) at http://youtrack.jetbrains.net/welcome#newissue=yes and give more details there?
Thanks,
Kirill
September 1st, 2011 at 10:25 am
This is brilliant feature. But for actionscript i cant’ find how i can show dependencies between classes, not only inheritance hierarchy. Is it lack in the product? And when it will be fixed?
Thanks,
Eugene
September 1st, 2011 at 10:47 am
@Hyzhak this is not yet implemented, please watch/vote/comment on http://youtrack.jetbrains.net/issue/IDEA-66205 and http://youtrack.jetbrains.net/issue/IDEA-70539.
September 3rd, 2011 at 8:45 am
Thanks a lot. I’m looking forward to.