Bug 260516 - ResourceLookup.findFilesForLocation(...) doesn't return IFile which isn't yet known
Summary: ResourceLookup.findFilesForLocation(...) doesn't return IFile which isn't yet...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 6.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 6.0   Edit
Assignee: Markus Schorn CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on: 233939
Blocks:
  Show dependency tree
 
Reported: 2009-01-09 04:32 EST by James Blackburn CLA
Modified: 2009-05-27 11:09 EDT (History)
0 users

See Also:
cdtdoug: iplog-


Attachments
use platforms findFilesForLocation as fall back (8.80 KB, patch)
2009-01-14 06:08 EST, Markus Schorn CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2009-01-09 04:32:51 EST
Build ID: 6.0

Steps To Reproduce:
I'm using ResourceLookup.findFilesForLocation(...) in a similar manner to how I use IWorkspaceRoot.findFilesForLocation(...).

However in the case where I've just created a file using java.io.*, which I would like to refresh and make known to the workspace, the ResourceLookup method returns an empty array whereas the IWorkspaceRoot method doesn't...

More information:
Comment 1 Markus Schorn CLA 2009-01-09 05:04:22 EST
Hmm, I don't see a reasonable way of making this work. However, I hope that bug 233939 will be fixed before we release CDT 6.0. If it is fixed I will make ResourceLookup.findFilesForLocation() use the platform's version.
Comment 2 James Blackburn CLA 2009-01-09 05:09:40 EST
(In reply to comment #1)
> Hmm, I don't see a reasonable way of making this work. However, I hope that bug
> 233939 will be fixed before we release CDT 6.0. If it is fixed I will make
> ResourceLookup.findFilesForLocation() use the platform's version.

Ok. If it's not fixed in the platform a workaround might be to fall back to the platform method in the case that no IFiles are found in the lookupTree.

Comment 3 Markus Schorn CLA 2009-01-09 05:18:10 EST
(In reply to comment #2)
you are right we can do that.
Comment 4 Markus Schorn CLA 2009-01-14 06:08:20 EST
Created attachment 122523 [details]
use platforms findFilesForLocation as fall back
Comment 5 Markus Schorn CLA 2009-01-14 06:09:13 EST
Fixed in 6.0 > 20090114.