Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Common Navigator and showing external files
Common Navigator and showing external files [message #485777] Mon, 14 September 2009 21:49 Go to next message
Mark Melvin is currently offline Mark MelvinFriend
Messages: 118
Registered: July 2009
Senior Member
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.

Thanks in advance,
Mark.
Re: Common Navigator and showing external files [message #485906 is a reply to message #485777] Tue, 15 September 2009 14:01 Go to previous message
Mark Melvin is currently offline Mark MelvinFriend
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.
Previous Topic:Perspective switch handle
Next Topic:keep console view in runtime instance up to date
Goto Forum:
  


Current Time: Fri Apr 26 10:40:26 GMT 2024

Powered by FUDForum. Page generated in 0.02334 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top