diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/OpenCElementAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/OpenCElementAction.java index 6e025fbefd5..b8edfbcd28b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/OpenCElementAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/OpenCElementAction.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.navigator; +import org.eclipse.cdt.core.model.IBinary; import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ISourceReference; import org.eclipse.cdt.internal.ui.util.EditorUtility; @@ -62,8 +63,9 @@ public class OpenCElementAction extends OpenFileAction { fOpenElement = null; if (selection.size() == 1) { Object element = selection.getFirstElement(); - if (element instanceof ICElement && element instanceof ISourceReference) { - fOpenElement = (ICElement)element; + if (element instanceof ICElement + && (element instanceof ISourceReference || element instanceof IBinary)) { + fOpenElement = (ICElement) element; } } return fOpenElement != null || super.updateSelection(selection); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExternalEditorInput.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExternalEditorInput.java index a38c3b7ac21..9d62176468f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExternalEditorInput.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExternalEditorInput.java @@ -112,9 +112,7 @@ public class ExternalEditorInput implements ITranslationUnitEditorInput { * @see org.eclipse.ui.editors.text.ILocationProvider#getPath(java.lang.Object) */ public IPath getPath(Object element) { - if (location!=null) - return location ; - return externalFile.getFullPath(); + return location ; } public ExternalEditorInput(ITranslationUnit unit, IStorage exFile) {