Book a Demo

Author Topic: wrong using statements  (Read 2497 times)

larmue

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
wrong using statements
« on: June 13, 2006, 01:07:12 am »
Hi,

we are trying to generate sourcecode from a UML model. Existing C# sourcecode has been imported and the classes included there are being referenced by the new classes we try to generate the sourcecode for. Say the referenced class is in 'package.subpackage' the generated sourcecode has a line 'using subpackage.*' which is quite wrong since the path doesn't include the upmost level. When dragging the imported class from project view to the classmodel it also seems to be wrong (it's name is only subpackage.classname).

We haven't modified any of the code generating templates so far.

Any help and hints welcome.

Regards, Lars Müller

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: wrong using statements
« Reply #1 on: June 13, 2006, 03:41:17 am »
You may need to designate one of your packages as the namespace root. Perhaps you will also need to import the .Net libraries.

Search the forum for hints on this.
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: wrong using statements
« Reply #2 on: June 13, 2006, 03:00:15 pm »
It looks like your package named 'package' has been set as a namespace root.  You'll need to clear that namespace root and set the parent package as the namespace root.

See http://www.sparxsystems.com.au/EAUserGuide/index.html?namespaces.htm