diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index e543e52bc9e..ce3b0866114 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,9 @@ +2004-06-18 Bogdan Gheorghe + Partial Fix for Bug 62668: [Search] Search results rely on case of file names in include statement + rather then the filesystem + + * src/org/eclipse/cdt/internal/ui/util/EditorUtility.java + 2004-06-17 Hoda Amer Fix for PR 63933: [Refactoring] compilation errors does not prevent rename refactoring Fix for PR 64213: [Refactoring] No warning given when renaming class A to B when B already exists diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java index 57986861f4e..61c3e6b74bb 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java @@ -6,6 +6,8 @@ package org.eclipse.cdt.internal.ui.util; */ import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.CoreModel; @@ -22,6 +24,8 @@ import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IStorage; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; import org.eclipse.jface.action.Action; import org.eclipse.swt.SWT; import org.eclipse.ui.IEditorDescriptor; @@ -113,6 +117,20 @@ public class EditorUtility { private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException { if (file != null) { try { + File tempFile = file.getRawLocation().toFile(); + + if (tempFile != null){ + String canonicalPath = null; + try { + canonicalPath = tempFile.getCanonicalPath(); + } catch (IOException e1) {} + + if (canonicalPath != null){ + IPath path = new Path(canonicalPath); + file = CUIPlugin.getWorkspace().getRoot().getFileForLocation(path); + } + } + IEditorInput input = getEditorInput(file); if (input != null) { return openInEditor(input, getEditorID(input, file), activate);