Author Topic: Drop element: instantiate contained classifiers  (Read 6265 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Drop element: instantiate contained classifiers
« on: November 10, 2020, 07:36:29 pm »
Hey everybody,


When you drag a classifier element onto a diagram, you can choose whether to drop it as a link, an instance or something context-specific (generalization, partition, etc).

If you elect the instance and the classifier has embedded elements (ports, activity parameters, etc, referred to as "structural elements" in the dialog) you are given the option of creating corresponding embedded elements in the instance. These may be instances of the classifier's embedded elements (action pin), or they may be essentially copies of them (ports).

But if you the classifier contains another classifier, that contained classifier is completely ignored.

I think there should be an option to create instances of contained classifiers.

So if I have a class A and a class A::B, and I drop A onto a diagram and select instance, I can get not just :A but also :A :: :B.
If that makes sense. :)


/Uffe
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Drop element: instantiate contained classifiers
« Reply #1 on: November 10, 2020, 07:48:02 pm »
Partially. It would be consistent (and thus easier to maintain; but not on planet Sparx). However, when I create instances I'm usually not interested in the instance's guts but just its hull and connection to the outside world (i.e. ports, pins, interfaces).

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Drop element: instantiate contained classifiers
« Reply #2 on: November 10, 2020, 11:27:58 pm »
... which is why it would be an option and not a change to the current behaviour.
My theories are always correct, just apply them to the right reality.