Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Common Navigator - Label Provider
Common Navigator - Label Provider [message #497552] Fri, 13 November 2009 08:55 Go to next message
Javier is currently offline Javier
Messages: 57
Registered: July 2009
Member
Hello guys.

I have implemented my own Common Navigator for my application, with its ContentProvider and LabelProvider. LabelProvider sets up the icons for the different nodes. I would like it, for certain nodes, change the icon depending if the node is expanded or collapsed. I guess this would be easier have the SWT TreeNode, but I want to know if there is a easier way - sth like catching the event of expanding an calling the LabelProvider...

Any help would be really appreciated, thanks!
Re: Common Navigator - Label Provider [message #498304 is a reply to message #497552] Mon, 16 November 2009 11:57 Go to previous message
Mario Winterer is currently offline Mario Winterer
Messages: 136
Registered: July 2009
Senior Member
Hi!
Maybe you could override inputChanged(Viewer, Object, Object) in your
IContentProvider and register an ITreeViewerListener that calls "update"
on the viewer every time the expansion state of an element changes.
(I know, this should be done in the label provider instead, but
unfortunately only the content provider gets access to its viewer)

Mario

Javier schrieb:
> Hello guys.
>
> I have implemented my own Common Navigator for my application, with its
> ContentProvider and LabelProvider. LabelProvider sets up the icons for
> the different nodes. I would like it, for certain nodes, change the icon
> depending if the node is expanded or collapsed. I guess this would be
> easier have the SWT TreeNode, but I want to know if there is a easier
> way - sth like catching the event of expanding an calling the
> LabelProvider...
>
> Any help would be really appreciated, thanks!
Previous Topic:Capture output and exit status a launched Java program
Next Topic:simple search for projects(etc..) by name
Goto Forum:
  


Current Time: Thu Oct 30 14:34:40 GMT 2014

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

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