Code generator in EMF 2.7 produced wrong codes [message #701714] |
Mon, 25 July 2011 13:21 |
Eclipse User |
|
|
|
Originally posted by: Dongyue Mou
Hallo everybody,
I just migrated all my projects to Eclipse 3.7 with EMF 2.7. Then, I found
that all classes XxxxxSwitch in the packages xxxxx.util generated by the EMF
code generator contain the same compilation error: the class
org.eclipse.emf.ecore.util.Switch<T> can not be resolved.
With a little research, I think the Switch is now called EcoreSwitch, is it
right?
And how can I let code generator produces the right code?
The plugin versions are listed below:
org.eclipse.emf.codegen 2.6.0.v20110606
org.eclipse.emf.ecore 2.7.0.v20110605
Best regards!
Dongyue Mou
--
|
|
|
|
Re: Code generator in EMF 2.7 produced wrong codes [message #702493 is a reply to message #701744] |
Tue, 26 July 2011 12:10 |
Eclipse User |
|
|
|
Originally posted by: Dongyue Mou
Hi Merks,
you are right, my projects are still referring the old plugins. After
rebuilding the eclipse workspace, the problem is solved.
Thanks!
Best regards!
Dongyue Mou
"Ed Merks" schrieb im Newsbeitrag news:j0jt7g$cr0$1@news.eclipse.org...
Dongyue,
Comments below.
On 25/07/2011 6:21 AM, Dongyue Mou wrote:
> Hallo everybody,
>
> I just migrated all my projects to Eclipse 3.7 with EMF 2.7. Then, I found
> that all classes XxxxxSwitch in the packages xxxxx.util generated by the
> EMF code generator contain the same compilation error: the class
> org.eclipse.emf.ecore.util.Switch<T> can not be resolved.
That class is in the 2.7 runtime.
>
> With a little research, I think the Switch is now called EcoreSwitch, is
> it right?
No, it's to support switch composition:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=287249
>
> And how can I let code generator produces the right code?
The code is right.
>
> The plugin versions are listed below:
> org.eclipse.emf.codegen 2.6.0.v20110606
> org.eclipse.emf.ecore 2.7.0.v20110605
I expect your target platform contains an older version of Ecore (even
if your IDE itself has installed the latest one).
If you set the Runtime Version property in the GenModel to 2.6, it will
not try to use this stuff that's new to 2.7.
>
> Best regards!
> Dongyue Mou
>
|
|
|
Powered by
FUDForum. Page generated in 0.03002 seconds