Book a Demo

Author Topic: Synching Code and Models  (Read 4139 times)

drdruish

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Synching Code and Models
« on: May 10, 2008, 05:41:18 am »
Greetings,

I'm hoping that I'm just making a silly mistake and someone can point it out to me. Here's the steps I've taken...

  • Developed detailed models in EA before touching code.
  • Generated source code from my models using EA.
  • Implemented my various methods, added a method to a couple of classes AND added a couple of new classes while coding.
  • Obviously, the models and code are out of sync. (But still very close to each other, I did 99% of the design work in EA.)
  • Synchronize package with code appears to update the classes that were originally in the models, but ignores the new classes.
  • Import source directory completely ignores the existing classes and diagrams, creates duplicates of everything and puts them in different packages.

I've played with all the options for the synchronize and import source that I see. I'd understand this problem if the models and code weren't so tightly linked, but I used EA to generate the code in the first place, changed it VERY minimally from a structural standpoint, and now I have to re-create all my diagrams and check that EA correctly reverse engineered all the relationships?

This is more than a little frustrating, so I'm really hoping someone can point out the error of my ways.

Quick facts...

  • I'm using the latest (within the last month or two) version of EA.
  • My code is written in c#, with four namespaces. (Each representing a tier)
  • I haven't moved/reorganized the code since EA generated it.
  • I've made few if any changes to the models since EA generated code.

Thanks for the help!

Drew

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Synching Code and Models
« Reply #1 on: May 10, 2008, 06:38:36 am »
Hi Drew,

On the surface it sounds like you've done the right things, and taken the right precautions (not moving the code, etc.).

What settings do you have on the import code dialog? And what are the settings on the Tools | Options | Source Code Engineering panel?

David
No, you can't have it!

drdruish

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Synching Code and Models
« Reply #2 on: May 10, 2008, 07:46:31 am »
Success!

Realizing that at some point I must have modified the default package(folder) structure in EA, I moved my code to another directory, re-exported my models to code in the original directory ensuring that the directory structure matched, removed the generated code, moved the old code back to this location, and successfully imported this code and updated the models without creating duplicates.

In the future, a slightly friendlier way of doing this would be nice (ahem) but for the time being I'm just happy my models and code are syncing again, hopefully the steps I outlined help someone else in my situation.

Thanks for the help!

Drew

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Synching Code and Models
« Reply #3 on: May 10, 2008, 07:50:13 am »
Bingo!

Thanks for closing the loop Drew.

If you can think through a more friendly method - there's got to be many good approaches available - then by all means start a thread in the Suggestions section.

Once you've done that make a feature request to Sparx, and quote the URL of the suggestion thread in your request. That will help the Sparxians participate in the ensuing discussion. Given the way code engineering works, and the complexity of the current process, I've little doubt that discussion will be spirited.

You'll find the suggestion form by clicking the Feature Request link under the Support link near the bottom of any forum page.

David
No, you can't have it!