Community
Participate
Working Groups
I have a non-containment / multi-valued feature which I bind in an IObserveMap like this: observableMap.add(EMFEditProperties.value(editingService.getEditingDomain(), LibraryPackage.Literals.COMPONENT__METRIC_REFS).observeDetail(set)); This collection in type "COMPONENT" has references to objects of type "METRIC". The collection of IObservableMap is passed to a Labelprovider, an IMapChangeListener listener is added to each entry. for the feature above, I don't receive notification. The IObservableFactory for this viewer will create IObservables for "COMPONENT" but not for "METRIC" (As I don't show them as children in the treeview, but need to know about changes to update the text of the label for "COMPONENT".). I would like to request the extension of EMF Databinding so collection mutations can be observed even if the objects in the collection are not part of the ObservableSet. See the attached screenshot, in the tree on the left we don't show the METRIC object, but we use it in the label: "(6 metrics)" so we need an update when a METRIC object is added to the collection on the right.
Created attachment 208687 [details] screenshot
Hopefully this makes sense to Tom because I totally don't follow and there's no test case.
Hi Ed, Sorry, if the explanation is not clear enough, I discussed this with Tom offline yesterday, and I believe Tom is clear about the request. Still for the sake of proper recording, I would like to make the request clearer. 1. For a TreeViewer, an observable factory is defined, which produces observables for nodes in the tree. 2. In my case, one of the children types (type B) is a non-containment, multi-value feature in type A 3. type B is not shown as a child node in the tree, but as a text entry showing i.e. ( 6 x B) in the label for type A. 3. As the factory has no observables for type B, it seems it's not possible to register an observable map entry like this: observableMap.add(EMFEditProperties.value(editingService.getEditingDomain(), LibraryPackage.Literals.COMPONENT__A_REFS).observeDetail(set)); "set" is from ObservableListTreeContentProvider(...).getKnownElements(); The request is to have an EMFEditProperties.<method> which can deal with observing this feature and firing an MapChangeEvent for mutations in this feature. I hope this clarifiers?
Can you take a look at #289353 is that what you are searching for?
Yes, notifications on the size of a collection would work, However will it fire if the target EReference->EReferenceType is not observed? (No observable is produced for the targets of the collection). (In reply to comment #4) > Can you take a look at #289353 is that what you are searching for?
Can it be that this bugzilla is against 2.7 or 2.8 rather than 4.0.1? Please adjust accordingly.
Changed it to 2.7.1