/*
*
*/
public void preWindowOpen()
{
final IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
final Monitor primary = Display.getDefault().getPrimaryMonitor();
/*
* Get the bounds of the primary monitor, not its client area.
*
* Client area on multi-monitor desktops in Linux (Xinerama) spans across all monitors,
* but the window manager won't allow the window to take all that space immediately
* (at least that's the effect I'm observing on my desktop).
*
* What's funny is that the window still opens on monitor[0], but is shifted
* outside of its bounds (and thus spills to monitor[1]). Seems like getPrimaryMonitor()
* is not used when creating the Workbench shell.
*/
final Rectangle fullScreenSize = primary.getBounds();
int width = calculateInitialSize(fullScreenSize.width, 800);
int height = calculateInitialSize(fullScreenSize.height, 600);
configurer.setInitialSize(new Point(width, height));
configurer.setShowStatusLine(true);
configurer.setShowMenuBar(true);
configurer.setShowPerspectiveBar(true);
configurer.setShowProgressIndicator(true);
configurer.setShowCoolBar(true);
}