private Point calcInitialLocation(IGraphicalViewer viewer, Rectangle bounds) { ZoomManager zoom = viewer.getZoomManager(); bounds = bounds .scale(zoom.getScale()) .expand(1, 1) .translate(viewer.getScrollPosition().getNegated()); return viewer.getControl().toDisplay(bounds.x, bounds.y + bounds.height); }