mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Support for the "Skip All Breakpoints" action.
This commit is contained in:
parent
c839041374
commit
e37b85c532
2 changed files with 38 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2004-05-28 Mikhail Khodjaiants
|
||||||
|
Support for the "Skip All Breakpoints" action.
|
||||||
|
* CBreakpointManager.java
|
||||||
|
|
||||||
2004-05-27 Mikhail Khodjaiants
|
2004-05-27 Mikhail Khodjaiants
|
||||||
Display global variables in the Variables view.
|
Display global variables in the Variables view.
|
||||||
* CDIDebugModel.java
|
* CDIDebugModel.java
|
||||||
|
|
|
@ -48,6 +48,8 @@ import org.eclipse.core.runtime.IAdaptable;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.debug.core.DebugException;
|
import org.eclipse.debug.core.DebugException;
|
||||||
|
import org.eclipse.debug.core.DebugPlugin;
|
||||||
|
import org.eclipse.debug.core.IBreakpointManagerListener;
|
||||||
import org.eclipse.debug.core.model.IBreakpoint;
|
import org.eclipse.debug.core.model.IBreakpoint;
|
||||||
import org.eclipse.debug.core.model.IDebugTarget;
|
import org.eclipse.debug.core.model.IDebugTarget;
|
||||||
import org.eclipse.debug.core.model.ISourceLocator;
|
import org.eclipse.debug.core.model.ISourceLocator;
|
||||||
|
@ -56,7 +58,7 @@ import org.eclipse.debug.core.model.ISourceLocator;
|
||||||
* The breakpoint manager manages all breakpoints set to the associated
|
* The breakpoint manager manages all breakpoints set to the associated
|
||||||
* debug target.
|
* debug target.
|
||||||
*/
|
*/
|
||||||
public class CBreakpointManager implements ICDIEventListener, IAdaptable {
|
public class CBreakpointManager implements IBreakpointManagerListener, ICDIEventListener, IAdaptable {
|
||||||
|
|
||||||
private class BreakpointMap {
|
private class BreakpointMap {
|
||||||
|
|
||||||
|
@ -128,6 +130,7 @@ public class CBreakpointManager implements ICDIEventListener, IAdaptable {
|
||||||
super();
|
super();
|
||||||
setDebugTarget( target );
|
setDebugTarget( target );
|
||||||
fMap = new BreakpointMap();
|
fMap = new BreakpointMap();
|
||||||
|
DebugPlugin.getDefault().getBreakpointManager().addBreakpointManagerListener( this );
|
||||||
getDebugTarget().getCDISession().getEventManager().addEventListener( this );
|
getDebugTarget().getCDISession().getEventManager().addEventListener( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,6 +170,7 @@ public class CBreakpointManager implements ICDIEventListener, IAdaptable {
|
||||||
|
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
getDebugTarget().getCDISession().getEventManager().removeEventListener( this );
|
getDebugTarget().getCDISession().getEventManager().removeEventListener( this );
|
||||||
|
DebugPlugin.getDefault().getBreakpointManager().removeBreakpointManagerListener( this );
|
||||||
removeAllBreakpoints();
|
removeAllBreakpoints();
|
||||||
getBreakpointMap().dispose();
|
getBreakpointMap().dispose();
|
||||||
}
|
}
|
||||||
|
@ -392,10 +396,17 @@ public class CBreakpointManager implements ICDIEventListener, IAdaptable {
|
||||||
if ( breakpoint != null ) {
|
if ( breakpoint != null ) {
|
||||||
Map map = new HashMap( 3 );
|
Map map = new HashMap( 3 );
|
||||||
try {
|
try {
|
||||||
|
if ( DebugPlugin.getDefault().getBreakpointManager().isEnabled() ) {
|
||||||
map.put( IBreakpoint.ENABLED, new Boolean( cdiBreakpoint.isEnabled() ) );
|
map.put( IBreakpoint.ENABLED, new Boolean( cdiBreakpoint.isEnabled() ) );
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
map.put( IBreakpoint.ENABLED, new Boolean( breakpoint.isEnabled() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
catch( CDIException e ) {
|
catch( CDIException e ) {
|
||||||
}
|
}
|
||||||
|
catch( CoreException e ) {
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
map.put( ICBreakpoint.IGNORE_COUNT, new Integer( cdiBreakpoint.getCondition().getIgnoreCount() ) );
|
map.put( ICBreakpoint.IGNORE_COUNT, new Integer( cdiBreakpoint.getCondition().getIgnoreCount() ) );
|
||||||
}
|
}
|
||||||
|
@ -615,4 +626,25 @@ public class CBreakpointManager implements ICDIEventListener, IAdaptable {
|
||||||
private boolean isEmpty( String str ) {
|
private boolean isEmpty( String str ) {
|
||||||
return !( str != null && str.trim().length() > 0 );
|
return !( str != null && str.trim().length() > 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.debug.core.IBreakpointManagerListener#breakpointManagerEnablementChanged(boolean)
|
||||||
|
*/
|
||||||
|
public void breakpointManagerEnablementChanged( boolean enabled ) {
|
||||||
|
ICBreakpoint[] cBreakpoints = getBreakpointMap().getAllCBreakpoints();
|
||||||
|
for ( int i = 0; i < cBreakpoints.length; ++i ) {
|
||||||
|
try {
|
||||||
|
if ( cBreakpoints[i].isEnabled() ) {
|
||||||
|
ICDIBreakpoint cdiBreakpoint = getBreakpointMap().getCDIBreakpoint( cBreakpoints[i] );
|
||||||
|
if ( cdiBreakpoint != null ) {
|
||||||
|
cdiBreakpoint.setEnabled( enabled );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch( CoreException e ) {
|
||||||
|
}
|
||||||
|
catch( CDIException e ) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue