int newShellHeight = currentShellHeight > minShellHeight ? currentShellHeight : minShellHeight;
//set the final size and centre the dialog within the app window
shell.setBounds((appWidth - newShellWidth)/2 + appLocX, (appHeight - newShellHeight)/2 + appLocY, newShellWidth, newShellHeight);
shell.open();
_window.getShell().setEnabled(false);
while (!shell.isDisposed())
{
if (!display.readAndDispatch())