Phpstorm Uml



IntelliJ IDEA lets you generate a diagram on a package in your project. Such diagrams always reflect the structure of actual classes and methods in your application.

View diagram on a package

  1. In the Project tool window, right-click a package for which you want to create a diagram and select Diagrams | Show DiagramCtrl+Alt+Shift+U ).

  2. In the list that opens, select Java Class Diagram. IntelliJ IDEA generates a UML diagram for classes and their dependencies.

Phpstorm UmlIntellij uml diagram

Intellij-idea uml class-diagram. Improve this question. Follow asked Nov 29 '13 at 9:20. Denis Kulagin Denis Kulagin. 7,216 12 12 gold badges 50 50 silver.

You can view your VCS local changes as a diagram. Select VCS | Show Local Changes as UMLCtrl+Alt+Shift+D.

  • UML: UOE at JavaStubElementType.createStub on attempt to create a member in non-Java class: Exception: IDEA-165352: UML diagram: creating member in non-Java class: ISE at DialogWrapper.ensureEventDispatchThread and no effect: Exception: IDEA-154616: AE at com.intellij.uml.UmlGraphBuilder$1.documentChanged(UmlGraphBuilder.java:85) Exception.
  • UML Diagrams in PhpStorm 2017.2 Gary Hockin September 12, 2017 Unified Modelling Language can be used to draw out the relationships between classes, abstract classes, and interfaces, to help you to visualize exactly how your classes interact and are related.
  • Plugin for IntelliJ IDEA CE 2016.1.1 for UML designing and code generation. 29 546 downloads. PlantUML Studio. This plugin makes conveniently utilizes PlantUML on your IntelliJ project. Features Editor supports. 5 163 downloads. PlantUML Syntax Check.
  • The diagrams feature is a really great feature in PhpStorm 3. Nevertheless I have some questions. When class methods are shown I can double click a class and then select a method. On right clicks the context menu appears but in the 'Refactor' node only 'Rename' is active. Further refactorings like 'Change signature' or 'move' are present but.

Analyze class diagram

You can press Ctrl+F12 on the element to view a list of diagram elements and navigate between them.

To see the list of methods, fields, and other code elements, select the appropriate icon on the diagram toolbar located on top of the diagram editor.

The lists are displayed based on the selected visibility level, which you can change. For example, to view protected methods, click on the diagram toolbar and select protected from the list. IntelliJ IDEA displays members with visibility not less than protected, such as public, package local, and protected ones. The protected methods are displayed with modifier icons next to them.

You can click the icon to see class dependencies. IntelliJ IDEA follows the UML conventions in showing relationships between the classes.

When you click through classes in the graph, IntelliJ IDEA greys out classes that do not reside in the same package. This might be helpful, when you generate a diagram on a package that contains inner packages.

To save the diagram as a file, right-click the diagram editor and from the context menu, select Save UML Diagram.

Manage class diagram

When working with diagrams, use the context menu in the diagram editor to perform different tasks. You can view members of the class, add new, delete the existing ones, see implementations, check parent classes, perform basic refactoring, add notes, and so on.

You can select the icon on the diagram toolbar to draw relationship links between elements in your graph. To delete the existing links, select the ones you don't need and press Delete. IntelliJ IDEA will update the source code accordingly.

  1. Press Space.

  2. In the search field that opens, start typing a name of the class you want to add. Then, select the desired class from the suggestion list.

    If you want to add a class that is out of the project scope, select the Include non-project items checkbox.

  1. In the diagram editor, select a node element you want to delete.

  2. Right-click the element and from the context menu, select DeleteDelete.

    Alternatively, select Refactor | Safe DeleteAlt+Delete. In this case, IntelliJ IDEA checks for usages before applying the changes.

You can quickly search for usages by pressing Alt+F7 on a code element.

You can perform some forward engineering while in the diagram editor.

  1. In the diagram editor, right-click anywhere and from the context menu, select New. Then select a code element you want to create.

  2. Depending on your selection, IntelliJ IDEA opens the appropriate dialog where you specify the necessary information for creating the new element.

IntelliJ IDEA adds the item to your diagram as well as to your project tree.

You can view implementations and parent classes in your diagram. If IntelliJ IDEA finds more than one parent class or implementation, it displays a list of appropriate items. Select the one you need to see the connections between the parent and its children.

Phpstorm Uml
  1. In the diagram editor, select an item for which you want to see implementations or parent classes.

  2. Right-click the items and from the context menu, select the Show ImplementationsCtrl+Alt+B or Show ParentsCtrl+Alt+P respectively.

  3. In the popup that opens, select items you need and press Enter. To extend your selection up or down while in the popup, press Shift + Up or Shift + Down respectively.

You can configure the diagram settings, so that you have certain options available to you by default when you create your diagram.

Intellij Uml Diagram

  1. In the Settings/Preferences dialog Ctrl+Alt+S, go to Tools | Diagrams.

  2. In the right-hand pane, select the options that you want to see by default and click OK to apply your changes.

PhpStorm lets you generate UML class diagrams to analyze PHP applications, view the structure of databases, tables, and queries, and review VCS local changes.

View UML class diagram

  1. In the Project tool window, right-click an item for which you want to create a diagram and select Diagrams | Show DiagramCtrl+Alt+Shift+U or Diagrams | Show Diagram Popup (Ctrl+Alt+U ).

  2. In the list that opens, select PHP Class Diagrams. PhpStorm generates a UML diagram for classes and their dependencies.

