1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Fix for 239858: resolve resources on paths with symbolic links

This commit is contained in:
Anton Leherbauer 2008-07-10 09:49:57 +00:00
parent 170bb6ea07
commit b3d0d40b3d
2 changed files with 8 additions and 1 deletions

View file

@ -206,7 +206,7 @@ public class DocumentAdapter implements IBuffer, IDocumentListener, IAdaptable {
public DocumentAdapter(IOpenable owner, IPath location) {
fOwner= owner;
fLocation= location;
fLocationKind= LocationKind.LOCATION;
fLocationKind= LocationKind.NORMALIZE;
initialize();
}

View file

@ -439,6 +439,13 @@ public class EditorUtility {
IFile secondBestMatch= null;
IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
IFile[] files= root.findFilesForLocation(location);
if (files.length == 0) {
// workaround http://bugs.eclipse.org/233939
IFile file= root.getFileForLocation(location);
if (file != null) {
files= new IFile[] { file };
}
}
for (IFile file : files) {
if (file.isAccessible()) {
if (project != null && file.getProject().equals(project)) {