Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] resource navigator?
[CDO] resource navigator? [message #423645] Fri, 03 October 2008 21:35 Go to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
I need to build a navigator for the resources in a repository. Can
CDOItemProvider be used to display a tree of resources in a repository?
I tried creating one and setting my tree viewer input to be the
session, but that didn't work.

Bryan
Re: [CDO] resource navigator? [message #423661 is a reply to message #423645] Mon, 06 October 2008 09:20 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Bryan,

I think a facility to browse the resources in a repository is a very
good idea. Only the fact that resources form a flat list makes it a bit
difficult to come up with a solution that is both convenient and scalable.

Now we have at least the resource queries to ask for all resources in
the repoitory with a path that matches a given prefix. Unfortunately
these queries are currently only synchronous although the underlying
query framework would also support asynchronous queries. Would you like
to write a Bugzilla for asynchronous resource queries? Btw. The query
API is bound to the CDOView, like everything that is related with
EObjects. Using a CDOSession in an editor/view for EObjects (and
CDOResources are like EObjects) will not work.

Further I think that even with the new resource queries it will be hard
to provide a convenient navigator UI. That was one of the main reasons
why I'm plaaning to work on the new system class "CDOResourceFolder" to
make the tree structure of resource paths explicit. With this feature
the resources in a repository would really form an explicit
folder/resource composite structure which would be much easier to use in
a navigator like UI. Can you please file a Bugzilla for this new structure?

Cheers
/Eike



Bryan Hunt schrieb:
> I need to build a navigator for the resources in a repository. Can
> CDOItemProvider be used to display a tree of resources in a
> repository? I tried creating one and setting my tree viewer input to
> be the session, but that didn't work.
>
> Bryan
>


Re: [CDO] resource navigator? [message #423749 is a reply to message #423661] Mon, 06 October 2008 18:15 Go to previous messageGo to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
I've created bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=249847

For now, I've hacked together my own directory structure model, and it
seems to be working.

Bryan

On 2008-10-06 04:20:27 -0500, Eike Stepper <stepper@esc-net.de> said:

> Hi Bryan,
>
> I think a facility to browse the resources in a repository is a very
> good idea. Only the fact that resources form a flat list makes it a bit
> difficult to come up with a solution that is both convenient and
> scalable.
>
> Now we have at least the resource queries to ask for all resources in
> the repoitory with a path that matches a given prefix. Unfortunately
> these queries are currently only synchronous although the underlying
> query framework would also support asynchronous queries. Would you like
> to write a Bugzilla for asynchronous resource queries? Btw. The query
> API is bound to the CDOView, like everything that is related with
> EObjects. Using a CDOSession in an editor/view for EObjects (and
> CDOResources are like EObjects) will not work.
>
> Further I think that even with the new resource queries it will be hard
> to provide a convenient navigator UI. That was one of the main reasons
> why I'm plaaning to work on the new system class "CDOResourceFolder" to
> make the tree structure of resource paths explicit. With this feature
> the resources in a repository would really form an explicit
> folder/resource composite structure which would be much easier to use
> in a navigator like UI. Can you please file a Bugzilla for this new
> structure?
>
> Cheers
> /Eike
>
>
>
> Bryan Hunt schrieb:
>> I need to build a navigator for the resources in a repository. Can
>> CDOItemProvider be used to display a tree of resources in a repository?
>> I tried creating one and setting my tree viewer input to be the
>> session, but that didn't work.
>>
>> Bryan
Re: [CDO] resource navigator? [message #424173 is a reply to message #423749] Sun, 19 October 2008 07:11 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Bryan,

We finished the implementation for this new feature and committed it to
HEAD.
Please note that, as of this writing, the HibernateStore does not
support it (i.e. it will currently not work).

Short description:

CDOResource is now a sub-type of abstract CDOResourceNode.
CDOResourceFolder is another concrete sub-type of CDOResourceNode.
You can explore the new resources model in
/org.eclipse.emf.cdo/model/eresource.ecore


- The following API will work as before:

Resource ResourceSet.getResource(uri, loadOnDemand)
Resource ResourceSet.createResource(uri)
boolean CDOView.hasResource(path)
CDOResource CDOView.getResource(path)
CDOResource CDOView.getResource(path, loadOnDemand)
CDOResource CDOTransaction.createResource(path);
CDOResource CDOTransaction.getOrCreateResource(path);

- The following API has changed:

List<CDOResourceNode> CDOView.queryResources(resourceFolder, name,
exactMatch)
CloseableIterator<CDOResourceNode>
CDOView.queryResourcesAsync(resourceFolder, name, exactMatch)

- The following API is new:

CDOResource CDOView.getRootResource()
The root resource is a special resource with only CDOResourceNodes
in its contents list.
You can use it as the main entry into the new resource and folder
structure.


In addition I removed the CDOViewHistory framework because I expect
proper resource tree navigation
to appear under the CDOView nodes in the CDOSessionsView. Please feel
free to file a new Bugzilla for the
UI part of a navigator for the new structured resources.

I'm on a business trip next week but Simon will answer possible questions.

Cheers
/Eike



Bryan Hunt schrieb:
> I've created bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=249847
>
> For now, I've hacked together my own directory structure model, and it
> seems to be working.
>
> Bryan
>
> On 2008-10-06 04:20:27 -0500, Eike Stepper <stepper@esc-net.de> said:
>
>> Hi Bryan,
>>
>> I think a facility to browse the resources in a repository is a very
>> good idea. Only the fact that resources form a flat list makes it a
>> bit difficult to come up with a solution that is both convenient and
>> scalable.
>>
>> Now we have at least the resource queries to ask for all resources in
>> the repoitory with a path that matches a given prefix. Unfortunately
>> these queries are currently only synchronous although the underlying
>> query framework would also support asynchronous queries. Would you
>> like to write a Bugzilla for asynchronous resource queries? Btw. The
>> query API is bound to the CDOView, like everything that is related
>> with EObjects. Using a CDOSession in an editor/view for EObjects (and
>> CDOResources are like EObjects) will not work.
>>
>> Further I think that even with the new resource queries it will be
>> hard to provide a convenient navigator UI. That was one of the main
>> reasons why I'm plaaning to work on the new system class
>> "CDOResourceFolder" to make the tree structure of resource paths
>> explicit. With this feature the resources in a repository would
>> really form an explicit folder/resource composite structure which
>> would be much easier to use in a navigator like UI. Can you please
>> file a Bugzilla for this new structure?
>>
>> Cheers
>> /Eike
>>
>>
>>
>> Bryan Hunt schrieb:
>>> I need to build a navigator for the resources in a repository. Can
>>> CDOItemProvider be used to display a tree of resources in a
>>> repository? I tried creating one and setting my tree viewer input to
>>> be the session, but that didn't work.
>>>
>>> Bryan
>
>


Previous Topic:[VALIDATION] How to customize Messages when loading OCL from file
Next Topic:EMF Databinding for JFace's IViewerObservableSet
Goto Forum:
  


Current Time: Fri Apr 26 11:10:01 GMT 2024

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

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

Back to the top