Uml

Phpstorm Plantuml

You can use the UML Class diagram to evaluate how your local code changes affect the model.

  • From the context menu of the code editor, the Project tool window, or the Local Changes view, select Show Local Changes as UML, or press Ctrl+Alt+Shift+D.

    The diagram opens in a popup. You can double-click a node to view changes in a Differences viewer.

To view changes in revisions as a UML Class diagram, in the History tab of the Version Control tool window, select the desired revision and select Show Diff as UML from the context menu or press Ctrl+Shift+D.

Analyze class diagram

After you have generated a diagram, press E to expand the nodes and see classes and their connections. To collapse them, press C.

Note that expanding/collapsing nodes works on the class containing folder level: expanding a folder will display only its content, but not the content of its child folders. Similarly, if you collapse a class, all elements in the containing folder (but not the child folders) will be collapsed.

Phpstorm Uml Data

To see the list of methods, fields, and other code elements, select the appropriate icon on the diagram toolbar located on top of the diagram editor.

The lists are displayed based on the selected visibility level, which you can change. For example, to view protected methods, click on the diagram toolbar and select protected from the list. PhpStorm displays members with visibility not less than protected, such as public, package local, and protected ones. The protected methods are displayed with modifier icons next to them.

To save the diagram as a file, right-click the diagram editor and from the context menu, select Save UML Diagram.

Phpstorm uml

Manage class diagram

When working with diagrams, use the context menu in the diagram editor to perform different tasks. You can view members of the class, add new, delete the existing ones, see implementations, check parent classes, perform basic refactoring, add notes, and so on.

You can navigate to the underlying source code by selecting a diagram element and pressing F4 or Ctrl+Enter ).

Phpstorm Uml

  • To select an element, click it in diagram.

  • To select multiple adjacent elements, keep Shift pressed and click the desired elements, or just drag a lasso around the elements to be selected.

  • To select multiple non-adjacent elements, keep Ctrl+Shift pressed and click the desired elements.

  • To select a class member, double-click the class element, and then use the arrow keys, or the mouse pointer.

  1. Press Space.

  2. In the search field that opens, start typing a name of the class you want to add. Then, select the desired class from the suggestion list.

    If you want to add a class that is out of the project scope, select the Include non-project items checkbox.

    Alternatively, select one or more elements in the Project tool window and drag them to the diagram.

  1. In the diagram editor, select a node element you want to delete.

  2. Right-click the element and from the context menu, select DeleteDelete.

    Alternatively, select Refactor | Safe DeleteAlt+Delete. In this case, PhpStorm checks for usages before applying the changes.

You can quickly search for usages by pressing Alt+F7 on a code element.

  1. Click on the diagram toolbar so that it appears pressed.

  2. Drag from the source to a target node to draw a link.

To delete the existing links, select the ones you don't need and press Delete. PhpStorm will update the source code accordingly.

You can perform some forward engineering while in the diagram editor.

  1. In the diagram editor, select a class to which you want to add a new member and from the context menu, select New or press Alt+Insert. Then select a code element (a field or a method) you want to create.

  2. Depending on your selection, PhpStorm opens the appropriate dialog where you specify the necessary information for creating the new element.

PhpStorm adds the item to your diagram and updates the source code accordingly.

You can view implementations and parent classes in your diagram. If PhpStorm finds more than one parent class or implementation, it displays a list of appropriate items. Select the one you need to see the connections between the parent and its children.

  1. In the diagram editor, select an item for which you want to see implementations or parent classes.

  2. Right-click the items and from the context menu, select the Show ImplementationsCtrl+Alt+B or Show ParentsCtrl+Alt+P respectively.

  3. In the popup that opens, select items you need and press Enter. To extend your selection up or down while in the popup, press Shift + Up or Shift + Down respectively.

You can configure the diagram settings, so that you have certain options available to you by default when you create your diagram.

  1. In the Settings/Preferences dialog Ctrl+Alt+S, go to Tools | Diagrams.

  2. In the right-hand pane, select the options that you want to see by default and click OK to apply your changes.

Productivity tips

Enable the diagram preview

Open the Structure tool window Alt+7 and drag the shadow area to obtain the desired view. Select one or more nodes in the diagram to highlight the corresponding nodes in the preview area.

Manage diagram layout

Right-click the diagram background, and choose Layout from the context menu. Then select the desired layout from the submenu. To apply the selected layout, click on the diagram toolbar.

Alternatively, drag entities in the diagram manually to achieve the desired layout.

Zoom in and out

Use any of the following techniques:

  • Click and on the diagram editor toolbar.

  • Keeping Ctrl pressed, rotate your mouse wheel.

  • Press NumPad+ or NumPad-.

Use the magnifier tool

Keeping Alt pressed, hover your mouse pointer over diagram areas.

View the structure of a database or table as a diagram

In the Database tool window, right-click a schema or a table and select Diagrams | Show VisualizationCtrl+Alt+Shift+U or Diagrams | Show Visualization PopupCtrl+Alt+U from the context menu.

View SQL query plan as a diagram

In the editor, right-click an SQL statement and select Explain Plan. Then, in the Output pane, switch to the Plan tab. By default, the query is displayed as a tree. To see it as a diagram, click Show Visualization () or press Ctrl+Alt+Shift+U.