1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 10:46:02 +02:00

Fix for Bug 165877 - Open Definition does not resolve linked resources

This commit is contained in:
Anton Leherbauer 2006-12-05 08:58:32 +00:00
parent 2a787e7e66
commit 9516df9fb0

View file

@ -11,7 +11,6 @@
package org.eclipse.cdt.internal.ui.indexview;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@ -30,7 +29,6 @@ import org.eclipse.cdt.core.index.IIndexBinding;
import org.eclipse.cdt.core.index.IIndexName;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.resources.FileStorage;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.internal.ui.util.EditorUtility;
@ -79,11 +77,7 @@ public class OpenDefinitionAction extends IndexAction {
private void showInEditor(IIndexName name) throws CModelException, PartInitException {
IPath path = new Path(name.getFileName());
Object input = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
if (input == null)
input = new FileStorage(path);
IEditorPart editor = EditorUtility.openInEditor(input);
IEditorPart editor = EditorUtility.openInEditor(path, null);
if (editor != null && editor instanceof ITextEditor) {
ITextEditor textEditor = (ITextEditor)editor;
int nodeOffset = name.getNodeOffset();