shell.setSize(parent.getSize());
shell.setLayout(new FillLayout());
shell.layout();
// Clean up the shell that was created above on dispose of the frame
frame.addWindowListener(new WindowAdapter() {
public void windowClosed(WindowEvent e) {
if (!display.isDisposed()) {
ThreadingHandler.getInstance().asyncExec(display, new Runnable() {
public void run() {
shell.dispose();