1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 19:35:36 +02:00

Undo the changes bcause the 'asyncExec' method has added since 2.1.

This commit is contained in:
Mikhail Khodjaiants 2003-02-13 16:34:55 +00:00
parent 7e268c08d5
commit 2b6e616826
5 changed files with 53 additions and 3 deletions

View file

@ -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 2003-02-13 Mikhail Khodjaiants
Use the 'asyncExec' method of the 'DebugPlugin' class. Use the 'asyncExec' method of the 'DebugPlugin' class.
* IAsyncExecutor.java: removed * IAsyncExecutor.java: removed

View file

@ -39,6 +39,8 @@ public class CDebugCorePlugin extends Plugin
private HashMap fDebugConfigurations; private HashMap fDebugConfigurations;
private IAsyncExecutor fAsyncExecutor = null;
/** /**
* The constructor. * The constructor.
*/ */
@ -199,9 +201,15 @@ public class CDebugCorePlugin extends Plugin
} }
} }
} }
public void setAsyncExecutor( IAsyncExecutor executor )
{
fAsyncExecutor = executor;
}
public void asyncExec( Runnable runnable ) public void asyncExec( Runnable runnable )
{ {
DebugPlugin.getDefault().asyncExec( runnable ); if ( fAsyncExecutor != null )
fAsyncExecutor.asyncExec( runnable );
} }
} }

View file

@ -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 );
}

View file

@ -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 2003-02-13 Mikhail Khodjaiants
Use the 'asyncExec' method of the 'DebugPlugin' class. Use the 'asyncExec' method of the 'DebugPlugin' class.
* CDebugUIPlugin.java * CDebugUIPlugin.java

View file

@ -5,6 +5,8 @@ import java.util.Map;
import java.util.MissingResourceException; import java.util.MissingResourceException;
import java.util.ResourceBundle; 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.ISwitchToFrame;
import org.eclipse.cdt.debug.core.model.ISwitchToThread; import org.eclipse.cdt.debug.core.model.ISwitchToThread;
import org.eclipse.cdt.debug.core.sourcelookup.IDisassemblyStorage; import org.eclipse.cdt.debug.core.sourcelookup.IDisassemblyStorage;
@ -58,7 +60,8 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
*/ */
public class CDebugUIPlugin extends AbstractUIPlugin public class CDebugUIPlugin extends AbstractUIPlugin
implements ISelectionListener, implements ISelectionListener,
IDebugEventSetListener IDebugEventSetListener,
IAsyncExecutor
{ {
//The shared instance. //The shared instance.
private static CDebugUIPlugin plugin; private static CDebugUIPlugin plugin;
@ -317,6 +320,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin
{ {
fImageDescriptorRegistry.dispose(); fImageDescriptorRegistry.dispose();
} }
CDebugCorePlugin.getDefault().setAsyncExecutor( null );
super.shutdown(); super.shutdown();
} }
@ -331,6 +335,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin
{ {
ww.getSelectionService().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this ); ww.getSelectionService().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
} }
CDebugCorePlugin.getDefault().setAsyncExecutor( this );
DebugPlugin.getDefault().addDebugEventListener( this ); DebugPlugin.getDefault().addDebugEventListener( this );
} }
@ -480,4 +485,16 @@ public class CDebugUIPlugin extends AbstractUIPlugin
fDisassemblyDocumentProvider = new DisassemblyDocumentProvider(); fDisassemblyDocumentProvider = new DisassemblyDocumentProvider();
return fDisassemblyDocumentProvider; 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 );
}
}
} }