mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Bug 457590 - Workspace... button does not work in Library Path picker
Change-Id: Idcb597b5d60494438b1a5f29f4efad00050acc06 Reviewed-on: https://git.eclipse.org/r/39671 Reviewed-by: Elena Laskavaia <elaskavaia.cdt@gmail.com> Tested-by: Elena Laskavaia <elaskavaia.cdt@gmail.com>
This commit is contained in:
parent
b26f160e3b
commit
a0fd70a09e
1 changed files with 9 additions and 3 deletions
|
@ -238,7 +238,7 @@ public class FileListControl {
|
|||
/* See if we can discover the project from the context *
|
||||
* and check whether the path must be resolved... */
|
||||
IProject project = null;
|
||||
IResource resource = null;
|
||||
|
||||
if(contextInfo != null) {
|
||||
try {
|
||||
// Try to find the project
|
||||
|
@ -262,9 +262,15 @@ public class FileListControl {
|
|||
// ignore
|
||||
}
|
||||
}
|
||||
IResource resource = null;
|
||||
if (!currentPathText.isEmpty()) {
|
||||
IResource rs[] = ResourcesPlugin.getWorkspace().getRoot()
|
||||
IResource rs[] = null;
|
||||
try {
|
||||
rs = ResourcesPlugin.getWorkspace().getRoot()
|
||||
.findContainersForLocationURI(URIUtil.toURI(currentPathText));
|
||||
} catch (Exception e) {
|
||||
// rs will be null here, exception is throw is path is not absolute
|
||||
}
|
||||
if (rs == null || rs.length == 0)
|
||||
resource = ResourceLookup.selectFileForLocation(new Path(currentPathText),
|
||||
null);
|
||||
|
|
Loading…
Add table
Reference in a new issue