mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 02:05:39 +02:00
Fix regression of bug 62064
This commit is contained in:
parent
58b3ace8db
commit
fabdf0bb2b
2 changed files with 5 additions and 5 deletions
|
@ -10,6 +10,7 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.ui.navigator;
|
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.ICElement;
|
||||||
import org.eclipse.cdt.core.model.ISourceReference;
|
import org.eclipse.cdt.core.model.ISourceReference;
|
||||||
import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
||||||
|
@ -62,7 +63,8 @@ public class OpenCElementAction extends OpenFileAction {
|
||||||
fOpenElement = null;
|
fOpenElement = null;
|
||||||
if (selection.size() == 1) {
|
if (selection.size() == 1) {
|
||||||
Object element = selection.getFirstElement();
|
Object element = selection.getFirstElement();
|
||||||
if (element instanceof ICElement && element instanceof ISourceReference) {
|
if (element instanceof ICElement
|
||||||
|
&& (element instanceof ISourceReference || element instanceof IBinary)) {
|
||||||
fOpenElement = (ICElement) element;
|
fOpenElement = (ICElement) element;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,9 +112,7 @@ public class ExternalEditorInput implements ITranslationUnitEditorInput {
|
||||||
* @see org.eclipse.ui.editors.text.ILocationProvider#getPath(java.lang.Object)
|
* @see org.eclipse.ui.editors.text.ILocationProvider#getPath(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public IPath getPath(Object element) {
|
public IPath getPath(Object element) {
|
||||||
if (location!=null)
|
|
||||||
return location ;
|
return location ;
|
||||||
return externalFile.getFullPath();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExternalEditorInput(ITranslationUnit unit, IStorage exFile) {
|
public ExternalEditorInput(ITranslationUnit unit, IStorage exFile) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue