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

contentProvider.getKnownElements is passed to the ListeningLabelProvider
constructor....

I am sorry but still confusing about the contectprovider's getKnowElements(). Let's start with steps of setting those providers:
1. Creat content provider,
2. Set content provider,
3. Create label provider,
4. Set label provider,
5. Set input.


Before the input is set (at step 5), I believe the ObservableSet returned by contentProvider.getKnownElements() is a empty set. The PersonGroupLabelProvider implementation actually use another 2 sets of ObservableSet - personPhoneKnownElements & personPhoneGroupKnownElements. Only when addListenerTo() method is called the elements are added into the 2 sets of ObservableSet - personPhoneKnownElements & personPhoneGroupKnownElements. From the implementation of PersonGroupLabelProvider, I do not see the super class addListenerTo' addListenerTo() method is got called even when the treeviewer input is set.

Thanks!
hao