[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:
If the viewer's elements got into content provider's ObservableSet, how does the personPhoneKnownElements & personPhoneGroupKnownElements ObservableSet of label provider got to be populated?

They are populated in response to a SetChangeEvent on the known elements set. See ListeningLabelProvider constructor: it adds an ISetChangeListener that calls addListenerTo() when an element is added, and calls removeListenerFrom() when an element is removed.


We receive these messages in PersonGroupLabelProvider's addListenerTo() and removeListenerFrom() methods, and manually add them to / remove them from either personPhoneKnownElements or personPhonGroupKnownElements, depending on type.

Matthew