1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Patch for Devin Steffler.

Fixed Bug 104532 	opening an #included header file from the outline view does not work with linked folders
This commit is contained in:
John Camelon 2005-07-20 19:28:57 +00:00
parent 4650694d81
commit 9f3f21f55d

View file

@ -120,6 +120,15 @@ public class OpenIncludeAction extends Action {
ITranslationUnit unit = CoreModel.getDefault().createTranslationUnitFrom(cproject, fileToOpen);
if (unit != null) {
EditorUtility.openInEditor(unit);
} else {
// try linked files
IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(fileToOpen);
for(int i=0; i<files.length; i++) {
if (files[i].isAccessible()) {
EditorUtility.openInEditor(files[i]);
break;
}
}
}
}
}