Book a Demo

Author Topic: Adding namespaces to class for code generation  (Read 4641 times)

ferguner

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Adding namespaces to class for code generation
« on: March 18, 2009, 01:49:36 am »
Hi,

I'm newbie in EA and I've little problem: I've approximately 50 classes designed and I want to include them into some namespaces in the 'logical diagram'.

I checked the classes' properties but couldnt find a way to attach them into a namespace. Is there a way to perform this.

thanks in advance,


--
Fatih

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Adding namespaces to class for code generation
« Reply #1 on: March 18, 2009, 09:25:54 am »
In the Project Browser window, create a package representing each namespace, and drag and drop the classes into the right packages.

HTH
The Sparx Team
[email protected]

ferguner

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Adding namespaces to class for code generation
« Reply #2 on: March 18, 2009, 05:55:08 pm »
thank you for your answer but although I follow the steps, generated code does not apply namespace scoping.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Adding namespaces to class for code generation
« Reply #3 on: March 18, 2009, 09:30:10 pm »
Check out Namespace | Root in the EA help index. From there you can navigate to the following topic, showing how the icon in the project browser should change.

Note that packages under the namespace root will become your namespaces.
No, you can't have it!