| 
| CommonNavigator versus TreeView to display entitys from a remote database? [message #326719] | Mon, 31 March 2008 05:15  |  | 
| Eclipse User  |  |  |  |  | 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 10:55   |  | 
| Eclipse User  |  |  |  |  | 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********************************************************* ********************
 >
 >
 |  |  |  | 
|  | 
| 
| 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 10:07   |  | 
| Eclipse User  |  |  |  |  | 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 11:32  |  | 
| Eclipse User  |  |  |  |  | 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?
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04291 seconds