mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Changes to get some performances. The array of
events is passed instead of one at a time.
This commit is contained in:
parent
8cf78bf7d7
commit
b3f004b2a3
19 changed files with 274 additions and 244 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-03-17 Alain Magloire
|
||||||
|
|
||||||
|
Changes to get some performances. The array of
|
||||||
|
events is passed instead of one at a time.
|
||||||
|
|
||||||
|
Affected files all the implement ICDIEventListener
|
||||||
|
to many to enumerate.
|
||||||
|
|
||||||
2004-03-16 Alain Magloire
|
2004-03-16 Alain Magloire
|
||||||
|
|
||||||
Make this class extends ICDIEventListener
|
Make this class extends ICDIEventListener
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.core;
|
package org.eclipse.cdt.debug.core;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.CModelException;
|
import org.eclipse.cdt.core.model.CModelException;
|
||||||
|
@ -17,6 +16,7 @@ import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIConfiguration;
|
import org.eclipse.cdt.debug.core.cdi.ICDIConfiguration;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
|
||||||
import org.eclipse.cdt.debug.core.cdi.event.ICDISuspendedEvent;
|
import org.eclipse.cdt.debug.core.cdi.event.ICDISuspendedEvent;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
|
||||||
|
@ -194,20 +194,23 @@ public class CDebugModel
|
||||||
throw new DebugException( e.getStatus() );
|
throw new DebugException( e.getStatus() );
|
||||||
}
|
}
|
||||||
|
|
||||||
((CDebugTarget)target[0]).handleDebugEvent( new ICDISuspendedEvent()
|
ICDIEvent[] events = new ICDIEvent[]
|
||||||
{
|
{
|
||||||
public ICDISessionObject getReason()
|
new ICDISuspendedEvent()
|
||||||
{
|
{
|
||||||
return null;
|
public ICDISessionObject getReason()
|
||||||
}
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public ICDIObject getSource()
|
public ICDIObject getSource()
|
||||||
{
|
{
|
||||||
return cdiTarget;
|
return cdiTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
((CDebugTarget)target[0]).handleDebugEvents( events );
|
||||||
return target[0];
|
return target[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,19 +243,23 @@ public class CDebugModel
|
||||||
throw new DebugException( e.getStatus() );
|
throw new DebugException( e.getStatus() );
|
||||||
}
|
}
|
||||||
|
|
||||||
((CDebugTarget)target[0]).handleDebugEvent( new ICDISuspendedEvent()
|
ICDIEvent[] events = new ICDIEvent[]
|
||||||
{
|
{
|
||||||
public ICDISessionObject getReason()
|
new ICDISuspendedEvent()
|
||||||
{
|
{
|
||||||
return null;
|
public ICDISessionObject getReason()
|
||||||
}
|
{
|
||||||
|
return null;
|
||||||
public ICDIObject getSource()
|
}
|
||||||
{
|
|
||||||
return cdiTarget;
|
|
||||||
}
|
|
||||||
|
|
||||||
} );
|
public ICDIObject getSource()
|
||||||
|
{
|
||||||
|
return cdiTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
((CDebugTarget)target[0]).handleDebugEvents( events );
|
||||||
|
|
||||||
return target[0];
|
return target[0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
package org.eclipse.cdt.debug.core;
|
package org.eclipse.cdt.debug.core;
|
||||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) Copyright QNX Software System 2002.
|
* (c) Copyright QNX Software System 2002.
|
||||||
|
|
|
@ -19,5 +19,5 @@ public interface ICDIEventListener {
|
||||||
*
|
*
|
||||||
* @param event - the event
|
* @param event - the event
|
||||||
*/
|
*/
|
||||||
void handleDebugEvent( ICDIEvent event );
|
void handleDebugEvents(ICDIEvent[] event);
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,27 +187,31 @@ public class CBreakpointManager implements ICBreakpointManager, ICDIEventListene
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
ICDIObject source = event.getSource();
|
for (int i = 0; i < events.length; i++)
|
||||||
if ( source != null && source.getTarget().equals( getDebugTarget().getCDITarget() ) )
|
|
||||||
{
|
{
|
||||||
if ( event instanceof ICDICreatedEvent )
|
ICDIEvent event = events[i];
|
||||||
|
ICDIObject source = event.getSource();
|
||||||
|
if ( source != null && source.getTarget().equals( getDebugTarget().getCDITarget() ) )
|
||||||
{
|
{
|
||||||
if ( source instanceof ICDIBreakpoint )
|
if ( event instanceof ICDICreatedEvent )
|
||||||
handleBreakpointCreatedEvent( (ICDIBreakpoint)source );
|
{
|
||||||
}
|
if ( source instanceof ICDIBreakpoint )
|
||||||
else if ( event instanceof ICDIDestroyedEvent )
|
handleBreakpointCreatedEvent( (ICDIBreakpoint)source );
|
||||||
{
|
}
|
||||||
if ( source instanceof ICDIBreakpoint )
|
else if ( event instanceof ICDIDestroyedEvent )
|
||||||
handleBreakpointDestroyedEvent( (ICDIBreakpoint)source );
|
{
|
||||||
}
|
if ( source instanceof ICDIBreakpoint )
|
||||||
else if ( event instanceof ICDIChangedEvent )
|
handleBreakpointDestroyedEvent( (ICDIBreakpoint)source );
|
||||||
{
|
}
|
||||||
if ( source instanceof ICDIBreakpoint )
|
else if ( event instanceof ICDIChangedEvent )
|
||||||
handleBreakpointChangedEvent( (ICDIBreakpoint)source );
|
{
|
||||||
|
if ( source instanceof ICDIBreakpoint )
|
||||||
|
handleBreakpointChangedEvent( (ICDIBreakpoint)source );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ import org.eclipse.cdt.debug.core.ICDebugger;
|
||||||
import org.eclipse.core.boot.BootLoader;
|
import org.eclipse.core.boot.BootLoader;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
|
||||||
|
|
||||||
public class DebugConfiguration implements ICDebugConfiguration {
|
public class DebugConfiguration implements ICDebugConfiguration {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -85,9 +85,9 @@ public class CArrayPartition extends CVariable
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -675,9 +675,10 @@ public class CDebugTarget extends CDebugElement
|
||||||
protected void suspendThreads( ICDISuspendedEvent event )
|
protected void suspendThreads( ICDISuspendedEvent event )
|
||||||
{
|
{
|
||||||
Iterator it = getThreadList().iterator();
|
Iterator it = getThreadList().iterator();
|
||||||
|
ICDIEvent[] events = new ICDIEvent[] {event};
|
||||||
while( it.hasNext() )
|
while( it.hasNext() )
|
||||||
{
|
{
|
||||||
((CThread)it.next()).handleDebugEvent( event );
|
((CThread)it.next()).handleDebugEvents( events );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1002,87 +1003,91 @@ public class CDebugTarget extends CDebugElement
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
ICDIObject source = event.getSource();
|
for (int i = 0; i < events.length; i++)
|
||||||
if ( source == null && event instanceof ICDIDestroyedEvent )
|
|
||||||
{
|
{
|
||||||
handleTerminatedEvent( (ICDIDestroyedEvent)event );
|
ICDIEvent event = events[i];
|
||||||
}
|
ICDIObject source = event.getSource();
|
||||||
else if ( source.getTarget().equals( getCDITarget() ) )
|
if ( source == null && event instanceof ICDIDestroyedEvent )
|
||||||
{
|
|
||||||
if ( event instanceof ICDICreatedEvent )
|
|
||||||
{
|
{
|
||||||
if ( source instanceof ICDIThread )
|
handleTerminatedEvent( (ICDIDestroyedEvent)event );
|
||||||
{
|
|
||||||
handleThreadCreatedEvent( (ICDICreatedEvent)event );
|
|
||||||
}
|
|
||||||
if ( source instanceof ICDISharedLibrary )
|
|
||||||
{
|
|
||||||
getSharedLibraryManager().sharedLibraryLoaded( (ICDISharedLibrary)source );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ( event instanceof ICDISuspendedEvent )
|
else if ( source.getTarget().equals( getCDITarget() ) )
|
||||||
{
|
{
|
||||||
if ( source instanceof ICDITarget || source instanceof ICDIThread )
|
if ( event instanceof ICDICreatedEvent )
|
||||||
{
|
{
|
||||||
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
if ( source instanceof ICDIThread )
|
||||||
|
{
|
||||||
|
handleThreadCreatedEvent( (ICDICreatedEvent)event );
|
||||||
|
}
|
||||||
|
if ( source instanceof ICDISharedLibrary )
|
||||||
|
{
|
||||||
|
getSharedLibraryManager().sharedLibraryLoaded( (ICDISharedLibrary)source );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDISuspendedEvent )
|
||||||
else if ( event instanceof ICDIResumedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDITarget )
|
|
||||||
{
|
{
|
||||||
handleResumedEvent( (ICDIResumedEvent)event );
|
if ( source instanceof ICDITarget || source instanceof ICDIThread )
|
||||||
|
{
|
||||||
|
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIResumedEvent )
|
||||||
else if ( event instanceof ICDIExitedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDITarget )
|
|
||||||
{
|
{
|
||||||
handleExitedEvent( (ICDIExitedEvent)event );
|
if ( source instanceof ICDITarget )
|
||||||
|
{
|
||||||
|
handleResumedEvent( (ICDIResumedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIExitedEvent )
|
||||||
else if ( event instanceof ICDIDestroyedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDIThread )
|
|
||||||
{
|
{
|
||||||
handleThreadTerminatedEvent( (ICDIDestroyedEvent)event );
|
if ( source instanceof ICDITarget )
|
||||||
|
{
|
||||||
|
handleExitedEvent( (ICDIExitedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( source instanceof ICDISharedLibrary )
|
else if ( event instanceof ICDIDestroyedEvent )
|
||||||
{
|
{
|
||||||
getSharedLibraryManager().sharedLibraryUnloaded( (ICDISharedLibrary)source );
|
if ( source instanceof ICDIThread )
|
||||||
|
{
|
||||||
|
handleThreadTerminatedEvent( (ICDIDestroyedEvent)event );
|
||||||
|
}
|
||||||
|
if ( source instanceof ICDISharedLibrary )
|
||||||
|
{
|
||||||
|
getSharedLibraryManager().sharedLibraryUnloaded( (ICDISharedLibrary)source );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIDisconnectedEvent )
|
||||||
else if ( event instanceof ICDIDisconnectedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDITarget )
|
|
||||||
{
|
{
|
||||||
handleDisconnectedEvent( (ICDIDisconnectedEvent)event );
|
if ( source instanceof ICDITarget )
|
||||||
|
{
|
||||||
|
handleDisconnectedEvent( (ICDIDisconnectedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIChangedEvent )
|
||||||
else if ( event instanceof ICDIChangedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDITarget )
|
|
||||||
{
|
{
|
||||||
handleChangedEvent( (ICDIChangedEvent)event );
|
if ( source instanceof ICDITarget )
|
||||||
|
{
|
||||||
|
handleChangedEvent( (ICDIChangedEvent)event );
|
||||||
|
}
|
||||||
|
if ( source instanceof ICDISharedLibrary )
|
||||||
|
{
|
||||||
|
getSharedLibraryManager().symbolsLoaded( (ICDISharedLibrary)source );
|
||||||
|
}
|
||||||
|
if ( source instanceof ICDISignal )
|
||||||
|
{
|
||||||
|
getSignalManager().signalChanged( (ICDISignal)source );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( source instanceof ICDISharedLibrary )
|
else if ( event instanceof ICDIRestartedEvent )
|
||||||
{
|
{
|
||||||
getSharedLibraryManager().symbolsLoaded( (ICDISharedLibrary)source );
|
if ( source instanceof ICDITarget )
|
||||||
}
|
{
|
||||||
if ( source instanceof ICDISignal )
|
handleRestartedEvent( (ICDIRestartedEvent)event );
|
||||||
{
|
}
|
||||||
getSignalManager().signalChanged( (ICDISignal)source );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ( event instanceof ICDIRestartedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDITarget )
|
|
||||||
{
|
|
||||||
handleRestartedEvent( (ICDIRestartedEvent)event );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1318,7 +1323,8 @@ public class CDebugTarget extends CDebugElement
|
||||||
CThread thread = findThread( (ICDIThread)event.getSource() );
|
CThread thread = findThread( (ICDIThread)event.getSource() );
|
||||||
if ( thread != null && newThreads.contains( thread ) )
|
if ( thread != null && newThreads.contains( thread ) )
|
||||||
{
|
{
|
||||||
thread.handleDebugEvent( event );
|
ICDIEvent[] evts = new ICDIEvent[]{event};
|
||||||
|
thread.handleDebugEvents( evts );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( reason instanceof ICDIEndSteppingRange )
|
if ( reason instanceof ICDIEndSteppingRange )
|
||||||
|
|
|
@ -89,25 +89,30 @@ public class CExpression extends CModificationVariable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
if ( event instanceof ICDIResumedEvent )
|
for (int i = 0; i < events.length; i++)
|
||||||
{
|
{
|
||||||
if ( event.getSource() instanceof ICDITarget && getCDITarget().equals( event.getSource() ) )
|
ICDIEvent event = events[i];
|
||||||
|
if ( event instanceof ICDIResumedEvent )
|
||||||
{
|
{
|
||||||
try
|
if ( event.getSource() instanceof ICDITarget && getCDITarget().equals( event.getSource() ) )
|
||||||
{
|
{
|
||||||
setChanged( false );
|
try
|
||||||
}
|
{
|
||||||
catch( DebugException e )
|
setChanged( false );
|
||||||
{
|
}
|
||||||
CDebugCorePlugin.log( e );
|
catch( DebugException e )
|
||||||
|
{
|
||||||
|
CDebugCorePlugin.log( e );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.handleDebugEvent(event);
|
super.handleDebugEvents(events);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -422,42 +422,46 @@ public class CFormattedMemoryBlock extends CDebugElement
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
ICDIObject source = event.getSource();
|
for (int i = 0; i < events.length; i++)
|
||||||
if (source == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( source.getTarget().equals( getCDITarget() ) )
|
|
||||||
{
|
{
|
||||||
if ( event instanceof ICDIResumedEvent )
|
ICDIEvent event = events[i];
|
||||||
|
ICDIObject source = event.getSource();
|
||||||
|
if (source == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ( source.getTarget().equals( getCDITarget() ) )
|
||||||
{
|
{
|
||||||
if ( source instanceof ICDITarget )
|
if ( event instanceof ICDIResumedEvent )
|
||||||
{
|
{
|
||||||
handleResumedEvent( (ICDIResumedEvent)event );
|
if ( source instanceof ICDITarget )
|
||||||
|
{
|
||||||
|
handleResumedEvent( (ICDIResumedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIMemoryChangedEvent )
|
||||||
else if ( event instanceof ICDIMemoryChangedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDIMemoryBlock && source.equals( getCDIMemoryBlock() ) )
|
|
||||||
{
|
{
|
||||||
handleChangedEvent( (ICDIMemoryChangedEvent)event );
|
if ( source instanceof ICDIMemoryBlock && source.equals( getCDIMemoryBlock() ) )
|
||||||
|
{
|
||||||
|
handleChangedEvent( (ICDIMemoryChangedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIChangedEvent )
|
||||||
else if ( event instanceof ICDIChangedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDIExpression && source.equals( fAddressExpression ) )
|
|
||||||
{
|
{
|
||||||
handleAddressChangedEvent( (ICDIChangedEvent)event );
|
if ( source instanceof ICDIExpression && source.equals( fAddressExpression ) )
|
||||||
|
{
|
||||||
|
handleAddressChangedEvent( (ICDIChangedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIDestroyedEvent )
|
||||||
else if ( event instanceof ICDIDestroyedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDIExpression && source.equals( fAddressExpression ) )
|
|
||||||
{
|
{
|
||||||
handleDestroyedEvent( (ICDIDestroyedEvent)event );
|
if ( source instanceof ICDIExpression && source.equals( fAddressExpression ) )
|
||||||
|
{
|
||||||
|
handleDestroyedEvent( (ICDIDestroyedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,27 +62,30 @@ public class CGlobalVariable extends CModificationVariable
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
super.handleDebugEvent( event );
|
super.handleDebugEvents( events );
|
||||||
|
for (int i = 0; i < events.length; i++)
|
||||||
ICDIObject source = event.getSource();
|
|
||||||
if (source == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( source.getTarget().equals( getCDITarget() ) )
|
|
||||||
{
|
{
|
||||||
if ( event instanceof ICDIResumedEvent )
|
ICDIEvent event = events[i];
|
||||||
|
ICDIObject source = event.getSource();
|
||||||
|
if (source == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ( source.getTarget().equals( getCDITarget() ) )
|
||||||
{
|
{
|
||||||
try
|
if ( event instanceof ICDIResumedEvent )
|
||||||
{
|
{
|
||||||
setChanged( false );
|
try
|
||||||
}
|
{
|
||||||
catch( DebugException e )
|
setChanged( false );
|
||||||
{
|
}
|
||||||
CDebugCorePlugin.log( e );
|
catch( DebugException e )
|
||||||
|
{
|
||||||
|
CDebugCorePlugin.log( e );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,9 +104,9 @@ public class CSharedLibrary extends CDebugElement
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,9 +81,9 @@ public class CSignal extends CDebugElement implements ICSignal, ICDIEventListene
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -245,9 +245,9 @@ public class CStackFrame extends CDebugElement
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -418,52 +418,56 @@ public class CThread extends CDebugElement
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
if ( isDisposed() )
|
if ( isDisposed() )
|
||||||
return;
|
return;
|
||||||
ICDIObject source = event.getSource();
|
for (int i = 0; i < events.length; i++)
|
||||||
if ( source == null )
|
|
||||||
return;
|
|
||||||
if ( source.getTarget().equals( getCDITarget() ) )
|
|
||||||
{
|
{
|
||||||
if ( event instanceof ICDISuspendedEvent )
|
ICDIEvent event = events[i];
|
||||||
|
ICDIObject source = event.getSource();
|
||||||
|
if ( source == null )
|
||||||
|
continue;
|
||||||
|
if ( source.getTarget().equals( getCDITarget() ) )
|
||||||
{
|
{
|
||||||
if ( ( source instanceof ICDIThread && getCDIThread().equals( (ICDIThread)source ) ) ||
|
if ( event instanceof ICDISuspendedEvent )
|
||||||
source instanceof ICDITarget )
|
|
||||||
{
|
{
|
||||||
// if ( !(((ICDISuspendedEvent)event).getReason() instanceof ICDISharedLibraryEvent && applyDeferredBreakpoints()) )
|
if ( ( source instanceof ICDIThread && getCDIThread().equals( (ICDIThread)source ) ) ||
|
||||||
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
source instanceof ICDITarget )
|
||||||
|
{
|
||||||
|
// if ( !(((ICDISuspendedEvent)event).getReason() instanceof ICDISharedLibraryEvent && applyDeferredBreakpoints()) )
|
||||||
|
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIResumedEvent )
|
||||||
else if ( event instanceof ICDIResumedEvent )
|
|
||||||
{
|
|
||||||
if ( ( source instanceof ICDIThread && source.equals( getCDIThread() ) ) )
|
|
||||||
{
|
{
|
||||||
handleResumedEvent( (ICDIResumedEvent)event );
|
if ( ( source instanceof ICDIThread && source.equals( getCDIThread() ) ) )
|
||||||
|
{
|
||||||
|
handleResumedEvent( (ICDIResumedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIDestroyedEvent )
|
||||||
else if ( event instanceof ICDIDestroyedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDIThread )
|
|
||||||
{
|
{
|
||||||
handleTerminatedEvent( (ICDIDestroyedEvent)event );
|
if ( source instanceof ICDIThread )
|
||||||
|
{
|
||||||
|
handleTerminatedEvent( (ICDIDestroyedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIDisconnectedEvent )
|
||||||
else if ( event instanceof ICDIDisconnectedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDIThread )
|
|
||||||
{
|
{
|
||||||
handleDisconnectedEvent( (ICDIDisconnectedEvent)event );
|
if ( source instanceof ICDIThread )
|
||||||
|
{
|
||||||
|
handleDisconnectedEvent( (ICDIDisconnectedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIChangedEvent )
|
||||||
else if ( event instanceof ICDIChangedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDIThread )
|
|
||||||
{
|
{
|
||||||
handleChangedEvent( (ICDIChangedEvent)event );
|
if ( source instanceof ICDIThread )
|
||||||
|
{
|
||||||
|
handleChangedEvent( (ICDIChangedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
*/
|
*/
|
||||||
package org.eclipse.cdt.debug.internal.core.model;
|
package org.eclipse.cdt.debug.internal.core.model;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
|
@ -581,33 +580,37 @@ public abstract class CVariable extends CDebugElement
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(ICDIEvent)
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent( ICDIEvent event )
|
public void handleDebugEvents( ICDIEvent[] events )
|
||||||
{
|
{
|
||||||
ICDIObject source = event.getSource();
|
for (int i = 0; i < events.length; i++)
|
||||||
if (source == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( source.getTarget().equals( getCDITarget() ) )
|
|
||||||
{
|
{
|
||||||
if ( event instanceof ICDIChangedEvent )
|
ICDIEvent event = events[i];
|
||||||
|
ICDIObject source = event.getSource();
|
||||||
|
if (source == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ( source.getTarget().equals( getCDITarget() ) )
|
||||||
{
|
{
|
||||||
if ( source instanceof ICDIVariable && isSameVariable( (ICDIVariable)source ) )
|
if ( event instanceof ICDIChangedEvent )
|
||||||
{
|
{
|
||||||
handleChangedEvent( (ICDIChangedEvent)event );
|
if ( source instanceof ICDIVariable && isSameVariable( (ICDIVariable)source ) )
|
||||||
|
{
|
||||||
|
handleChangedEvent( (ICDIChangedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ( event instanceof ICDIDestroyedEvent )
|
||||||
else if ( event instanceof ICDIDestroyedEvent )
|
|
||||||
{
|
|
||||||
if ( source instanceof ICDIVariable && isSameVariable( (ICDIVariable)source ) )
|
|
||||||
{
|
{
|
||||||
handleDestroyedEvent( (ICDIDestroyedEvent)event );
|
if ( source instanceof ICDIVariable && isSameVariable( (ICDIVariable)source ) )
|
||||||
|
{
|
||||||
|
handleDestroyedEvent( (ICDIDestroyedEvent)event );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( event instanceof ICDIResumedEvent )
|
||||||
|
{
|
||||||
|
handleResumedEvent( (ICDIResumedEvent)event );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if ( event instanceof ICDIResumedEvent )
|
|
||||||
{
|
|
||||||
handleResumedEvent( (ICDIResumedEvent)event );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
2004-03-17 Alain Magloire
|
||||||
|
|
||||||
|
Changes pass the array of events instead
|
||||||
|
of one at a time
|
||||||
|
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/Manager.java
|
||||||
|
|
||||||
2004-03-16 Tanya Wolff
|
2004-03-16 Tanya Wolff
|
||||||
|
|
||||||
Marked strings in src as non-translatable
|
Marked strings in src as non-translatable
|
||||||
|
|
|
@ -234,23 +234,11 @@ public class EventManager extends SessionObject implements ICDIEventManager, Obs
|
||||||
* Send ICDIEvent to the listeners.
|
* Send ICDIEvent to the listeners.
|
||||||
*/
|
*/
|
||||||
private void fireEvents(ICDIEvent[] cdiEvents) {
|
private void fireEvents(ICDIEvent[] cdiEvents) {
|
||||||
if (cdiEvents != null) {
|
if (cdiEvents != null && cdiEvents.length > 0) {
|
||||||
for (int i = 0; i < cdiEvents.length; i++) {
|
ICDIEventListener[] listeners = (ICDIEventListener[])list.toArray(new ICDIEventListener[0]);
|
||||||
fireEvent(cdiEvents[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Send ICDIEvent to the listeners.
|
|
||||||
*/
|
|
||||||
private void fireEvent(ICDIEvent cdiEvent) {
|
|
||||||
if (cdiEvent != null) {
|
|
||||||
ICDIEventListener[] listeners =
|
|
||||||
(ICDIEventListener[])list.toArray(new ICDIEventListener[0]);
|
|
||||||
for (int i = 0; i < listeners.length; i++) {
|
for (int i = 0; i < listeners.length; i++) {
|
||||||
listeners[i].handleDebugEvent(cdiEvent);
|
listeners[i].handleDebugEvents(cdiEvents);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,17 +48,9 @@ public abstract class Manager extends SessionObject implements ICDIManager {
|
||||||
public abstract void update() throws CDIException;
|
public abstract void update() throws CDIException;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
|
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
|
||||||
*/
|
*/
|
||||||
public void handleDebugEvent(ICDIEvent[] events) {
|
public void handleDebugEvents(ICDIEvent[] events) {
|
||||||
for (int i = 0; i < events.length; i++) {
|
|
||||||
handleDebugEvent(events[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent)
|
|
||||||
*/
|
|
||||||
public void handleDebugEvent(ICDIEvent event) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue