|
Re: How to get ItemProvider/ItemProviderAdapterFactory for an Object [message #1705745 is a reply to message #1705708] |
Tue, 18 August 2015 17:58 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Simon,
You can directly listen to any EObject by adding an adapter to the
EObject.eAdapters() list.
On 18/08/2015 7:34 PM, Simon Eismann wrote:
> Hello Guys,
>
> I am currently trying to write some cutom listeners and to do so i
> need to be able to get the ItemProvider for an EObject. I am currently
> using:
>
> private IChangeNotifier getItemProvider(Object listenee) {
> return (IChangeNotifier) new
> XYZItemProviderAdapterFactory().adapt(
> (EObject)listenee, listenee.getClass());
> }
>
> This works fine, the architecture i am working with uses multiple
> packages, so the above function only works for Objects from the
> package XYZ. Is there a more convieneint way to do this?
>
> Greetings,
> Simon
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.01648 seconds