Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » TreeNodeContentProvider vs ITreePathContentProvider
TreeNodeContentProvider vs ITreePathContentProvider [message #526610] Mon, 12 April 2010 12:03 Go to next message
Roland Tepp is currently offline Roland TeppFriend
Messages: 336
Registered: July 2009
Senior Member
Hi,

I am evaluating the new viewer API in JFace that has appeared since
Eclipse 3.2 and I've stumbled upon 2 seemingly similar concepts in the
JFace tree viewer API's:

TreeNodeContentProvider and ITreePathContentProvider

The question is - since both seem to be operating on structures that
make up a tree, what is the use case of either and which one shoul I use
if I need to implement my own tree-like structure viewer.

I know, I can easily do without either, so I guess, what I am asking is
that what are the relative strengths and weaknesses of either approach
so that I could decide which one to use when...

--
Roland Tepp
Re: TreeNodeContentProvider vs ITreePathContentProvider [message #526623 is a reply to message #526610] Mon, 12 April 2010 12:44 Go to previous messageGo to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Hi Roland,

with TreeNodeContentProvider you have to assemble a TreeNode object structure beforehand,
it pays of for showing non-tree data (f.e. from flat tables) which has to be converted
into a tree structure first.

ITree(Path)ContentProvider gets the elements to show directly from some other structure,
this is great if your data structure is already a tree. They are the way to go whenever
you're able to provide "children / parent of a node" on demand easily.

- Ralf



--
Read my Blog here: http://www.ralfebert.de/blog/
Follow me on Twitter here: http://twitter.com/ralfebert/
Re: TreeNodeContentProvider vs ITreePathContentProvider [message #899146 is a reply to message #526623] Mon, 30 July 2012 16:32 Go to previous message
Libor Jelinek is currently offline Libor JelinekFriend
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Hello everybody,
right know I'm also trying to figure out what the true difference/use case. Ralf's response isn't clear too much (however thank you for responding at all).

Can somebody else response once more to this?

Thanks
Libor
Previous Topic:Reset DeferredTreeContentManager
Next Topic:[Databinding] Force a validation of a field
Goto Forum:
  


Current Time: Mon Dec 22 09:13:26 GMT 2014

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

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