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

View file

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