From d3af1cd424dfce8c7cbb87277ad47bea62e0196c Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Mon, 11 Feb 2008 11:03:42 +0000 Subject: [PATCH] Fix for 218342: [patch] unable to clear breakpoints in ExternalTranslationUnit's from the editor (Patch by Warren Paul) --- .../debug/internal/ui/actions/ToggleBreakpointAdapter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ef8d68768ef..1f325ae6440 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 @@ -8,7 +8,7 @@ * Contributors: * 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 + * Warren Paul (Nokia) - Bug 217485, Bug 218342 *******************************************************************************/ package org.eclipse.cdt.debug.internal.ui.actions; @@ -32,6 +32,7 @@ import org.eclipse.cdt.debug.internal.ui.IInternalCDebugUIConstants; import org.eclipse.cdt.debug.internal.ui.views.disassembly.DisassemblyEditorInput; import org.eclipse.cdt.debug.internal.ui.views.disassembly.DisassemblyView; import org.eclipse.cdt.debug.ui.CDebugUIPlugin; +import org.eclipse.cdt.internal.ui.util.ExternalEditorInput; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; @@ -291,6 +292,8 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget { IEditorInput editorInput = ((IEditorPart)part).getEditorInput(); if ( editorInput instanceof IFileEditorInput ) { return ((IFileEditorInput)editorInput).getFile(); + } else if (editorInput instanceof ExternalEditorInput) { + return ((ExternalEditorInput)editorInput).getMarkerResource(); } ILocationProvider provider = (ILocationProvider)editorInput.getAdapter( ILocationProvider.class ); if ( provider != null ) {