Book a Demo

Author Topic: Code Generation  (Read 2790 times)

ObjectClassifier

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Code Generation
« on: October 18, 2009, 03:55:57 pm »
When creating java classes, it appears that you have to create the package hierarchy in order to place the classes at the correct level to generate code correctly in the filesystem.   Why can't you just create a single package called com.test.tester and have the software create the appropriate directory structure?  I'm using verison 7.5 and the documentation appears to indicate this is possible, but I was not able to create java files in the correct directory structure without creating a nested set of packages in the modeling structure.  Very odd.

Also, when importing classes in a package, the tool doesn't create a package.  Should I assume that this tool is not really designed to support code creation and reverse engineering?  Also, it doesn't seem to be able to reverse engineer directory structures in a project.  

Is this primarily a drawing tool?

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Code Generation
« Reply #1 on: October 18, 2009, 11:48:26 pm »
Hi,

Quote
Is this primarily a drawing tool?
No, it's definitely not! Its a full featured UML modelling tool (vs. Viso for instance).
As far I have experienced, packages are fully forward and reverse engineered by EA (but this was for C++, not Java). So consequently, you cannot 'shortcut' a single package within the namespace path.

HTH,
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code Generation
« Reply #2 on: October 19, 2009, 09:25:55 am »
Use Import Source Directory to reverse engineer a directory structure.  (It will also create the appropriate packages)