use Diagrams platform in a new plugin

Answered

Hi everyone,

I'm new to plugin development in JetBrains and I'm currently working on a plugin aimed at visualizing code analysis through graphs. I've noticed that JetBrains provides robust graph visualization tools within their 'Diagrams' options.

I'm curious if there's a way to integrate or migrate my plugin to utilize these diagramming capabilities for visualizing new analyses and graphs that I'm attempting to add. Can I leverage this diagram platform to customize and visualize graphs based on my input for nodes and edges?

Any insights or guidance on how to integrate my plugin with the JetBrains diagram platform would be greatly appreciated!

Thanks in advance!

0
6 comments

Hi,

Please check the com.intellij.diagram.DiagramProvider class and its Javadoc.

You can also find example implementations of com.intellij.diagram.Provider extension point on https://jb.gg/ipe.

0

Hi Karol, thanks for your answer! I can't find any documentation on the com.intellij.diagram.DiagramProvider class. Is there any information or steps for implementing the Javadoc it expects? Also, is it available in Kotlin as well?

0

Hi,

I'm sorry, but I mistakenly pointed you to a class that is not a part of the community source code and is available only in paid products.

Please confirm whether you need your plugin to be available in the community IDEs.

0

Hi, I see, thank you for the clarification. Originally, I planned for my plugin to be part of the community source code. However, I am open to considering other options. If I want to keep it within the community source code, is there another way to integrate with the JetBrains Diagrams platform? If I decide to go with a paid option, is there any support or documentation available to help create a plugin that uses the Diagrams platform to visualize my input? 
The goal it to be able to draw a new graph, based on my plugin input (nodes and edges) to draw the diagram I want in this platform 

Thank you for your assistance.

0

Hi,

I'm sorry but there is no open documentation for creating diagrams with DiagramProvider.

Still, I suggest checking existing implementations from plugins listed in IntelliJ Platform Explorer: https://plugins.jetbrains.com/intellij-platform-explorer/extensions?extensions=com.intellij.diagram.Provider

JHipster JDL looks like a good example:

Regarding the community editions, I don't see any APIs.

You can still make your plugin compatible with community editions. Defining optional dependency on com.intellij.diagram plugin will make diagrams available only in IDEs with the diagrams feature available (paid IDEs).

An alternative is to use different solution, e.g., drawing something “manually” in Swing, or in JCEF embedded browser.

0

ok got it
thank you very much! 

0

Please sign in to leave a comment.