From 47dfe9b49cbcb10af679ff19a76bcc117d6f068b Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 30 Jun 2005 21:18:33 +0000 Subject: [PATCH] Bug 102386: double-clicking on a disassembly line in the disassembly view does not add a breakpoint. --- debug/org.eclipse.cdt.debug.ui/ChangeLog | 4 ++++ .../internal/ui/actions/ToggleBreakpointAdapter.java | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index e6fb2939f07..ced03f878a6 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,7 @@ +2005-06-30 Mikhail Khodjaiants + Bug 102386: double-clicking on a disassembly line in the disassembly view does not add a breakpoint. + * ToggleBreakpointAdapter.java + 2005-06-29 Mikhail Khodjaiants Bug 41725: I can't set a breakpoint in a function where I used attach source. Bug 45514: Breakpoints made is assembly view do not show in C view. diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java index 7ce81d2437b..d7d60d294f2 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java @@ -476,11 +476,13 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget { } private IResource getAddressBreakpointResource( String fileName ) { - IPath path = new Path( fileName ); - if ( path.isValidPath( fileName ) ) { - IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation( path ); - if ( files.length > 0 ) - return files[0]; + if ( fileName != null ) { + IPath path = new Path( fileName ); + if ( path.isValidPath( fileName ) ) { + IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation( path ); + if ( files.length > 0 ) + return files[0]; + } } return ResourcesPlugin.getWorkspace().getRoot(); }