|
Re: Common Navigator and showing external files [message #485906 is a reply to message #485777] |
Tue, 15 September 2009 14:01 |
Mark Melvin Messages: 118 Registered: July 2009 |
Senior Member |
|
|
Mark Melvin wrote:
> Hi There,
>
> I was wondering if anyone has implemented showing external files in the
> common navigator framework. What I mean is, say I have a folder somewhere
> outside my workspace. Is there an easy way I can show it as an element in
> my project by adapting to some magical interface, and having Eclipse
> figure out it is a folder with some files in it or is this going to be a
> whole ton of work. I have found this:
>
> IFileSystem fs = EFS.getLocalFileSystem();
> IFileStore store = fs.getStore(some_path);
>
> But it looks like I need to write wrappers around IFileStore to show
> children, etc. Surely I am not the first one to want do this?
>
> I guess the other option is to create linked resources, but I don't really
> want to go there. I'd rather provide the items directly in my content
> provider, provided it is doable.
>
It turns out it is quite easy to "show" the structure of the underlying
filesystem as IFileStore already has a parent-child structure. However, I
am worried about refreshing (it doesn't refresh automatically when the
filesystem changes, despite the workspace refresh preference setting). I
also don't get any resource behavior in terms of icons, actions, etc.
(obviously because they are not workspace resources...duh).
So, if anyone has a simple way to adapt an IFileStore object to a
full-fledged IResource, I'd love to hear about it. On the surface it
looks rife with complications, but I could be missing something simple.
Thanks,
Mark.
|
|
|
Powered by
FUDForum. Page generated in 0.02334 seconds