Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Generated diagram code does not respect interface name pattern - bug?
Generated diagram code does not respect interface name pattern - bug? [message #508934] Wed, 20 January 2010 17:50 Go to next message
h1055071 is currently offline h1055071Friend
Messages: 335
Registered: July 2009
Senior Member
(Apologies for cross-posting, I posted this in the GMF newsgroup but I'm
afraid to say that that group can be a little "quiet", and this one is
more lively and may have more readers)


In my domain's *.genmodel I have specified that my class name pattern is
{0} and my interface pattern is I{0}. This ensures that given the EClass
name "MyClass" the generated Java model interface is "IMyClass.java" and
the generated implementation class is "MyClass.java" (instead of the
default "MyClass.java" and "MyClassImpl.java").

This is all fine except for when I generate the diagram code from my
*.gmfgen file. The resulting Java code is full of errors because it is
using the names of interfaces without my "I" prefix ("MyClass" instead
of "IMyClass").

Is this a limitation of gmfgen or have I missed something?

TIA.

Phillipus
Re: Generated diagram code does not respect interface name pattern - bug? [message #508938 is a reply to message #508934] Wed, 20 January 2010 18:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Phillipus,

Yes, I'm not sure GMF is reusing EMF's GenModel (GenClass) to yield the
names it uses within their own generated code...


Phillipus wrote:
> (Apologies for cross-posting, I posted this in the GMF newsgroup but
> I'm afraid to say that that group can be a little "quiet", and this
> one is more lively and may have more readers)
>
>
> In my domain's *.genmodel I have specified that my class name pattern
> is {0} and my interface pattern is I{0}. This ensures that given the
> EClass name "MyClass" the generated Java model interface is
> "IMyClass.java" and the generated implementation class is
> "MyClass.java" (instead of the default "MyClass.java" and
> "MyClassImpl.java").
>
> This is all fine except for when I generate the diagram code from my
> *.gmfgen file. The resulting Java code is full of errors because it is
> using the names of interfaces without my "I" prefix ("MyClass" instead
> of "IMyClass").
>
> Is this a limitation of gmfgen or have I missed something?
>
> TIA.
>
> Phillipus


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generated diagram code does not respect interface name pattern - bug? [message #686430 is a reply to message #508934] Wed, 22 June 2011 08:41 Go to previous message
Andres Alvarez Mattos is currently offline Andres Alvarez MattosFriend
Messages: 3
Registered: June 2011
Junior Member
Hi Phillip, did you find a solution for this problem ? I'm having the same problem with gmf 2.2 (And it's quite annoying Smile )

Thanks.

Andres.
Previous Topic:[CDO] CDO4 depends on which EMF version?
Next Topic:[CDO] Retaining a reference to a model object
Goto Forum:
  


Current Time: Tue Apr 23 06:57:51 GMT 2024

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

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

Back to the top