Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Remote EFS designs

2009/5/28 Chris Genly <chgenly@xxxxxxxxx>:
> One bridge between these worlds is links.  Links may be inserted in to the
> workspace to point to locations defined by a URI.
> IFolder link = project.getFolder("tasks");
>         try {
>             link.createLink(new URI("task://abc/def"), IResource.NONE,
> null);
>         } catch (Exception e) {
>             e.printStackTrace();
>         }
> I don't have any insider information.  This is just the understanding I
> developed over time.

And in fact, to continue Chris' story, links are all powerful.  They
can be used to map an IResource to any EFS resource, as e4.resources
has made it easy to do. They can even re-map an existing IResource
tree.  If you create a linked resource over an existing EFS resource,
the linked resource masks the real underlying resource.

They're also used in e4 to implement groups -- which is a like a
folder except it doesn't exist on the filesystem.  JohnA implemented
this as a special type of linked resource backed by an EFS provider
with 'group:/' as it's URI.

What's interesting is that the only valid way to programmatically
iterate over this tree is use IResource.  Because a group has a 'fake'
URI you can just append a relative path to a Group and end up with an
EFS resource.

In this world you need to either use
IContainer.findMember(workspace_path) or
WorkspaceRoot.findFilesForLocationURI(URI) (or ResourceLookup in CDT).


Back to the top