Book a Demo

Author Topic: MDG/Visual Studio and namespaces in large project  (Read 2035 times)

larsgk

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
MDG/Visual Studio and namespaces in large project
« on: November 10, 2006, 01:43:55 am »
I understand that MDG link for VS 2005 will enforce that the package linked to the project is set as namespace root.
I work on a large-scale project, which has a deep namespace structure and several VS 2005 solutions, which we want to keep synchronized with our UML model in EA.

The package (and intended namespace hierarchy) looks like:

Implementation (Namespace root)
+-Company
 +-Project
   +-subsystem1 (Realized by one VS 2005 solution)
     +-ComponentA (linked to VS2005 project)
     +-ComponentB (linked to VS2005 project)

An example class defined in VS2005 project ComponentA looks like:

namespace Company.Project.subsystem1.ComponentA
{
 class A
 {
 ...
 }
}

When we synchronize the model with the code, EA generates a complete namespace hiearachy below the ComponentA package, which of course is caused by MDG setting ComponentA as namespace root. But I don't want that!
A possible work-around would be to always create new classes in the EA model, generating the initial class file by forward code engineering. Forward engineering actually works as expected, but that is a clumsy workflow in many cases.

Can someone suggest a better way of using MDG link with our project structure?

Sparx, how about making the MDG/VS integration more flexible, allowing connections without forcing the package to be namespace root?
« Last Edit: November 14, 2006, 02:39:48 am by larsgk »