Book a Demo

Author Topic: Target File not showing during Generate Code  (Read 2951 times)

sbarkeruk

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Target File not showing during Generate Code
« on: April 05, 2005, 08:26:45 am »
I have created a test model (for evaluation) which consists of two packages in the logical view at the top level (representing an ActiveX EXE and a Standard EXE which will reference the ActiveX EXE). The default application is Visual Basic.

The two packages are set up as follows:
1) Package PersonServer consists of
a) Class modDeclarations - having the Local File path (set up in Properties | Files) as <Path>modDeclarations.bas.
b) Class clsPerson - having the Local File path (set up in Properties | Files) as <Path>clsPerson.cls.
c) Class modDeclarations - having the Local File path (set up in Properties | Files) as <Path>modDeclarations.bas.


2) Package PersonUI consists of
a) Class frmPeople - having the Local File path (set up in Properties | Files) as <Path>frmPeople.frm.

When I first clicked Generate Source Code (with Auto Generate Files unchecked and Include all Child Packages checked - Logical Model as the Root Package), this showed the correct filename under the Target File column of the objects list. Clicking Generate then created these correctly.

However I then decided that I wanted to change the path of the frmPeople object (to one subfolder below). After doing this I deleted the files that had just been deleted and then clicked Generate Code (again for whole Logical Model).

This time the Target File would only show for frmPeople. All others did not have a Target File!! So only one file was created.

After searching for clues in the forum, I tried to Reload Current Project. This made no difference. I then deleting the Local File Path for each class individually, and this again made no difference.

Is this a bug or am I doing something wrong? What worked initially no longer works!

In addition, I have two components in the component view  (representing each EXE), and have assigned a filename of type *.vbp to each of these. Is it possible to generate an empty file from this somehow, or does EA only deal with classes when generating files? If so, then why would Component properties include a files list?

I look forward to your reply,

Simon.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Target File not showing during Generate Code
« Reply #1 on: April 05, 2005, 04:25:33 pm »
I can't replicate the problem that your having.  My guess is that you're doing something wrong, but I can't think what.  (And I could be wrong and the problem is with EA)

Code generation doesn't work on components.  Only classes and interfaces.  You could try generating a vbp file from a class. (Use a different language or a stereotype)  It could link to all the classes that are included in the project and have tagged values for other bits of info that need to be generated into it.

Just an idea.  I don't know how well it would work.

Simon

sbarkeruk

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Target File not showing during Generate Code
« Reply #2 on: April 06, 2005, 01:33:56 am »
Again apologies for being a pain, but since I am doing an evaluation (and running out of time before having to decide), the main obstacle I still have to overcome is forward engineering.

If anyone could possibly suggest the 'official' steps to take in which I can set up a model and output to various files (such as the extension types mentioned above) then this would help me greatly. Even better, if anyone else can think of what I could be doing wrong to lose the file from the Target File list (despite it being assigned in properties) then this would be great.

Thanks in advance,

Simon

sbarkeruk

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Target File not showing during Generate Code
« Reply #3 on: April 06, 2005, 06:34:29 am »
Any offers? Even if I have some instructions to follow from scratch (new project) then i will try this and see if I can work out what I did differently (and where the 'bug' lies).

Thanks,

Simon