If 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.