1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fix for 218342: [patch] unable to clear breakpoints in ExternalTranslationUnit's from the editor (Patch by Warren Paul)

This commit is contained in:
Anton Leherbauer 2008-02-11 11:03:42 +00:00
parent e18a689410
commit d3af1cd424

View file

@ -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 ) {