Home » Modeling » EMF » duplicate createEObjectAdapter
|
Re: duplicate createEObjectAdapter [message #424738 is a reply to message #424737] |
Tue, 04 November 2008 15:00 |
Ed Merks 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 |
Cyril Faucher 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 |
Ed Merks 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/
|
|
|
Goto Forum:
Current Time: Fri Apr 26 17:18:52 GMT 2024
Powered by FUDForum. Page generated in 0.03849 seconds
|