diff options
author | Anton Leherbauer | 2007-05-21 07:49:06 +0000 |
---|---|---|
committer | Anton Leherbauer | 2007-05-21 07:49:06 +0000 |
commit | c29ea1ef6bd6ccebfff8cba65821455c41676ea0 (patch) | |
tree | 728389ab29f8a843f63cc4cbfe2fe87bfb9e9142 /debug | |
parent | f2b9070846b9e50b1b5d13d8a1591a51891b75e7 (diff) | |
download | org.eclipse.cdt-c29ea1ef6bd6ccebfff8cba65821455c41676ea0.tar.gz org.eclipse.cdt-c29ea1ef6bd6ccebfff8cba65821455c41676ea0.tar.xz org.eclipse.cdt-c29ea1ef6bd6ccebfff8cba65821455c41676ea0.zip |
Open annotation model for other debug models (related to bug 186396)
Diffstat (limited to 'debug')
2 files changed, 8 insertions, 11 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/DebugMarkerAnnotationModel.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/DebugMarkerAnnotationModel.java index 0519c7316bf..e7320912c2c 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/DebugMarkerAnnotationModel.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/DebugMarkerAnnotationModel.java @@ -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; } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java index 0cc32eb9755..27b81542b07 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java @@ -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$ |