eclipsesource / papyrus-gefx

A new Editor kind for Papyrus, based on GEFx and GMF Runtime
0 stars 2 forks source link

[Views] Add Outline support #30

Open CamilleLetavernier opened 5 years ago

CamilleLetavernier commented 5 years ago

Papyrus/GMF provides an Outline view, which displays the entire diagram in a small view, along with the current editor viewport area. This is useful to quickly navigate large diagrams, and get a general overview:

image

This would be especially useful in GEFx, since the canvas has an infinite size, where it can be difficult to find elements that have been added far away from the center.

However, we must be careful about performances: the Papyrus/GMF Outline view introduces some severe performance issues when the viewport size changes (It needs to redraw the entire outline image, which can be very slow). On the other hand, incremental outline updates work fine on Papyrus/GMF.

mwienand commented 5 years ago

Hi Camille,

this is something we should probably provide within GEF, too. Therefore, I created Bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=547433

Regarding the implementation, you can take a snapshot of the content-group. However, you need to set a transformation to scale down the snapshot so that the generated texture does fit into VRAM. Otherwise, JavaFX dies with some exception.

Such a basic overview is present, for example, in the Yakindu Model Viewer: https://blogs.itemis.com/hs-fs/hubfs/Blog/Usability/yakindu-model-viewer-welcome-screen.png?width=1600&name=yakindu-model-viewer-welcome-screen.png