mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
Partial Fix for Bug 62668: [Search] Search results rely on case of file names in include statement
rather then the filesystem
This commit is contained in:
parent
f7dc9972f5
commit
564b89c196
2 changed files with 24 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue