Book a Demo

Author Topic: Synchronise model with code: Class name Change  (Read 4401 times)

AndyLightowler

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Synchronise model with code: Class name Change
« on: May 02, 2007, 12:52:12 am »
Hi,

I have imported C# class diagrams into EA and used to generate models of my solution.

However during further work on my code I decided to change the name of a few classes to add clarity.  I change the corresponding EA objects to the same name, but now when I synchronise with code the latest changes to my code are no longer imported into EA.

How do I get EA to recognise the class name change?

Bokkie

  • EA User
  • **
  • Posts: 80
  • Karma: +0/-0
  • Lima Bravo!
    • View Profile
Re: Synchronise model with code: Class name Change
« Reply #1 on: May 02, 2007, 02:49:21 am »
Make sure that in EA a) the class name and b) the property 'Filename' matches the class name and filename.
Lima Bravo!

sl@sh

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: Synchronise model with code: Class name Change
« Reply #2 on: May 02, 2007, 10:05:09 pm »
There is no property 'Filename'* - at least none that is visible within the properties dialog (and, as an aside, I find this rather ... awkward)

To change the filename associated with a class in EA, open the Generate Code dialog (Ctrl-G should work), then make sure the Path shown matches the filename this class should be generated to. Press the button [Save] to preserve any changes made to this dialog.

* P.S.: There *is* a tab sheet 'Files' in the properties dialog, however, setting the file path here doesn't appear to make any difference to code generation. I'm not sure what this tab sheet is good for - code generation is not it.  ???
« Last Edit: May 02, 2007, 10:12:00 pm by sl@sh »

peter.zrnko

  • EA User
  • **
  • Posts: 253
  • Karma: +0/-0
    • View Profile
Re: Synchronise model with code: Class name Change
« Reply #3 on: May 02, 2007, 11:48:54 pm »
The property "Filename" could be found in dockable Window Properties.

It's for detectives -:)
Peter

sl@sh

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: Synchronise model with code: Class name Change
« Reply #4 on: May 03, 2007, 12:26:35 am »
Aargh - I never look there. Always thought it's just a subset of the properties dialog anyway!?

Apparently it isn't  :-/

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Synchronise model with code: Class name Change
« Reply #5 on: May 03, 2007, 02:11:23 am »
Quote
Aargh - I never look there. Always thought it's just a subset of the properties dialog anyway!?

Apparently it isn't  :-/
We keep warning about  EA's UI (Unique Interface) ;)

Maybe v7 will alleviate this...

Paolo

Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!