Book a Demo

Author Topic: VB.Net Generating Namespace  (Read 2851 times)

Steeverino

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
VB.Net Generating Namespace
« on: May 01, 2009, 04:09:08 pm »
I have created a small sample VB.Net class diagram using nested packages.  I can generate the code but am unable to get EA to generate the "Namespace nnnnn ...... End NameSpace" statements in the generated code for the classes.  I have set the namespace names on the packages.   Code generation specification has  Generate Namespaces to true.  I cannot figure out what I am doing wrong.
Any help would be appreciated.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: VB.Net Generating Namespace
« Reply #1 on: May 02, 2009, 01:39:17 am »
Look up Namespace Root in EA help. That might be what you need.
No, you can't have it!

Steeverino

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: VB.Net Generating Namespace
« Reply #2 on: May 02, 2009, 07:42:30 am »
I read all the EA Help info on Namespaces but didn't see that I wasn't doing.  If I go to Settings/Namespaces it shows that the namespaces are defined.  And I have set the namespace root for each package.

Still puzzled.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: VB.Net Generating Namespace
« Reply #3 on: May 04, 2009, 03:20:44 am »
You should not be setting the namespace root for each package, that's for sure. Just the very top of the 'stack' if at all. I think you need to set the namespace root of the parent package above your structure. [By that I mean a package that contains your entire hierarchy, but will not contain any of your code. Perhaps then EA will generate appropriate namespace code for each child package.

Try generating from the package you've set the namespace root on, including all children (so that your packages will be included).

Do this make any difference?
No, you can't have it!