1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 12:35:22 +02:00
This commit is contained in:
Anton Leherbauer 2008-03-17 09:57:04 +00:00
parent b1108c8d73
commit 65adceff69

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2007 QNX Software Systems and others. * Copyright (c) 2004, 2008 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
@ -88,12 +88,14 @@ public class ManageFunctionBreakpointActionDelegate extends ActionDelegate imple
IContributedContentsView contentsView = (IContributedContentsView) fTargetPart.getAdapter(IContributedContentsView.class); IContributedContentsView contentsView = (IContributedContentsView) fTargetPart.getAdapter(IContributedContentsView.class);
if (contentsView != null) { if (contentsView != null) {
IWorkbenchPart contributingPart = contentsView.getContributingPart(); IWorkbenchPart contributingPart = contentsView.getContributingPart();
if (contributingPart != null) {
resource = (IResource) contributingPart.getAdapter(IResource.class); resource = (IResource) contributingPart.getAdapter(IResource.class);
if (resource == null && contributingPart instanceof IEditorPart) { if (resource == null && contributingPart instanceof IEditorPart) {
resource = (IResource) ((IEditorPart)contributingPart).getEditorInput().getAdapter(IResource.class); resource = (IResource) ((IEditorPart)contributingPart).getEditorInput().getAdapter(IResource.class);
} }
} }
} }
}
if (resource != null) { if (resource != null) {
targetAdapter = (IToggleBreakpointsTarget)resource.getAdapter(IToggleBreakpointsTarget.class); targetAdapter = (IToggleBreakpointsTarget)resource.getAdapter(IToggleBreakpointsTarget.class);
} }