How to build project-wide UML diagram in IntelliJ IDEA? - intellij-idea

Trying to reverse-engineer existing project and it would be of great help to see how classes collaborate/depend on each other. Is there a way to build project-wide UML diagram (or class diagram of any kind) in IntelliJ IDEA using build-in functionallity or using some free plugin?

Right click on your package no matter which. Click Diagrams > Show Diagram (Ctrl+Alt+Shift+U). You will see your package in diagram editor.
Now:
You can expand (E) or collapse (C) all nodes.
You can show dependencies
You can show many attributes of nodes (constructors, methods, properties...)
You can drag&drop other packages from project explorer.
So, play with it a bit and i think you will achieve what you need.
This is how it could looks like:

Related

IntelliJ IDEA Ultimate: how to build UML diagram for the whole project?

I'm getting started with IDEA and new project. I want to see the whole project's class diagram. I searched, and it says on SO that I have to
click Diagrams > Show Diagram (Ctrl+Alt+Shift+U). You will see your package in diagram editor.
but I only see one box for the whole module. But I want to see all classes, relationship between them etc. How do I do this?
I'm using the latest version of IDEA Ultimate: 2017.3
When invoked on the whole Project - it builds the diagram for the modules, not for classes. To have the Java class diagram invoke show diagram action on a specific package or if you want to see all the packages and classes in project invoke it on a module's source root. To expand a package (show it's content), select it and invoke "Expand" (E default shortcut) action.

Unable to find the persistence window in Intellij 14.1.4

I've been going through all the documents from JetBrains, but couldn't find the Persistence Window for my project so that I could auto generate the Pojo classes for the database tables without manually creating them.
Any help would be appreciated.
You can find any window using the Ctrl+Shift+A shortcut and typing in Persistence. This also tells you if there's any bindings to quickly open that window. Having done this, it doesn't have a keyboard shortcut.
From the menu you can access it by View → Tool Windows → Persistence
As #Bohuslav said in the comments, you need to add a JPA facet to the project for the window to be actionable.
Got it working, by enabling the persistence configuration. Went to persistence.xml which would be ideally located under the META-INF, and it would automatically ask you, whether to enable the persistence.
There after from View > Tool Windows, you could find Persistence Window.

How to disable the auto layout of the IntelliJ IDEA UML Diagram?

I've moved from Eclipse to IntelliJ IDEA and I like the its responsiveness.
In Eclipse I use ObjectAid to assist in designing my application structure. IntelliJ IDEA does have a UML diagram but it got really annoying when it keeps re-adjusting my diagram layout to what it thinks is a neat structure. Everytime I add/remove a class, it will re-adjust the layout. It may look neat, but it makes little sense to me. I like to manually place my class model in the exact place I leave it. Why oh why does IntelliJ think it knows best? Can I change this behavior? I can't find any settings in the settings menu.
You can disable this behaviour in the preferences under "Tools" -> "Diagrams". There is an option "Do relayout when new elements were added" which you need to disable.
Note: IntelliJ 2016.3

How to Hide Eclipse editor while doing back ground processing

How to Hide Eclipse editor while doing back ground processing, means
How to do some working pro-grammatically on Eclipse editor without showing it to end-user.
I am working on UML diagram. Activity Diagram gets jumbled on editor when making pro-grammatically, Then I call 'Arrange Selection' action to arrange Activity, it works properly. Now I need to save the images of all UML diagrams on the fly but running as a background processing; editor should not be opened to the user but 'Arrange Selection' code requires editor to be opened & diagram elements should be selected e.g.
org.eclipse.gmf.runtime.diagram.ui.actions.internal.ArrangeAction.createArrangeSelectionAction(IWorkbenchPage workbenchPage)
How can I achieve this.
Please tell if this is possible??
Thanks in advance
Kishore
You can run background jobs in the Eclipse IDE.
In Eclipse Help, see the Platform Plug-in Developer Guide > Programmer's Guide > Runtime overview > Concurrency infrastructure for an explanation and examples on how to create Eclipse background jobs.

Diagramming tool for WPF

I wish to create a diagram similar to VS.NET class diagram.
I have seen Sukram's article on codeproject.com, called DiagramDesigner. But I have found this solution a little difficult to implement, I want the control with + and - buttons for expanding and collapsing.
Are there any vendors of a custom control similar to VS.NET Class diagram designer. Any ready solutions available?
Click of + the child nodes should expand. Click of - these nodes should minimize.
I have also seen Sacha Barber's spider tree control. But this too does not suit my requirement.
Have you looked into VS built in diagramming engine. You would be able to create your own DSL to define how you want your diagram to look and interact. You would then use VS's built in code gereration tools to generate the code and XAML you want.
Check out this webcast if you want to see a demonstration.