Book a Demo

Author Topic: Synchronizing : Forward and Reverse Engineering ..  (Read 4918 times)

juanPablos

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Synchronizing : Forward and Reverse Engineering ..
« on: August 08, 2008, 12:32:48 am »
I would like EA to generate both attributes and methods on forward engineering (model to source) but only sync methods on reverse engineering.

Is this possible? I'm working on an AS3 project.

I can do this the other way around, as I'm using stereotype overrides (to mod attributes) on export, but bringing them back in seems to be another story.

Thanks.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Synchronizing : Forward and Reverse Engineerin
« Reply #1 on: August 08, 2008, 03:49:58 am »
Hi Juan,

I think the options you need are on the Tools | Options | Source Code Engineering | Attributes/Operations dialog.

David
No, you can't have it!

juanPablos

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Synchronizing : Forward and Reverse Engineerin
« Reply #2 on: August 08, 2008, 02:58:42 pm »
Thanks David but that didn't work. I've tried everything in the spot you mentioned.

Can anyone answer the folowing questions:

1. Are Stereotype Overrides only used on forward engineering?

2. What does EA use when reverse engineering code (in the way of templates/overrides/etc)

3. Is it possible that what I need is to create a Transformation template to use on my packages after reverse engineering. The goal of which would be (in my case) delete any get/set methods automatically generated, and strip a character ($) from the beginning of all my attribute names (as my stereotype override - which is a bit of a hack does this on forward engineering.

Thanks.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Synchronizing : Forward and Reverse Engineerin
« Reply #3 on: August 08, 2008, 09:03:53 pm »
Hi again Juan,

You're getting beyond my experience here, particularly with AS. There are some pretty active AS people in the EA community, so set this thread to keep you notified of posts if you have not already done so.

Here's a couple of ideas though, while you wait. Have you explicitly set EA to work with AS3. The defaults is AS2, so you need to change it. Open the Tools | Options dialog and display the Source Code Engineering | ActionScript page. You'll see a Default Version entry. Clicking the value will activate a drop-down, from which you should choose 3.0. Once you've closed the dialog the new value will be the default.

[Verify whether this is propagated to new projects. I think it is, but there is a possibility it is retrieved from the EABase project. If it reverts to the old value, either edit EABase.EAP in the EA installation directory or use your own seed project for new projects by clicking the Copy a Base Project on the EA Start Page.]

Check out templates while you wait. Remember - this is something that is easy to miss the first time - to copy a template and edit the copy. EA just won't let you edit the original, but it is easy to miss this fact and get very frustrated. [Guess how I know.] There are plenty of examples posted to the forum (most are just code fragments, but there's lots of discussion on how to go about things). Spend some time searching the forum.

HTH, David
No, you can't have it!

juanPablos

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Synchronizing : Forward and Reverse Engineerin
« Reply #4 on: August 08, 2008, 09:10:35 pm »
Thanks David,

I'm using AS3 with Flex (Eclipse). For the record (anyone responding to this thread), imagine I asked the question in regards to Java and Eclipse (because AS3 is Java (ECMA close enough) and Flex is built on Eclipse).

Anyone feel free to add, however I've found what I need to do is synchronize model and source (both forward and reverse) instead of overwriting. Then I just have a small process when creating a new class (after EA generates it) to have round-trip engineering working (almost) smooth as silk.

Thanks again.
« Last Edit: August 08, 2008, 09:12:08 pm by juanPablos »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Synchronizing : Forward and Reverse Engineerin
« Reply #5 on: August 08, 2008, 09:24:58 pm »
The main thing is that you're not stuck while you wait.
No, you can't have it!

juanPablos

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Synchronizing : Forward and Reverse Engineerin
« Reply #6 on: August 09, 2008, 02:08:40 am »
Yes that's no fun. Thanks again Chief.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Synchronizing : Forward and Reverse Engineerin
« Reply #7 on: August 11, 2008, 08:26:16 am »
Quote
1. Are Stereotype Overrides only used on forward engineering?
Yes.  They exist only in the code generation templates.

Quote
2. What does EA use when reverse engineering code (in the way of templates/overrides/etc)
The reverse engineering process is entirely internal (not exposed to users.)

Quote
3. Is it possible that what I need is to create a Transformation template to use on my packages after reverse engineering. The goal of which would be (in my case) delete any get/set methods automatically generated, and strip a character ($) from the beginning of all my attribute names (as my stereotype override - which is a bit of a hack does this on forward engineering.
You could do this, but you then end up with a second model.  Another approach I have seen taken was an add-in that handled that modified the classes that were imported.

juanPablos

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Synchronizing : Forward and Reverse Engineerin
« Reply #8 on: August 11, 2008, 02:50:47 pm »
Thanks Simon - I'll take a look at the add-ins option.