Scrolling / zooming programmaticallyhttps://www.eclipse.org/forums/index.php/mv/msg/240017/725212/#msg_725212
I am setting the selection programmatically, which works fine. However, I want to make sure that all selected elements are visible. Is there a way to programmatically scroll / zoom the diagram in the editor?

Thanks,

Andreas
]]>Andreas Graf2011-09-14T09:12:09-00:00Re: Scrolling / zooming programmaticallyhttps://www.eclipse.org/forums/index.php/mv/msg/240017/725214/#msg_725214
I have set the selection programmatically as well. In my case Graphiti automatically scrolls the diagram to make the selected element visible. I did this for a single selection only. Doesn't this work for you? If so, how do you program the selection?

However, there is no scrolling in this case. (see attached screenshot).

If I reverse the order of pictogram elements, (se.getParent(), sa.getParent()) I see some scrolling. I guess it depends on primary / secondary selection?.

Regards,

Andreas

]]>Andreas Graf2011-09-14T11:10:31-00:00Re: Scrolling / zooming programmaticallyhttps://www.eclipse.org/forums/index.php/mv/msg/240017/725261/#msg_725261
My usage is different in that the selection was done in another workbench part and went through the selectionChanged(...) method of the DiagramEditor class and I always have only one element selected.

Jos
]]>Jos Warmer2011-09-14T11:37:57-00:00Re: Scrolling / zooming programmaticallyhttps://www.eclipse.org/forums/index.php/mv/msg/240017/725592/#msg_725592
the selection method only uses the first element in the given array, that's
what GEF allows there. So this explains the behavior you have noticed.