hahaking119 / vienna-add-in

Automatically exported from code.google.com/p/vienna-add-in
0 stars 0 forks source link

ASBIE/ASCCs should be automatically drawn as aggregations/compositions #144

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Unfortunately, there is no way for a profile to set the initial value of
the aggregation fields for either the source or target role of a
stereotyped association. However, there are a couple of different
approaches you might consider.

If you write an add-in, you can implement the EA_OnPostNewConnector
broadcast handler. This is called every time a new connector is created,
and you could check that it's an Association with the <ASBIE> stereotype
and if so set the aggregation value. You could even put some logic in to
make sure that the aggregation is set at the correct end. Instructions on
how to write add-ins are given in the EA help file, under "SDK for
Enterprise Architect > Enterprise Architect Add-In Model" and "SDK for
Enterprise Architect > Enterprise Architect Object Model" but it's a big
subject so if you decide to go down that route then feel free to e-mail for
assistance in getting started.

A much simpler solution would be to use the option "Tools > Options > Links
> Draw Aggregations Reversed". If you are sure that your users are always
going to draw from parent to child, then you could ask them to make sure
this option is ticked.

Finally, you could look into the idea of defining your own quicklinker
menus. You could define that <ABIE> elements have a choice of two
aggregation types to another <ABIE>, a "To Parent" quicklink could create
an aggregation with the diamond at the target end, and a "To Child"
quicklink could create an aggregation with the diamond at the source end.
Again, instructions are in the help file, under "SDK for Enterprise
Architect > Developing Profiles > Quick Linker".

Original issue reported on code.google.com by philipp....@gmail.com on 29 Apr 2010 at 11:00

GoogleCodeExporter commented 9 years ago

Original comment by michael....@researchstudio.at on 17 May 2010 at 10:01