Author Topic: Inconsistent code generation paths  (Read 2981 times)

dirc

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Inconsistent code generation paths
« on: March 10, 2006, 07:48:46 am »
When I try to generate code for a package from my model, I choose a folder.

Package Name: Package1
eg: C:\projects\MyProject\MyFolder


However, the path actually used is the folder name plus the package name, and I have no control over this:


C:\projects\MyProject\MyFolder\MyPackage


I would actually prefer to put the code in the folder I actually requested.




For example, I will have created a folder into which to place my skeleton code.  Either the generated files are put into another path or I have to remember to set the folder for export to be different to the one I actually want... this can be confusing!
dirc

Philipp

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Inconsistent code generation paths
« Reply #1 on: March 13, 2006, 03:06:27 am »
I requested something like this a while ago but unfortunately, I didn'g get a reply. If your packages (namespaces) do not correspond to the file system, code generation really is a pain. I would be very glad if I could just assign both a namespace and a file path to a given package in order to control this behaviour:

Code: [Select]

EA Package: Serialization
Target Folder: P:\MyProject\Core\IO
Package Namespace: Company.MyProject.IO


-> Any class would be properly serialized with an appropriate namespace at the correct place. Both forward and reverse engineering would work without problems (currently, if you adjust namespaces in generated code, reverse engineering works, but forward engineering screws the class file).

Sample:
Code: [Select]

EA: class LogWriter in package Serialization
Output:  P:\MyProject\Core\IO\LogWriter.cs
Qualified Type:  Company.MyProject.IO.LogWriter


Cheers,
Philipp
« Last Edit: March 13, 2006, 05:51:30 am by philipp »