Book a Demo

Author Topic: Model -> Code Synchronisation acting strangely  (Read 1999 times)

sbarkeruk

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Model -> Code Synchronisation acting strangely
« on: April 06, 2005, 07:44:57 am »
Using Windows XP (SP1 - not allowed to install SP2 at present, due to clashes with other applications!). In my Object options I have left the recommended setting of 'Always Synchronise with existing file'.

My model (which I want to use to generate Visual Basic 6 code) consists of 4 classes, which are assigned files as follows:

1) Class clsPerson whose local file is C:\UML Test\EA\PersonProject\clsPerson.cls
2) Class clsPeople whose local file is C:\UML Test\EA\PersonProject\clsPeople.cls
3) Class modDeclarations whose local file is C:\UML Test\EA\PersonProject\modDeclarations.mod (i.e. will be a module, as opposed to class module, in VB6).
4) Class frmPeople whose local file is C:\UML Test\EA\PersonProject\UI\frmPeople.frm (i.e. will be a form in VB6). Note also that this is in a subfolder below those in 1), 2) and 3) as this will be in a seperate project (1 - 3 are part of an ActiveX EXE and 4 is a Standard EXE).

Anyway, the strange occurence happens when I come to generate code. When I initially generate the code, all 4 files are created in the relevant folder with the correct extension, etc. Also the timestamp (seen via Windows Explorer) shows that these have just been created.

However, the weird bit is that if I do either a) Generate Source Code or Synchronise Package Contents (Model -> Source) when no changes have been made then only the file in 4) above gets updated (or at least it is the only one with a new timestamp).

So I am wondering why, if no changes have been made, would one file be updated and the others not?? Or is it a timestamp bug??

BTW just to clarify further, when I am generating/synchronising I am doing this by selecting the Logical Model then choosing Include All Child Packages (1 - 3 are stored in one package, and 4 in another, both with Logical Model as the parent node/root) so all 4 files are showing up in the generation output window.

Simon

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Model -> Code Synchronisation acting strang
« Reply #1 on: April 07, 2005, 04:00:01 pm »
EA won't write the file when synchronising unless it is going to change it.  Your fourth file should be being changed by EA in some way.

I notice that the one that is being modified is a form.  Have you been modifying templates?  I'm just asking because my best guess without seeing any files is that you've made a form stereotype override to the class declaration template and have some trailing (or leading) whitespace on the form.

That will result in some extra whitespace being added to the end of your class declaration every time you generate.

Anyway, it's just an idea and something to look at.

Simon