|
Re: static definitions in interface [message #530308 is a reply to message #530199] |
Thu, 29 April 2010 10:00 |
Ed Merks Messages: 33136 Registered: July 2009 |
Senior Member |
|
|
Alexey,
Comments below.
Alexey wrote:
> Suppose the code I want to generate should contain something like
>
> static private String MY_NOTE = "keep it save"; (or even with final)
>
> Is there any way to put that static def. in annotated java, or/and in
> eCore module, and after code generated to have it in interface? I know
> we can live without it. Just looking how to keep more in model, less
> in manually enhanced code.
No, Ecore isn't Java so will never support the full expressive power of
Java.
>
> Another question: when generate java code, you can adjust the "Base
> Package" field in genmodel package ok. But EMF still attaches the
> eCore package name after that when generates package names for your
> code artifacts. You can't change eCore package names in genmodel .
> When you go from annotated java, it means you need to update ecore
> model and then to re-generate genmodel. Is there any way to disable
> this "sticking" the eCore' package name in code generation?
No. I'm confused though. If you use annotated Java, you end up with
exactly the package you've specified in the annotated Java. If you
wanted to change it, you could change the Ecore model and then
regenerate to a different package...
>
> Thanks
> Alexey
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.01731 seconds