Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » return to 'eclipse types in Rose'
return to 'eclipse types in Rose' [message #389272] Mon, 15 November 2004 17:53 Go to next message
Ian Ward is currently offline Ian WardFriend
Messages: 82
Registered: July 2009
Member
Ed,
I have, gratefully, included the sample mdl you posted recently and have
therefore been able to include the EList datatype in my Rose model and so
have succesfully generated code using the EList type in a method signature,
which is what I wanted.

However, having included the 'package' Elist in my model and thence in the
genmodel of my EMF project, without, of course, generating code for it, I
have found that I get errors in all the 'package classes'. It seems they all
want to have visibility of/interdependence with all the other packages in
the model, including those for which no code has been generated. So I get
errors on references to the 'elist' package. I have filed these alongside my
problem with references to packages/classes which are not to be generated as
the code exists already - the "bridge" scenario, if you remember.

So here I am again, a bit stuck!
Ian
Re: return to 'eclipse types in Rose' [message #389273 is a reply to message #389272] Mon, 15 November 2004 19:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Ian,

Even your wrapper EClasses and EDataTypes need to have a generated
XyzPackage/XyzFactory, if you put them in a separate package. There's
no avoiding this.


Ian Ward wrote:

>Ed,
>I have, gratefully, included the sample mdl you posted recently and have
>therefore been able to include the EList datatype in my Rose model and so
>have succesfully generated code using the EList type in a method signature,
>which is what I wanted.
>
>However, having included the 'package' Elist in my model and thence in the
>genmodel of my EMF project, without, of course, generating code for it, I
>have found that I get errors in all the 'package classes'. It seems they all
>want to have visibility of/interdependence with all the other packages in
>the model, including those for which no code has been generated. So I get
>errors on references to the 'elist' package. I have filed these alongside my
>problem with references to packages/classes which are not to be generated as
>the code exists already - the "bridge" scenario, if you remember.
>
>So here I am again, a bit stuck!
>Ian
>
>
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: return to 'eclipse types in Rose' [message #389278 is a reply to message #389273] Tue, 16 November 2004 05:38 Go to previous messageGo to next message
Ian Ward is currently offline Ian WardFriend
Messages: 82
Registered: July 2009
Member
Ed,
I left them in separate packages 'cos I thought I needed to avoid code
generation for them - which would certainly happen if I'd included them in
a package for which code was to be generated.
The reason I thought I shouldn't generate code was due to a problem I'd
previously had when, mistakenly, I'd created a package for the java
datatypes I was using (I won't bore you with the reasons for that) which I,
also mistakenly, included in the code generation - as a consequence the code
generator wrote, for a simple string attribute, lots of complex 'two-way
handshaking' code as it had a 'reference' to this generated string class.
So I assume that, having generated code for this 'external type', it won't
interfere with the rest of my code and I can just ignore it - eclipse/emf
will use it appropriately?
regards
Ian

"Ed Merks" <merks@ca.ibm.com> a
Re: return to 'eclipse types in Rose' [message #389289 is a reply to message #389278] Wed, 17 November 2004 12:05 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000703070800070308040900
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Ian,

If everything is set up as I imagine, you should only get an XyzPackage,
XyzFactory, and their Impls. You will need to implement any of the
createAbcFromString/convertAbcToString methods in the factory impl for
any datatypes that need to be serialized. (If they are only used in
operations or transient features, it won't matter.)


Ian Ward wrote:

>Ed,
>I left them in separate packages 'cos I thought I needed to avoid code
>generation for them - which would certainly happen if I'd included them in
>a package for which code was to be generated.
>The reason I thought I shouldn't generate code was due to a problem I'd
>previously had when, mistakenly, I'd created a package for the java
>datatypes I was using (I won't bore you with the reasons for that) which I,
>also mistakenly, included in the code generation - as a consequence the code
>generator wrote, for a simple string attribute, lots of complex 'two-way
>handshaking' code as it had a 'reference' to this generated string class.
>So I assume that, having generated code for this 'external type', it won't
>interfere with the rest of my code and I can just ignore it - eclipse/emf
>will use it appropriately?
>regards
>Ian
>
>"Ed Merks" <merks@ca.ibm.com> a


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Customizing the accessors - are the attributes necessary?
Next Topic:Validation dialog and markers
Goto Forum:
  


Current Time: Fri Apr 26 02:14:41 GMT 2024

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

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

Back to the top