Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorPatrick Chuong2011-01-18 11:00:51 -0500
committerPatrick Chuong2011-01-18 11:00:51 -0500
commita5c5b5ff16fdba59e0c9175b73f74d90e14d9f71 (patch)
tree73f4e7740e49729376517880bd7e090bec76569a /debug
parent3995cfd1a6408187226ebe7a9cca1ead65552576 (diff)
downloadorg.eclipse.cdt-a5c5b5ff16fdba59e0c9175b73f74d90e14d9f71.tar.gz
org.eclipse.cdt-a5c5b5ff16fdba59e0c9175b73f74d90e14d9f71.tar.xz
org.eclipse.cdt-a5c5b5ff16fdba59e0c9175b73f74d90e14d9f71.zip
Bug 334651 - Deadlock reported during startup of cdt.debug.ui
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java53
1 files changed, 29 insertions, 24 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
index f6391cf686..bf211af257 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 QNX Software Systems and others.
+ * Copyright (c) 2004, 2011 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -289,43 +289,48 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
@Override
public void start( BundleContext context ) throws Exception {
super.start( context );
- ViewIDCounterManager.getInstance().init();
fDisassemblyEditorManager = new DisassemblyEditorManager();
- EvaluationContextManager.startup();
CDebugCorePlugin.getDefault().addCBreakpointListener( CBreakpointUpdater.getInstance() );
// Register the CDI backend for DSF's disassembly view
Platform.getAdapterManager().registerAdapters(new DisassemblyBackendCdiFactory(), ICDebugElement.class);
- // We contribute actions to the platform's Variables view with a
- // criteria to enable only when this plugin is loaded. This can lead to
- // some edge cases with broken behavior (273306). The solution is to
- // force a selection change notification after we get loaded.
- WorkbenchJob wjob = new WorkbenchJob("CDT Variable view action updater") { //$NON-NLS-1$
+ WorkbenchJob wjob = new WorkbenchJob("Initializing CDT Debug UI") { //$NON-NLS-1$
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- for (IWorkbenchWindow window : windows) {
- IWorkbenchPage[] pages = window.getPages();
- for (IWorkbenchPage page : pages) {
- IViewReference viewRef = page.findViewReference(IDebugUIConstants.ID_VARIABLE_VIEW);
- if (viewRef != null) {
- IViewPart part = viewRef.getView(false);
- if (part instanceof IDebugView) {
- Viewer viewer = ((IDebugView)part).getViewer();
- if (viewer != null) {
- viewer.setSelection(viewer.getSelection());
- }
- }
- }
- }
- }
+ startupInUIThread();
return Status.OK_STATUS;
}
};
wjob.schedule();
}
+ private void startupInUIThread() {
+ EvaluationContextManager.startup();
+ ViewIDCounterManager.getInstance().init();
+
+ // We contribute actions to the platform's Variables view with a
+ // criteria to enable only when this plugin is loaded. This can lead to
+ // some edge cases with broken behavior (273306). The solution is to
+ // force a selection change notification after we get loaded.
+ IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
+ for (IWorkbenchWindow window : windows) {
+ IWorkbenchPage[] pages = window.getPages();
+ for (IWorkbenchPage page : pages) {
+ IViewReference viewRef = page.findViewReference(IDebugUIConstants.ID_VARIABLE_VIEW);
+ if (viewRef != null) {
+ IViewPart part = viewRef.getView(false);
+ if (part instanceof IDebugView) {
+ Viewer viewer = ((IDebugView)part).getViewer();
+ if (viewer != null) {
+ viewer.setSelection(viewer.getSelection());
+ }
+ }
+ }
+ }
+ }
+ }
+
/*
* (non-Javadoc)
*

Back to the top