Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Override getText for EClass
Override getText for EClass [message #1407585] Wed, 13 August 2014 01:10 Go to next message
Alain Picard is currently offline Alain PicardFriend
Messages: 223
Registered: July 2009
Senior Member
I need to overwrite the behavior of getText() that is in EClassItemProvider. Since this is a provided class, what is the best way to do this?

Thanks
Alain
Re: Override getText for EClass [message #1407622 is a reply to message #1407585] Wed, 13 August 2014 03:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30461
Registered: July 2009
Senior Member
Alain,

You could subclass EcoreItemProviderAdapterFactory to create a subclass
of EClassItemProvider and use that factory in your ComposedAdapterFactory.


On 13/08/2014 3:10 AM, Alain Picard wrote:
> I need to overwrite the behavior of getText() that is in
> EClassItemProvider. Since this is a provided class, what is the best
> way to do this?
>
> Thanks
> Alain
Re: Override getText for EClass [message #1407794 is a reply to message #1407622] Wed, 13 August 2014 13:16 Go to previous messageGo to next message
Alain Picard is currently offline Alain PicardFriend
Messages: 223
Registered: July 2009
Senior Member
That is what I normally do indeed with our own elements.

But here I'm using a pre-defined control and I don't control the Adapter Factory and registering a factory under "org.eclipse.emf.edit.itemProviderAdapterFactories" either doesn't register more than one factory per uri or returns the first one found.

Thanks
Alain
Re: Override getText for EClass [message #1407802 is a reply to message #1407794] Wed, 13 August 2014 13:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30461
Registered: July 2009
Senior Member
Alain,

To which pre-defined control do you refer? Generally, if you're using
something provided by someone else, and they don't make it configurable,
you have to live with their design decisions...


On 13/08/2014 3:16 PM, Alain Picard wrote:
> That is what I normally do indeed with our own elements.
>
> But here I'm using a pre-defined control and I don't control the
> Adapter Factory and registering a factory under
> "org.eclipse.emf.edit.itemProviderAdapterFactories" either doesn't
> register more than one factory per uri or returns the first one found.
>
> Thanks
> Alain
Previous Topic:How to use from an Android application features implemented in EMF project?
Next Topic:[XCORE] GMF: Resource '/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore' does not exist.
Goto Forum:
  


Current Time: Sun Sep 22 08:27:43 GMT 2019

Powered by FUDForum. Page generated in 0.02233 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top