mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Bug 334651 - Deadlock reported during startup of cdt.debug.ui
This commit is contained in:
parent
3995cfd1a6
commit
a5c5b5ff16
1 changed files with 29 additions and 24 deletions
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -289,43 +289,48 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
|
||||||
@Override
|
@Override
|
||||||
public void start( BundleContext context ) throws Exception {
|
public void start( BundleContext context ) throws Exception {
|
||||||
super.start( context );
|
super.start( context );
|
||||||
ViewIDCounterManager.getInstance().init();
|
|
||||||
fDisassemblyEditorManager = new DisassemblyEditorManager();
|
fDisassemblyEditorManager = new DisassemblyEditorManager();
|
||||||
EvaluationContextManager.startup();
|
|
||||||
CDebugCorePlugin.getDefault().addCBreakpointListener( CBreakpointUpdater.getInstance() );
|
CDebugCorePlugin.getDefault().addCBreakpointListener( CBreakpointUpdater.getInstance() );
|
||||||
|
|
||||||
// Register the CDI backend for DSF's disassembly view
|
// Register the CDI backend for DSF's disassembly view
|
||||||
Platform.getAdapterManager().registerAdapters(new DisassemblyBackendCdiFactory(), ICDebugElement.class);
|
Platform.getAdapterManager().registerAdapters(new DisassemblyBackendCdiFactory(), ICDebugElement.class);
|
||||||
|
|
||||||
// We contribute actions to the platform's Variables view with a
|
WorkbenchJob wjob = new WorkbenchJob("Initializing CDT Debug UI") { //$NON-NLS-1$
|
||||||
// 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$
|
|
||||||
@Override
|
@Override
|
||||||
public IStatus runInUIThread(IProgressMonitor monitor) {
|
public IStatus runInUIThread(IProgressMonitor monitor) {
|
||||||
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
startupInUIThread();
|
||||||
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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
wjob.schedule();
|
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)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue