1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Open annotation model for other debug models (related to bug 186396)

This commit is contained in:
Anton Leherbauer 2007-05-21 07:49:06 +00:00
parent f2b9070846
commit c29ea1ef6b
2 changed files with 8 additions and 11 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004, 2006 QNX Software Systems and others.
* Copyright (c) 2004, 2007 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -7,6 +7,7 @@
*
* Contributors:
* QNX Software Systems - Initial API and implementation
* Anton Leherbauer (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.debug.internal.ui;
@ -89,14 +90,10 @@ public class DebugMarkerAnnotationModel extends AbstractMarkerAnnotationModel im
}
private boolean isAcceptable( IBreakpoint b ) {
if ( b instanceof ICBreakpoint ) {
try {
String handle = ((ICBreakpoint)b).getSourceHandle();
File file = new File( handle );
return file.equals( getFile() );
}
catch( CoreException e ) {
}
String handle = b.getMarker().getAttribute(ICBreakpoint.SOURCE_HANDLE, null);
if (handle != null) {
File file = new File( handle );
return file.equals( getFile() );
}
return false;
}

View file

@ -38,9 +38,9 @@ public class EnableDisableBreakpointRulerAction extends AbstractBreakpointRulerA
* @see org.eclipse.jface.action.IAction#run()
*/
public void run() {
if ( getBreakpoint() != null ) {
if ( fBreakpoint != null ) {
try {
getBreakpoint().setEnabled( !getBreakpoint().isEnabled() );
fBreakpoint.setEnabled( !fBreakpoint.isEnabled() );
}
catch( CoreException e ) {
ErrorDialog.openError( getTargetPart().getSite().getShell(), ActionMessages.getString( "EnableDisableBreakpointRulerAction.Enabling_disabling_breakpoints_1" ), //$NON-NLS-1$