[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Does jface databinding support treeviewer?

hao wrote:
The addListenerTo() of the label provider does get called if I set the label provider's constructor input as contentprovider.getKnownElements(). Could you please briefly describe what the addListenerTo() of the listeninglabelprovider does.

The content provider adds and remove elements from the known elements set as they are added to and removed from the viewer. addListenerTo() is called for every element as it is first added to the viewer, and removeListenerFrom() is called for every element as the last instance of it is removed from the viewer.


The idea is that you should add a listener to the element, and fire a LabelProviderChangedEvent whenever elements change and should be updated in the viewer.

Matthew