1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Fix regression of bug 62064

This commit is contained in:
Anton Leherbauer 2007-01-23 10:40:49 +00:00
parent 58b3ace8db
commit fabdf0bb2b
2 changed files with 5 additions and 5 deletions

View file

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

View file

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