Diagrams are only available in Ultimate version of IntelliJ IDEA and Diagram Support is implemented using a commercial library called yFiles. This library has a bit complicated API and if you use yFiles it’s difficult to make something really simple in a short period of time. That’s why I made a diagram framework on top of yFiles. We (IntelliJ team) are using this framework inside Ultimate project and I can’t provide some real code examples. Sorry!