mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 02:15:31 +02:00
Fix for 239858: resolve resources on paths with symbolic links
This commit is contained in:
parent
170bb6ea07
commit
b3d0d40b3d
2 changed files with 8 additions and 1 deletions
|
@ -206,7 +206,7 @@ public class DocumentAdapter implements IBuffer, IDocumentListener, IAdaptable {
|
||||||
public DocumentAdapter(IOpenable owner, IPath location) {
|
public DocumentAdapter(IOpenable owner, IPath location) {
|
||||||
fOwner= owner;
|
fOwner= owner;
|
||||||
fLocation= location;
|
fLocation= location;
|
||||||
fLocationKind= LocationKind.LOCATION;
|
fLocationKind= LocationKind.NORMALIZE;
|
||||||
|
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -439,6 +439,13 @@ public class EditorUtility {
|
||||||
IFile secondBestMatch= null;
|
IFile secondBestMatch= null;
|
||||||
IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
|
IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
|
||||||
IFile[] files= root.findFilesForLocation(location);
|
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) {
|
for (IFile file : files) {
|
||||||
if (file.isAccessible()) {
|
if (file.isAccessible()) {
|
||||||
if (project != null && file.getProject().equals(project)) {
|
if (project != null && file.getProject().equals(project)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue