Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » CommonNavigator versus TreeView to display entitys from a remote database?
CommonNavigator versus TreeView to display entitys from a remote database? [message #326719] Mon, 31 March 2008 09:15 Go to next message
Olivier Allard is currently offline Olivier AllardFriend
Messages: 4
Registered: July 2009
Junior Member
Because of the high level of functionality shipped with it, I wonder if I
should use the CommonNavigator instead of a TreeView for my project:

My question is: should I use the CommonNavigator framework or would you
advise me another option?

I'm not sure if it's possible as if I'm not mistaking it's only supposed
to manage files or projects, with optionnally a "Nature" associated, I
would like to clarify this point because if this is the case it forbids
the use of a connection to feed items into the navigator's tree. May be I
haven't seen all the possibilitys, so I'd like some advise from a
navigator specialist...

Project description:
************************************************************ *****************
I have to manage the entitys I retrieve from a remote database, and the
actions performed have much in common with what i understood of the
navigator's features:

I will have to implement various popup menus depending on the tree's
node's nature, and offer the various corresponding actions:
-Provide properties pages on demand for all the items fed in the tree, the
nature of the propertie page depending on the item's nature.
-Create/delete, with wizards depending on the chosen tree item's type.
-Enable/disable tree items on the remote database.
-Refresh all or parts of the tree.
-import/export options for each tree item, or tree selection.
-Display various types of hierarchical views on the data.
-Connect Disconnect from any remote or local database through SOAP or JNI
(it's a midleware database not a regular one).
-and other actions...

I will need a menu/toolbar at the navigator's level to manage
(dis/)connections, content/filtering of item's types, logging of passed
connections allowing easy reconnections, trigger for two different
connection wizards (remote/local), and probably more...

END********************************************************* ********************
Re: CommonNavigator versus TreeView to display entitys from a remote database? [message #326748 is a reply to message #326719] Mon, 31 March 2008 14:55 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
One approach you might want to consider is the user of resources
(IResource), these are powerfully be used with the CommonNavigator. And
you can have your resources backed by a database (or anything else that
looks like a file system) using your own implementation of an EFS file
system. Search for Eclipse EFS.

olivier wrote:
>
> Because of the high level of functionality shipped with it, I wonder if
> I should use the CommonNavigator instead of a TreeView for my project:
>
> My question is: should I use the CommonNavigator framework or would you
> advise me another option?
> I'm not sure if it's possible as if I'm not mistaking it's only supposed
> to manage files or projects, with optionnally a "Nature" associated, I
> would like to clarify this point because if this is the case it forbids
> the use of a connection to feed items into the navigator's tree. May be
> I haven't seen all the possibilitys, so I'd like some advise from a
> navigator specialist...
>
> Project description:
> ************************************************************ *****************
>
> I have to manage the entitys I retrieve from a remote database, and the
> actions performed have much in common with what i understood of the
> navigator's features:
>
> I will have to implement various popup menus depending on the tree's
> node's nature, and offer the various corresponding actions: -Provide
> properties pages on demand for all the items fed in the tree, the nature
> of the propertie page depending on the item's nature. -Create/delete,
> with wizards depending on the chosen tree item's type.
> -Enable/disable tree items on the remote database.
> -Refresh all or parts of the tree.
> -import/export options for each tree item, or tree selection.
> -Display various types of hierarchical views on the data.
> -Connect Disconnect from any remote or local database through SOAP or
> JNI (it's a midleware database not a regular one).
> -and other actions...
> I will need a menu/toolbar at the navigator's level to manage
> (dis/)connections, content/filtering of item's types, logging of passed
> connections allowing easy reconnections, trigger for two different
> connection wizards (remote/local), and probably more...
>
> END********************************************************* ********************
>
>


EFS is a nice idea! I found a nice sample but not populating a navigator... [message #326817 is a reply to message #326748] Tue, 01 April 2008 16:10 Go to previous messageGo to next message
Olivier Allard is currently offline Olivier AllardFriend
Messages: 4
Registered: July 2009
Junior Member
Thank you, Francis, for the idea!

It's great, but i'm not yet sure i'll be able to implement EFS with the
kind of data I receive. Or I'm not sure what kind of overhead it will be...

It would be better for me to find a sample of a navigator using EFS. For
the moment I've only got an example with the zip extension and a more
interesting one which implements HTTP as an EFS; this allows links to be
added in a project and then the editor is the web browser.

But for me it's more complicated than this, I think, because I've got to
populate a navigator's tree with data not in the workspace nor in
projects...

Well I'll still try to implement the mandatory methods and see...

If you have some more clues, I'll be gratefull!!
Re: EFS is a nice idea! I found a nice sample but not populating a navigator... [message #327026 is a reply to message #326817] Sun, 06 April 2008 14:07 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 113
Registered: July 2009
Senior Member
I have not looked into EFS myself but now will.

To do a DB-backed implementation of CNF you will need to do the
following when not using EFS:

a) Define your own logical hierarchy of objects. Some may be purely
application based which have children that come from the database and
some may be directly from th application. This is how IResource works.
Some resources are containers (like folders) to other resources like files.

b) Define your top level domain object to be the toplevel container of
your remote dbs. In my case, one db is the toplevel source for resource
and is what I want to show at the toplevel of my CNF viewer.

c) Use CNF and set your input to the toplevel container that you have
created. A blog on digital napkin has a great tutorial on using CNF.

d) Create content extensions for CNF in your plugin.xml. You will need
to specify label and content providers for each object to be displayed
or obtain content from. When the content provider asks for children
objects, retrieve them from the db. Sometimes children are applicaiton
defined logical entities so these are easiier to retrieve.

I did it all this way and it works fine. I'll also look into EFS
hopefully it will help me remove code. However, I use spring containers
as the containers in my domain hierarchy to allow me to instantiate a
substantial number of supporting resources at the right level in the
hierarchy, db session factories, daos, etc. Since I can access different
dbs at the same time representing "projects" I need multiple session
factories (using hibernate).



olivier wrote:
> Thank you, Francis, for the idea!
>
> It's great, but i'm not yet sure i'll be able to implement EFS with the
> kind of data I receive. Or I'm not sure what kind of overhead it will be...
>
> It would be better for me to find a sample of a navigator using EFS. For
> the moment I've only got an example with the zip extension and a more
> interesting one which implements HTTP as an EFS; this allows links to
> be added in a project and then the editor is the web browser.
>
> But for me it's more complicated than this, I think, because I've got to
> populate a navigator's tree with data not in the workspace nor in
> projects...
>
> Well I'll still try to implement the mandatory methods and see...
>
> If you have some more clues, I'll be gratefull!!
>
Re: EFS is a nice idea! I found a nice sample but not populating a navigator... [message #327073 is a reply to message #327026] Tue, 08 April 2008 15:32 Go to previous message
Olivier Allard is currently offline Olivier AllardFriend
Messages: 4
Registered: July 2009
Junior Member
Thank you!

In the meantime, I have left EFS aside having found a simpler way to set
the input to my root class. I have loaded my data in the navigator.

I am now looking forward to implement the action providers triggers and so
forth, like whatever could help me to manage the actions. The first step
I'm aiming at is to open property pages for each type of item in the
navigator tree. So I have added a popupmenu extension, which doesn't work
for the moment: I get a "operation not currently available" message...

I also have to implement "new" wizards for each type.

At the same time I try to gather documentation and samples for the use of
extensions with the navigator.

Is there any good reason to use an EFS implementation instead, would I get
more benefit from the extensions?
Previous Topic:integrating Team CVS API
Next Topic:Conditional Enablement for Handlers on a Workbench Part
Goto Forum:
  


Current Time: Wed Jul 17 10:38:35 GMT 2024

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

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

Back to the top