Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » duplicate createEObjectAdapter
duplicate createEObjectAdapter [message #424737] Tue, 04 November 2008 14:46 Go to next message
Cyril Faucher is currently offline Cyril FaucherFriend
Messages: 63
Registered: July 2009
Member
Hi,

In a metamodel, I have an EClass named "EObject" having a containing
EPackage named: foo.
When I am generating the corresponding Java source code (model), in the
resulting Class: FooAdapterFactory, the createEObjectAdapter method is
duplicated.
I have looked for in the JET template and it seems the
createEObjectAdapter method is added by default in an AdapterFactory.

Ok, the name of my EClass is not very ... EObject, but this case could
be occured.

Best regards,
Cyril.
Re: duplicate createEObjectAdapter [message #424738 is a reply to message #424737] Tue, 04 November 2008 15:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Cyril,

Comments below.

Cyril Faucher wrote:
> Hi,
>
> In a metamodel, I have an EClass named "EObject" having a containing
> EPackage named: foo.
That sounds like a bad idea. :-P
> When I am generating the corresponding Java source code (model), in
> the resulting Class: FooAdapterFactory, the createEObjectAdapter
> method is duplicated.
In our duplicate checking, I'd have to assume we never checked for
EObject conflicts. I thought we trademarked and copyrighted that name. :-P
> I have looked for in the JET template and it seems the
> createEObjectAdapter method is added by default in an AdapterFactory.
Yep.
>
> Ok, the name of my EClass is not very ... EObject, but this case could
> be occured.
Yes, we could handle this better. Feel free to open a bugzilla with an
example. I'll try to refrain from ridiculing you. :-P
>
> Best regards,
> Cyril.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: duplicate createEObjectAdapter [message #424739 is a reply to message #424738] Tue, 04 November 2008 15:29 Go to previous messageGo to next message
Cyril Faucher is currently offline Cyril FaucherFriend
Messages: 63
Registered: July 2009
Member
Ed,

If you wish, I will join to the bug the dedicated patch.

Cyril.

Ed Merks a écrit :
> Cyril,
>
> Comments below.
>
> Cyril Faucher wrote:
>> Hi,
>>
>> In a metamodel, I have an EClass named "EObject" having a containing
>> EPackage named: foo.
> That sounds like a bad idea. :-P
>> When I am generating the corresponding Java source code (model), in
>> the resulting Class: FooAdapterFactory, the createEObjectAdapter
>> method is duplicated.
> In our duplicate checking, I'd have to assume we never checked for
> EObject conflicts. I thought we trademarked and copyrighted that name. :-P
>> I have looked for in the JET template and it seems the
>> createEObjectAdapter method is added by default in an AdapterFactory.
> Yep.
>>
>> Ok, the name of my EClass is not very ... EObject, but this case could
>> be occured.
> Yes, we could handle this better. Feel free to open a bugzilla with an
> example. I'll try to refrain from ridiculing you. :-P
>>
>> Best regards,
>> Cyril.
Re: duplicate createEObjectAdapter [message #424740 is a reply to message #424739] Tue, 04 November 2008 15:48 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Cyril,

I guess GenPackageImpl.getUniqueClassName needs attention, but it's a
bit problematic that while the generated Switch would not have a
conflict (it uses defaultCase) the generated AdapterFactory does because
it uses createEObject...


Cyril Faucher wrote:
> Ed,
>
> If you wish, I will join to the bug the dedicated patch.
>
> Cyril.
>
> Ed Merks a écrit :
>> Cyril,
>>
>> Comments below.
>>
>> Cyril Faucher wrote:
>>> Hi,
>>>
>>> In a metamodel, I have an EClass named "EObject" having a containing
>>> EPackage named: foo.
>> That sounds like a bad idea. :-P
>>> When I am generating the corresponding Java source code (model), in
>>> the resulting Class: FooAdapterFactory, the createEObjectAdapter
>>> method is duplicated.
>> In our duplicate checking, I'd have to assume we never checked for
>> EObject conflicts. I thought we trademarked and copyrighted that
>> name. :-P
>>> I have looked for in the JET template and it seems the
>>> createEObjectAdapter method is added by default in an AdapterFactory.
>> Yep.
>>>
>>> Ok, the name of my EClass is not very ... EObject, but this case
>>> could be occured.
>> Yes, we could handle this better. Feel free to open a bugzilla with
>> an example. I'll try to refrain from ridiculing you. :-P
>>>
>>> Best regards,
>>> Cyril.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Save back only what is changed from an XML Resource
Next Topic:DOM to EMF?
Goto Forum:
  


Current Time: Fri Apr 26 17:18:52 GMT 2024

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

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

Back to the top