[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Observing EList size

Pierre,

Comments below.

Pierre Francis Roy wrote:
Dear,

I have the following code used for observing EMF object attributes for binding with table TableViewer columns.

IObservableMap[] map = new IObservableMap[3];
map[0] = EMFProperties.value(DairyStudioQualityPackage.Literals.SAMPLE_SET__DATE_CREATION).observeDetail(set);


map[1] = EMFProperties.value(DairyStudioQualityPackage.Literals.SAMPLE_SET__TYPE).observeDetail(set);

map[2] = EMFProperties.value(DairyStudioQualityPackage.Literals.SAMPLE_SET__SAMPLES).observeDetail(set);


In the third properties I'm currently observing an EList<Sample> object. In this case what I want to do is to observ the size of that EList (EList.size()).
Any idea how this can be done?
In terms of notifications, EMF produces notifications for all things that affect the list so there's certainly enough information to know when to check the size. In particular, add and remove notifications will affect the size.

Thanks for helping me getting a good start with databinding.
I'm not sure how you'd hook data binding up for that though.

Pierre Francis