boolean runASync ) {
Runnable object = new Runnable(){
public void run() {
Shell shell = Display.getDefault().getActiveShell();
ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell){
@Override
protected void configureShell( Shell shell ) {
super.configureShell(shell);
shell.setText(dialogTitle);
}
@Override
protected void createButtonsForButtonBar( Composite parent ) {
if (showRunInBackground)
createBackgroundButton(parent);
super.createButtonsForButtonBar(parent);
}
private void createBackgroundButton( Composite parent ) {
createButton(parent, IDialogConstants.BACK_ID,
Messages.PlatformGIS_background, true);
}
@Override
protected void buttonPressed( int buttonId ) {
if (buttonId == IDialogConstants.BACK_ID) {
getShell().setVisible(false);
} else
super.buttonPressed(buttonId);
}
};
try {
dialog.run(true, true, new IRunnableWithProgress(){
public void run( IProgressMonitor monitor ) {
try {
runBlockingOperation(new IRunnableWithProgress(){
public void run( IProgressMonitor monitor )