Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2012-09-04 13:04:48 -0400
committerPawel Piech2012-09-04 13:04:48 -0400
commitd95b05878404be4391aaca5ec2ef46ef926bc8d3 (patch)
tree6fa1ac6bda84771e6158239eb76a7dead3386b0c /org.eclipse.debug.ui
parenta7933cebb9008430f78cb0a48e66007178723c95 (diff)
downloadeclipse.platform.debug-d95b05878404be4391aaca5ec2ef46ef926bc8d3.tar.gz
eclipse.platform.debug-d95b05878404be4391aaca5ec2ef46ef926bc8d3.tar.xz
eclipse.platform.debug-d95b05878404be4391aaca5ec2ef46ef926bc8d3.zip
Revert "Bug 388238 - NPE when calling DebugUIPlugin.launchInBackground() from non-UI thread"
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java17
3 files changed, 5 insertions, 14 deletions
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 44e4033ab..4f2ad1628 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 class DebugUIMessages extends NLS {
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 4a5060340..8068829d2 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 ff5e84d84..963cd7551 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.PlatformUI;
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 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
}
}
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 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
}
};
+ 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();
}

Back to the top