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:
parent
4650694d81
commit
9f3f21f55d
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue