Hi,
I could imagine to adapt the code generation templates, to produce a namespace general file (for the least packages in a hierarchy), and to sort out, what to place where based on tagged values for the classes, enums, etc. you want to place there.
I can't really tell, if this is possible. The main thing to figure out, is whether you can produce a separate file for a package element with EA's CG template engine.
If that won't work, it should be doable via an AddIn, using the MDG event hooks, IMHO. Didn't try this myself either.
HTH
Günther
PS.: Class nesting should work also. That's what I'm usually doing with internally used classes, or enum definitions releated to certain class attributes/operations. Take care to nest them in the project tree, just putting a 'nest' association doesn't serve that, AFAIE.