Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorAnton Leherbauer2008-04-02 07:25:33 +0000
committerAnton Leherbauer2008-04-02 07:25:33 +0000
commitcfae4dbc59a2f2c0bee8857ecdaa59ad0590f32b (patch)
treef4b4fa052bcb13279836729abd3841503ee7e71c /debug
parenta6d874156fba3f9f699e36d253c623d82d647cdc (diff)
downloadorg.eclipse.cdt-cfae4dbc59a2f2c0bee8857ecdaa59ad0590f32b.tar.gz
org.eclipse.cdt-cfae4dbc59a2f2c0bee8857ecdaa59ad0590f32b.tar.xz
org.eclipse.cdt-cfae4dbc59a2f2c0bee8857ecdaa59ad0590f32b.zip
Fix for 225099: Breakpoint toggling for files outside projects is broken in CDT CVS HEAD
Patch by √ėyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java9
1 files changed, 7 insertions, 2 deletions
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 0006e412c6..9bd191f7b2 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
@@ -9,6 +9,7 @@
* QNX Software Systems - Initial API and implementation
* Freescale Semiconductor - Address watchpoints, https://bugs.eclipse.org/bugs/show_bug.cgi?id=118299
* Warren Paul (Nokia) - Bug 217485, Bug 218342
+ * Oyvind Harboe (oyvind.harboe@zylin.com) - Bug 225099
*******************************************************************************/
package org.eclipse.cdt.debug.internal.ui.actions;
@@ -290,11 +291,15 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget {
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
if ( part instanceof IEditorPart ) {
IEditorInput editorInput = ((IEditorPart)part).getEditorInput();
+ IResource resource = null;
if ( editorInput instanceof IFileEditorInput ) {
- return ((IFileEditorInput)editorInput).getFile();
+ resource = ((IFileEditorInput)editorInput).getFile();
} else if (editorInput instanceof ExternalEditorInput) {
- return ((ExternalEditorInput)editorInput).getMarkerResource();
+ resource = ((ExternalEditorInput)editorInput).getMarkerResource();
}
+ if (resource != null)
+ return resource;
+ /* This file is not in a project, let default case handle it */
ILocationProvider provider = (ILocationProvider)editorInput.getAdapter( ILocationProvider.class );
if ( provider != null ) {
IPath location = provider.getPath( editorInput );

Back to the top