Book a Demo

Author Topic: Model Package has no Element  (Read 5259 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8615
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Model Package has no Element
« on: August 20, 2005, 07:39:45 am »
The Help system says (in part):
Package  A Package object corresponds to a package element in the EA Project Browser. It is accessed either through the Repository Models collection (a Model is a special form of Package) or through the Package Packages collection. Note that a Package has an Element object as an attribute - this corresponds to an EA Package element in the t_object table and is used to associate additional information (such as scenarios and constraints) with the logical package. To set additional information for a package, reference the Element object directly.

Now by Model, I think the Help system is meaning the Project Root node on the Browser.  Does that sound right?

The Model package doesn't appear to have a .Element attribute.

Can anyone else confirm that?

This would seem to be consistent with the fact that you can't open the Package Properties dialog for a Project Root, but you can for a View.

I have several repositories with multiple project roots,  I think I should be able to add standard Element properties for my project roots.  What do others think?

Cheerz,
Paolo


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

thomaskilian

  • Guest
Re: Model Package has no Element
« Reply #1 on: August 22, 2005, 03:36:12 am »
I think that the Root node should be a simple package. Its relative tree position identifies itself as a root. Maybe it could be helpfull to use the Advanced Property isRoot. Funny thing, that you can't change this Property since it's greyed out (for which reason?).

I guess that the limitation has been introduced some time ago, since I know that former versions of EA allowed elements at root level (pre 4.0?).

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8615
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Model Package has no Element
« Reply #2 on: August 22, 2005, 04:48:20 am »
Quote
I think that the Root node should be a simple package. Its relative tree position identifies itself as a root. Maybe it could be helpful to use the Advanced Property isRoot. Funny thing, that you can't change this Property since it's greyed out (for which reason?).

I guess that the limitation has been introduced some time ago, since I know that former versions of EA allowed elements at root level (pre 4.0?).
Unfortunately, Thomas, IsRoot is not available on the Automation Interface, neither for the EA.Package nor EA.Element classes.

I can't get a clear indication how to check if a package is a Project Root, View or normal Package via the interface.

I've got something working at present, but I'm pretty sure it's by accident rather than by design... :(

Paolo
« Last Edit: August 22, 2005, 04:48:30 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

thomaskilian

  • Guest
Re: Model Package has no Element
« Reply #3 on: August 22, 2005, 06:08:12 am »
Quote
... IsRoot is not available ...

That's why it's greyed out in the properties. Question to Sparx: Any reason for that?

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Model Package has no Element
« Reply #4 on: August 22, 2005, 04:34:27 pm »
I thought a model (as in "isModel") was a stereotyped package that had nothing to do with the root package.  Think about a repository that has several "complete things" in it.  Each of these could/would be contained in a separate <<model>>package, maybe using separate root nodes, maybe not.  IOW, a repository root and a UML "model" need not be the same thing.  (I cannot get this para right - hope its understandable)

The advanced property isRoot is to do with inheritance, not project positioning.  As in "isRoot" does not/can not inherit from anything vv an "isLeaf" element cannot be a parent.

Why is the root package not a normal package?  Dunno.  Also, I cant see why not.

bruce
« Last Edit: August 22, 2005, 04:36:17 pm by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.