Revert "Bug 388238 - NPE when calling DebugUIPlugin.launchInBackground() from non-UI thread"

This reverts commit a7933cebb9008430f78cb0a48e66007178723c95.
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
index 44e4033..4f2ad16 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
@@ -28,7 +28,6 @@
 	public static String DebugUIPlugin_0;
 
 	public static String DebugUIPlugin_25;
-	public static String DebugUIPlugin_showProgressJob_label;
 	public static String DebugUIPlugin_Build_error__Check_log_for_details__2;
 	public static String DebugUIPlugin_Run_Debug_1;
 
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
index 4a50603..8068829 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
@@ -14,7 +14,6 @@
 DebugUIPlugin_23=Build in Progress
 DebugUIPlugin_24=Wait for build to finish?
 DebugUIPlugin_25=Launching {0}
-DebugUIPlugin_showProgressJob_label=Show progress for launch
 DebugUIPlugin_0=\ (waiting for build...)
 DebugUIPlugin_Build_error__Check_log_for_details__2=Build error. Check log for details.
 DebugUIPlugin_Run_Debug_1=Run/Debug
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
index ff5e84d..963cd75 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
@@ -108,7 +108,6 @@
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.eclipse.ui.progress.IProgressConstants2;
 import org.eclipse.ui.progress.IProgressService;
-import org.eclipse.ui.progress.WorkbenchJob;
 import org.eclipse.ui.services.IEvaluationService;
 import org.eclipse.ui.themes.IThemeManager;
 import org.osgi.framework.Bundle;
@@ -1180,7 +1179,7 @@
 			}
 		}
 		final boolean waitInJob = wait;
-		final Job job = new Job(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {configuration.getName()})) {
+		Job job = new Job(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {configuration.getName()})) {
 			public IStatus run(final IProgressMonitor monitor) {
 				/* Setup progress monitor
 				 * - Waiting for jobs to finish (2)
@@ -1247,21 +1246,15 @@
 			}
 		};
 
+		IWorkbench workbench = DebugUIPlugin.getDefault().getWorkbench();
+		IProgressService progressService = workbench.getProgressService();
+
 		job.setPriority(Job.INTERACTIVE);
 		job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
 		job.setName(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {configuration.getName()}));
 		
 		if (wait) {
-			new WorkbenchJob(DebugUIMessages.DebugUIPlugin_showProgressJob_label) { 
-				{ setPriority(INTERACTIVE); }
-				
-				public IStatus runInUIThread(IProgressMonitor monitor) {
-					IWorkbench workbench = DebugUIPlugin.getDefault().getWorkbench();
-					IProgressService progressService = workbench.getProgressService();
-					progressService.showInDialog(null, job);
-					return Status.OK_STATUS;
-				}
-			}.schedule();
+			progressService.showInDialog(workbench.getActiveWorkbenchWindow().getShell(), job);
 		}
 		job.schedule();
 	}