Basic Network Diagram for Profiles Plugin
Basic network diagram for Profiles plugin that displays entities and their relationships with each other.
Leave a comment
General feedback and UI improvement ideas here: https://drive.google.com/open?id=1uc9dqdDsQTDfIr9ai_5TSPQ1ON-nBJII2fkDaNNDILU
Sent to Evgeniy for review
Sent to Evgeniy for review
Details can be found in the above google doc, but the summary of features added are:
This was low priority and we are not doing it for now:
- Font Styling Options - Add the ability to configure the fonts as part of the styling and pick a better default.
- Option to Show/Hide relationship arrows
- Add ability to show/hide the filters/styling option so there is more space for the network diagram
- Save the last settings for an individual entity (degrees, styles etc). - this is not stored in the database so will not be sync'd with connect. Instead this is stored in the eclipse preferences
- More layout options
- Add ability to multi select and use space bar for selecting/deselecting multiple entities/relationship
- Only refresh the diagram when the relationship diagram becomes visible. For example if I have a working set with a collection of entities and am viewing the map working set map I would like to be able to add entities to my working set without the system locking-up because the relationship view is refreshing.
- Wrap details in hover dialog
This was low priority and we are not doing it for now:
- Add Padding options
If you have an entity editor open and make changes to the relationship (relationships tab) the relationships view is not updated until the entity is saved.
This might not be intuitive to our users - we might need some sort of warning that says something like to view changes you need to save them first.
This might not be intuitive to our users - we might need some sort of warning that says something like to view changes you need to save them first.
In 6.1.a7,
Positioning
I used the default settings and repositioned the elements in the network diagram only to have them revert to a non-readable position after retarting the application
Unhandled event loop exception
I updated the fonts and then went to the diagram window and this error appeared after clicking on a box and dragging it to a new position. The error appeared once I tried dragging it.
Log Entry
networkError.txt
Positioning
I used the default settings and repositioned the elements in the network diagram only to have them revert to a non-readable position after retarting the application
Unhandled event loop exception
I updated the fonts and then went to the diagram window and this error appeared after clicking on a box and dragging it to a new position. The error appeared once I tried dragging it.
Log Entry
networkError.txt
I was able to reproduce both issues:
1) java.lang.IllegalArgumentException: node not on this layer
This issue is not constantly reproducible. Not related to changing font. Problem may occur when redraw is triggered with "Space Tree" layout. I reproduced it by repeating following steps:
1) Select "Space Tree" layout or change Depth
2) Drag some item
The problem is that SpaceTreeLayoutAlgorithm store some information about the nodes. When graph is refreshed a new set of nodes is created. As an old instance of layout algorithm is still associated with a new graph this causes issues during layout (it assumes that Node is present while new object was created for same node during refresh). We can change the code to always assign new instance of layout algorithm when the graph is refreshed. I've made some test and looks like this will fix the issue, but I have concerns as it doesn't seem right to me that you need to do graphViewer.setLayoutAlgorith(new Algorithm()) every time before you call graphViewer.setInput(...) or graphViewer.refresh().
Alternative solution would be to exclude this algorithm from Algorithms drop-down.
@egouge, what do you think?
2) java.lang.RuntimeException: Graphical tree exceeds maximum depth of 10! (Graph not directed? Cycles?)
Issue is constantly reproducible. On the entity "filling in another blank entry" in occurs even with depth = 3. Looking at the graph structure for this entity I do not see anything unusual. Looks like this is some bug or limitation in SugiyamaLayoutAlgorithm implementation. It is nor reasonable trying to fix this layout algorithm, so I propose to exclude it from Algorithms drop-down.
1) java.lang.IllegalArgumentException: node not on this layer
This issue is not constantly reproducible. Not related to changing font. Problem may occur when redraw is triggered with "Space Tree" layout. I reproduced it by repeating following steps:
1) Select "Space Tree" layout or change Depth
2) Drag some item
The problem is that SpaceTreeLayoutAlgorithm store some information about the nodes. When graph is refreshed a new set of nodes is created. As an old instance of layout algorithm is still associated with a new graph this causes issues during layout (it assumes that Node is present while new object was created for same node during refresh). We can change the code to always assign new instance of layout algorithm when the graph is refreshed. I've made some test and looks like this will fix the issue, but I have concerns as it doesn't seem right to me that you need to do graphViewer.setLayoutAlgorith(new Algorithm()) every time before you call graphViewer.setInput(...) or graphViewer.refresh().
Alternative solution would be to exclude this algorithm from Algorithms drop-down.
@egouge, what do you think?
2) java.lang.RuntimeException: Graphical tree exceeds maximum depth of 10! (Graph not directed? Cycles?)
Issue is constantly reproducible. On the entity "filling in another blank entry" in occurs even with depth = 3. Looking at the graph structure for this entity I do not see anything unusual. Looks like this is some bug or limitation in SugiyamaLayoutAlgorithm implementation. It is nor reasonable trying to fix this layout algorithm, so I propose to exclude it from Algorithms drop-down.
2) - This page describes the problem with the SugiyamamLayoutAlgorithm and how to fix it. You need to apply a LayerProvider to the class. If its easy do it - if it's going to take longer than a hour or two then just exclude the the layout algorithm from the drop down.
https://www.eclipse.org/forums/index.php/t/1072184/
https://www.eclipse.org/forums/index.php/t/1072184/
1 - I don't know enough about the implementation to comment. This bug seems to have the same problem and they may or may not have fixed it (it's not clear to me). https://bugs.eclipse.org/bugs/show_bug.cgi?id=534993
2 - Yes, but if you scroll down it explains how to fix the problem with the SugiyamaLayout
Hi Christoph,
actually, you can pass a LayerProvider into the constructor of SugiyamaLayoutAlgorithm. The default LayerProvider is the SugiyamaLayoutAlgorithm.SimpleLayerProvider, which is restricted to a maximum number of 10 layers (MAX_LAYERS). You can try to use the SugiyamaLayoutAlgorithm.DSFLayerProvider instead as follows:
Code: [Select all] [Show/ hide]
new SugiyamaLayoutAlgorithm(Direction.VERTICAL, new SugiyamaLayoutAlgorithm.DSFLayerProvider()
If the DSFLayerProvider is not sufficient, you can also implement a custom LayerProvider.