diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 7b7f9ae1ad6..1c34f8cc5a6 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,8 @@ +2003-02-13 Mikhail Khodjaiants + Undo changes because the 'asyncExec' method of the 'DebugPlugin' class has added since version 2.1. + * IAsyncExecutor.java: removed + * CDebugCorePlugin.java + 2003-02-13 Mikhail Khodjaiants Use the 'asyncExec' method of the 'DebugPlugin' class. * IAsyncExecutor.java: removed diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java index d3423cf3a1d..d4318a2df7c 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java @@ -39,6 +39,8 @@ public class CDebugCorePlugin extends Plugin private HashMap fDebugConfigurations; + private IAsyncExecutor fAsyncExecutor = null; + /** * The constructor. */ @@ -199,9 +201,15 @@ public class CDebugCorePlugin extends Plugin } } } - + + public void setAsyncExecutor( IAsyncExecutor executor ) + { + fAsyncExecutor = executor; + } + public void asyncExec( Runnable runnable ) { - DebugPlugin.getDefault().asyncExec( runnable ); + if ( fAsyncExecutor != null ) + fAsyncExecutor.asyncExec( runnable ); } } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/IAsyncExecutor.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/IAsyncExecutor.java new file mode 100644 index 00000000000..e4dce2e58a3 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/IAsyncExecutor.java @@ -0,0 +1,16 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core; + +/** + * Enter type comment. + * + * @since: Jan 27, 2003 + */ +public interface IAsyncExecutor +{ + void asyncExec( Runnable runnable ); +} diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 9de8f1a164c..bf59c492f8c 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,7 @@ +2003-02-13 Mikhail Khodjaiants + Undo changes because the 'asyncExec' method of the 'DebugPlugin' class has added since version 2.1. + * CDebugUIPlugin.java + 2003-02-13 Mikhail Khodjaiants Use the 'asyncExec' method of the 'DebugPlugin' class. * CDebugUIPlugin.java 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 933133882f8..984f7cc1dfe 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 @@ -5,6 +5,8 @@ import java.util.Map; import java.util.MissingResourceException; import java.util.ResourceBundle; +import org.eclipse.cdt.debug.core.CDebugCorePlugin; +import org.eclipse.cdt.debug.core.IAsyncExecutor; import org.eclipse.cdt.debug.core.model.ISwitchToFrame; import org.eclipse.cdt.debug.core.model.ISwitchToThread; import org.eclipse.cdt.debug.core.sourcelookup.IDisassemblyStorage; @@ -58,7 +60,8 @@ import org.eclipse.ui.plugin.AbstractUIPlugin; */ public class CDebugUIPlugin extends AbstractUIPlugin implements ISelectionListener, - IDebugEventSetListener + IDebugEventSetListener, + IAsyncExecutor { //The shared instance. private static CDebugUIPlugin plugin; @@ -317,6 +320,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin { fImageDescriptorRegistry.dispose(); } + CDebugCorePlugin.getDefault().setAsyncExecutor( null ); super.shutdown(); } @@ -331,6 +335,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin { ww.getSelectionService().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this ); } + CDebugCorePlugin.getDefault().setAsyncExecutor( this ); DebugPlugin.getDefault().addDebugEventListener( this ); } @@ -480,4 +485,16 @@ public class CDebugUIPlugin extends AbstractUIPlugin fDisassemblyDocumentProvider = new DisassemblyDocumentProvider(); return fDisassemblyDocumentProvider; } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.IAsyncExecutor#asyncExec(Runnable) + */ + public void asyncExec( Runnable runnable ) + { + Display display = getStandardDisplay(); + if ( display != null ) + { + display.asyncExec( runnable ); + } + } }