camel-idea-plugin icon indicating copy to clipboard operation
camel-idea-plugin copied to clipboard

Visual route diagram

Open davsclaus opened this issue 8 years ago • 12 comments

Wonder if we can reuse yfrog from IDEA to show route diagram / diagram popup as IDEA can do for class hierarchy.

This plugin is in IDEA ultimate, and maybe its some kind of addon you can install on community as well.

screen shot 2016-12-28 at 9 43 33 am screen shot 2016-12-28 at 9 43 46 am

davsclaus avatar Dec 28 '16 08:12 davsclaus

searching for this feature was how I found out about your plugin, this would be awesome!

srang avatar Mar 14 '17 20:03 srang

Yeah I would love to be able to use that java diagram library. But there is no free open source version to be used. And I am not sure if Jetbrains allows 3rd party developers to use it either.

However we could try ask the company of that library if they can help us? Maybe they have a special program for free open source projects?

davsclaus avatar Mar 14 '17 20:03 davsclaus

What do you think about use of other library than yfiles? Some time ago i have created an concept of camel plugin by use mxGraph. It is open source library that can be used in both version of IDEA without care about license. Project is available here camel-intellij-plugin but is is not useabe at this moment. camel-idea-graph

kamkozlowski avatar Apr 10 '17 22:04 kamkozlowski

I personally have no knowledge about the mxGraph, but it seems solid.

Feel free to create a prototype for the camel-idea-plugin. It could be a nice feature to add to the plugin. If you need any help let us know

fharms avatar Apr 11 '17 12:04 fharms

Yeah would be nice with a little tool window you could expand/collapse that live updates based on where the cursor is in the source code editor and highlight in the diagram where you are. That was my original idea. To aid you navigating your Camel routes if you have many and some of them are bigger.

And also that right click -> draw route diagram would be nice as well. Even so people could save as png or something to keep with their source code as documentation.

Having a nice java library for drawing the digram is hard to find. @kamkozlowski seems like you have found something useful. You are very welcome to try to hack on something. Its awesome you have already experience with writing IDEA plugin code, which is different than writing regular Camel applications.

davsclaus avatar Apr 11 '17 18:04 davsclaus

For visibility: I had looked into visualisation of camel in a project of mine a few years ago here:

image

If I remember correctly: I had chosen to use JUNG as the graphing library for the implementation in the end, as the implementation offered by IntelliJ was closed source and not available within the community edition. Additionally the graphing library was obfuscated and I had to import gibberish java classes that were auto-generated on each version of IntelliJ, so the built jar didn't work on newer/old versions of IntelliJ. It was possible to work around those issues with reflection, but it was easier to just use JUNG in the end :+1:

I believe I had some issues with mxgraph when things became more complicated with the router component, but the implementation might be better these days

AlanFoster avatar Sep 14 '17 14:09 AlanFoster

Thanks @AlanFoster for sharing this. The diagram looks awesome and beautiful.

davsclaus avatar Sep 14 '17 14:09 davsclaus

Found this diagram plugin in my countless hours searching the IDEA plugin forum for a solution to another problem.

https://github.com/Stefku/intellij-reference-diagram

fharms avatar Feb 05 '18 18:02 fharms

Nice one you found there

davsclaus avatar Feb 06 '18 14:02 davsclaus

Hello there. I'm currently improving the intellij-reference-diagram mentioned above. In that plugin I use the diagram library shipped with IntelliJ Ultimate com.intellij.diagram / com.intellij.openapi.graph wrapping yFiles). This library is quite easy to use but has restrictions, mainly because yFiles is wrapped not exposed. So I'm looking for an alternative graph library and found this discussion.

It seems that some of you also looking for a library. Do you found something? Or do you have a candidate that you tested a bit? I'm even happy for any bit of example code :-)

Stefku avatar Jul 16 '19 07:07 Stefku

Not to my knowledge. So far we just have been searching for possible candidates

fharms avatar Jul 18 '19 05:07 fharms

Update: Maybe we can integrate karavan in a similar way than VS code.

The project is rather cool: https://github.com/apache/camel-karavan

acasanova99 avatar May 28 '23 22:05 acasanova99