Book a Demo

Author Topic: Code Engineering Features  (Read 2160 times)

radman

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Code Engineering Features
« on: August 06, 2008, 10:06:27 am »
Hi,

I'm pretty new to using enterprise architect and i recently bought it on an academic license. I have been trying to come to grips with ea's code engineering facilities. I am working in C++ and i have hit a couple walls that i was hoping could be clarified.

I have one main problem:
Synchronising code doesn't work effectively. If i delete a method from the diagram, that method will remain in the code, or if i renamed it there are now two methods. This also applies to variables and classes.
I've also found that adding include files in the box provided in the interface failed to put the declaration in the source file even after several attempts.

For me this is fatal, if i can't control these basic things from the diagram then it is more work managing the relationship between them than it is worth.

Ideally i see the code generation functions as maintaining the class function and variable names in the header and source files, so if something needed to be refactored it could be done at a diagram level reducing the hassle manually renaming things (which is error prone and time consuming).

As it stands ea is a forward code generator and that's it.

Now i am aware that there is a MDG integration for visual studio available and i assume that this solves the problems that i am outlining. I was wondering if someone could clarify if this is addressed or not.  (I have watched the promotional video)

I would just like to finally add that the documentation for code engineering in ea is practically non-existent, the help guide simply informs of the functions of the controls, not very helpful. Also documentation on how to modify and write code templates is too cursory.

Sorry, that was bit of a rant, any clarification about the Visual Studio integration addressing the code engineering issues would be appreciated.



Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code Engineering Features
« Reply #1 on: August 07, 2008, 08:31:50 am »
Look at the options in Tools | Options | Source Code Engineering, the options there solve both of these problems.

radman

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Code Engineering Features
« Reply #2 on: August 07, 2008, 09:23:52 am »
Which options are you referring to?
I'm assuming that you mean

Tools | Options | Source Code Engineering | Operations and Attributes | On Forward Synch Prompt to Delete Code Features Not in Model

This does allow for prompted removal of methods and effectively renaming. I have noticed that method bodies in the cpp file are not removed as part of the synch process, is there another option i'm missing or is this the expected behaviour?


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code Engineering Features
« Reply #3 on: August 08, 2008, 09:06:32 am »
Yes, that option.  There are also equivalent options for reverse engineering that you will also want to set.

If the method bodies in the cpp file aren't being removed, then I suspect that EA isn't able to find the cpp file.  You'd need to play around with 'Source Extension' and 'Source Path' on the C++ options page to get this to work.