[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Custom code for list of enums

Tomas,

No, if you walk up the EDataTypeUniqueEList you'll see it inherits from BasicEList so I'm suggesting creating an anonymous derived inner class and specializing the didAdd method as a place to do the specialized processing that's needed when something is added to the list.


Tomas Zijdemans wrote:
Ed Merks wrote:

EMF's lists are derived from BasicEList or DelegatingEList and both provide methods like didAdd, didRemove that allow you to hook directly into the things that happen to modify the list much like overrides a setXyz method directly.

Are you talking about the eDynamicSet method? - couldn't find didAdd.

(my list is a EDataTypeUniqueEList<enumtype>)


Thanks,

Tomas Zijdemans



Tomas Zijdemans wrote:
Hi!

I want to execute some custom code when enumerators are set. I do this in their respective set<enumname> methods. But I have one enumerator which is multiple. EMF generates an EList with a get<enumname> method. How can I run my custom code when enumerators are added to this list? (since there is no inverseAdd case)

Best Regards,

Tomas Zijdemans