Author Topic: MDG Int. Probs connecting package to project  (Read 7583 times)

dirc

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
MDG Int. Probs connecting package to project
« on: November 15, 2006, 05:21:56 am »
I have created a model in EA and generated the code.  The classes are all linked to the output code file and round trip engineering was working fine. My Package structure mirrors the namespace structure... Each package will more or less equate to a VS project.

I have now installed VS Integration so that I can see the model from within VS2005. Following the instructions, I have connected a package to the relevant project.

Now, when I come to Merge, EA/MDG recreates the namespace structure under my package.. not expected behaviour and it does not seem to be configurable! ???


I just want it to link the classes in my package to those in the project.

How can this be done?
« Last Edit: November 15, 2006, 05:23:26 am by dirc »
dirc

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #1 on: November 15, 2006, 05:52:17 am »
Use search to find out about this...

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

dirc

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #2 on: November 15, 2006, 07:59:49 am »
Quote
Use search to find out about this...

HTH,
Paolo



<sarcasm>Oh dear.. I NEVER thought of doing that..</sarcasm>

I did search and found nothing.. hence the post. Do you reply to every post with this witty answer?
dirc

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #3 on: November 15, 2006, 10:16:50 am »
Well, some people don't think of searching the forum, they think if it's not in the application's own Help, there's nothing.

Also, I'm sure I can remember seeing forum posts about this subject in the past, so I reckon there should be something relevant
...
just did a search on "merge namespace root package",set oldest post to 9999 days and found a couple of posts which maybe reflect the same problem - you surely found them yourself in your original search ? (Rather than finding 'nothing')

So how was Paolo to know that these posts didn't address your issue ?
« Last Edit: January 26, 2007, 03:19:34 am by mikewhit »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #4 on: November 15, 2006, 01:42:32 pm »
Try a search of 'MDG project' (without the quotes) and you'll come up with a number of relevant threads.  (With the basic result that this is how the MDG link works and is not configurable)

dirc

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #5 on: November 16, 2006, 01:17:34 am »
Well this actually makes it unusable for me... why would anyone design it like this?

Simply put, I want to link a package directly to a project. I would never want the merge to rebuild the namespace structure underneath my package, since the package is already a part of the namespace. At the very least I would want this to be a configurable option.

I cannot see how you can get this to ever work. It might work with a one project solution but how on earth can it be used with multple projects and packages, as is the norm with most solutions?
dirc

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #6 on: November 16, 2006, 03:32:13 am »
Look through help and this forum for information on setting namespace roots. Perhaps that's what you need.
No, you can't have it!

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #7 on: November 16, 2006, 04:14:15 am »
"Use search to find out about this"
;)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #8 on: November 16, 2006, 01:24:52 pm »
Quote
Well this actually makes it unusable for me...

Really? I would have thought that at worst it was inconvenient.  It doesn't actually stop the system from working.

There are numerous good reasons why you can only link to a root namespace and therefore have all namespaces below that point.  A couple of ones that pop up to me are:
  • The requirement that each package is only owned once.  This removes any uncertainty that would otherwise happen.
  • There is nothing in Visual Studio to prevent creating classes in different namespaces.  These couldn't be included in the link if you only linked to one namespace.
« Last Edit: November 16, 2006, 01:25:39 pm by simonm »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #9 on: November 16, 2006, 02:20:35 pm »
Quote
  • The requirement that each package is only owned once.  This removes any uncertainty that would otherwise happen.
Simon can you tease that out please?

Exactly what do you mean by a package being owned only once?

Why must it be owned only once?

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #10 on: November 16, 2006, 03:02:02 pm »
As described in the help for help for MDG addins an MDG addin gains exclusive control over a package.  This exclusivity is required for calls such as MDG_View where only one addin can reasonably respond.  It also has to be for a connection to a single project so that the addin knows what project to add any new EA classes into.

You could do some of this by having the Addin own the branch and then assign ownership of individual packages/namespaces to projects but I still don't think that solution provides the completeness of the current one.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #11 on: November 16, 2006, 04:08:34 pm »
Quote
You could do some of this by having the Addin own the branch and then assign ownership of individual packages/namespaces to projects but I still don't think that solution provides the completeness of the current one.
Why?

As shown by both dirc and I (in other postings) the current method is counter-productively restrictive.  I don't see why (in principle) if I so arrange that the VS Solutions and VS Projects overlap properly, the MDG link shouldn't manage it OK.

I mean, VS has no problem, so why should EA?

In any event, I go back to my first point, there's a fundamental disconnect between Import Directory and Connect to Project.  This shouldn't (in my view) be so...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #12 on: November 16, 2006, 09:24:37 pm »
If you add a file to visual studio it is unambiguous what project it belongs to.

In a hypothetical solution where EA allowed overlap of MDG packages, if you add a class into EA and generate it.  EA doesn't know what project(s) to add the file to.

It's not a parallel situation.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG Int. Probs connecting package to project
« Reply #13 on: November 16, 2006, 10:13:54 pm »
Quote
If you add a file to visual studio it is unambiguous what project it belongs to.

In a hypothetical solution where EA allowed overlap of MDG packages, if you add a class into EA and generate it.  EA doesn't know what project(s) to add the file to.

It's not a parallel situation.
What do you mean by MDG package?

Isn't it a restriction in the linkage that a given namespace must be within a single VS project?

If that's the case, there shouldn't be any problem mapping the class between the two applications.

Or have I missed the point?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!