Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Is it possible to specify generated model code prefix and suffix?
Is it possible to specify generated model code prefix and suffix? [message #414702] Sat, 17 November 2007 10:48 Go to next message
h1055071 is currently offline h1055071Friend
Messages: 335
Registered: July 2009
Senior Member
Hi,

is it possible to specify somewhere (the .genmodel?) that generated
interfaces start with the letter "I" and the implementation classes do
not have the suffix "...Impl"? So we can get "IFoobar" for the
interface and "Foobar" for the class, following the pattern used in
Eclipse code?

BTW many thanks for EMF! The more I get into it, I see how powerful it is.

Thanks,

PB
Re: Is it possible to specify generated model code prefix and suffix? [message #414705 is a reply to message #414702] Sat, 17 November 2007 12:38 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Phillip,

No, though people have asked about that before. I could imagine we
could allow the client to specify a substitution pattern for both the
interface name and the implementation class name, .e.g, {0} and {0}Impl
would be the default, but I{0} and {0} would be possible. I hesitate to
suggest opening a feature request for such a thing, because we have so
many requests that we are unlikely to ever get to...

EMF has been described as "a dirty little secret" by folks who'd like to
pretend they don't rely heavily on it, and as a "Swiss army knife from
hell" by folks who think it does too much. Oh well, it's not so dirty
and clearly not so secret and while I like the Swiss army knife analogy
(hey, don't use all the utensils if you don't need them), I would have
preferred the "from hell" be dropped since last I checked I was in
Toronto...


Phillip Beauvoir wrote:
> Hi,
>
> is it possible to specify somewhere (the .genmodel?) that generated
> interfaces start with the letter "I" and the implementation classes do
> not have the suffix "...Impl"? So we can get "IFoobar" for the
> interface and "Foobar" for the class, following the pattern used in
> Eclipse code?
>
> BTW many thanks for EMF! The more I get into it, I see how powerful
> it is.
>
> Thanks,
>
> PB


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Algorithm for ComboBoxes-keyboard-selection of EMF-Ecore-Editor
Next Topic:DanglingHREFException despite containment references
Goto Forum:
  


Current Time: Tue Sep 24 18:29:49 GMT 2024

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

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

Back to the top