1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-17 13:15:44 +02:00

The "decrementInstallCount" method of IBreakpoint should be called from the UI thread.

Replaced the "breakpointRemoved" method of ICBreakpointListener by the "breakpointsRemoved" method that accepts multiple breakpoints.
This commit is contained in:
Mikhail Khodjaiants 2004-11-25 18:23:38 +00:00
parent a149a4fbe0
commit 4a5818a220
4 changed files with 20 additions and 26 deletions

View file

@ -1,3 +1,11 @@
2004-11-25 Mikhail Khodjaiants
The "decrementInstallCount" method of IBreakpoint should be called from the UI thread.
Replaced the "breakpointRemoved" method of ICBreakpointListener by the "breakpointsRemoved"
method that accepts multiple breakpoints.
* ICBreakpointListener.java
* CBreakpointManager.java
* CBreakpointNotifier.java
2004-11-24 Alain Magloire
Use the ICDITarget.deleteAllBreakpoints() for speed.

View file

@ -59,10 +59,10 @@ public interface ICBreakpointListener
public void breakpointChanged( IDebugTarget target, IBreakpoint breakpoint, Map attributes );
/**
* Notification that the given breakpoint has been removed from the specified target.
* Notification that the given breakpoints have been removed from the specified target.
*
* @param target debug target
* @param breakpoint breakpoint being removed
* @param breakpoints the breakpoints being removed
*/
public void breakpointRemoved( IDebugTarget target, IBreakpoint breakpoint );
public void breakpointsRemoved( IDebugTarget target, IBreakpoint[] breakpoints );
}

View file

@ -20,7 +20,6 @@ import java.util.Set;
import org.eclipse.cdt.core.IAddress;
import org.eclipse.cdt.core.IAddressFactory;
import org.eclipse.cdt.debug.core.CDIDebugModel;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.cdi.ICDICondition;
@ -460,15 +459,8 @@ public class CBreakpointManager implements IBreakpointManagerListener, ICDIEvent
}
catch( CoreException e ) {
}
getBreakpointNotifier().breakpointRemoved( getDebugTarget(), breakpoint );
}
else {
try {
breakpoint.decrementInstallCount();
}
catch( CoreException e ) {
}
}
getBreakpointNotifier().breakpointsRemoved( getDebugTarget(), new IBreakpoint[] { breakpoint } );
}
}
@ -509,17 +501,11 @@ public class CBreakpointManager implements IBreakpointManagerListener, ICDIEvent
}
catch( CDIException e ) {
// Do we care ?
CDebugCorePlugin.log( e.getMessage() );
// No, we don't.
// CDebugCorePlugin.log( e.getMessage() );
}
ICBreakpoint[] breakpoints = getBreakpointMap().getAllCBreakpoints();
for( int i = 0; i < breakpoints.length; ++i ) {
try {
((CBreakpoint)breakpoints[i]).decrementInstallCount();
}
catch( CoreException e ) {
CDebugCorePlugin.log( e.getMessage() );
}
}
getBreakpointNotifier().breakpointsRemoved( getDebugTarget(), breakpoints );
}
private void setLocationBreakpointOnTarget( final ICBreakpoint breakpoint, final ICDITarget target, final ICDILocation location, final ICDICondition condition, final boolean enabled ) {

View file

@ -70,12 +70,12 @@ public class CBreakpointNotifier implements ICBreakpointListener {
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.debug.core.ICBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IDebugTarget,
* org.eclipse.debug.core.model.IBreakpoint)
* @see org.eclipse.cdt.debug.core.ICBreakpointListener#breakpointsRemoved(org.eclipse.debug.core.model.IDebugTarget,
* org.eclipse.debug.core.model.IBreakpoint[])
*/
public void breakpointRemoved( IDebugTarget target, IBreakpoint breakpoint ) {
public void breakpointsRemoved( IDebugTarget target, IBreakpoint[] breakpoints ) {
Object[] listeners = CDebugCorePlugin.getDefault().getCBreakpointListeners();
for( int i = 0; i < listeners.length; ++i )
((ICBreakpointListener)listeners[i]).breakpointRemoved( target, breakpoint );
((ICBreakpointListener)listeners[i]).breakpointsRemoved( target, breakpoints );
}
}