Bug 403808 - Realization of ball-and-socket notation for simple ports like in UML 2 structured classifiers specification
Summary: Realization of ball-and-socket notation for simple ports like in UML 2 struct...
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.27.1 (KDE Applications 18.12.1)
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: 2.29 (KDE Applications 19.08)
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks: 115269
  Show dependency treegraph
 
Reported: 2019-01-31 17:39 UTC by sggdev.im
Modified: 2019-11-23 13:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.29.0 (KDE Applications 19.08.0)


Attachments
Example (30.78 KB, image/jpeg)
2019-01-31 17:39 UTC, sggdev.im
Details
attachment-988-0.html (3.45 KB, text/html)
2019-02-03 09:22 UTC, sggdev.im
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sggdev.im 2019-01-31 17:39:41 UTC
Created attachment 117763 [details]
Example

Cant create correct ball and socket symbol for Ports connection through interface. The Ball can be drawn with interface, but Socket symbol with correct connection (solid line no arrow) cant be realized by existed connection types, offered in Umbrello: Dependence, Generalization, Association, Realization, Uni-association. Umbrello need to implement one more connection type - Required Connection. In attachment you can see the example of correct notation from UML 2 specification and the closest solution realized with Umbrello.
Comment 1 Ralf Habacker 2019-02-02 00:04:34 UTC
> Umbrello need to implement one more connection type - Required Connection.
Just some notes:

1. In UML (and umbrello) such connections are named associations (see https://en.wikipedia.org/wiki/Association_(object-oriented_programming))

2. The socket symbol has been introduced by UML to indicate a required interface (www.agilemodeling.com/artifacts/componentDiagram.htm)

3. The current implementation of umbrello uses an UMLAssociation type 'association' connected to the interface for "providing" that interface. 

4. in umbrello the interface get a socket symbol by adding an additional dependency or generalization.

The question is how to add this new association type.

Currently the following solutions come to my mind:

1. Take the orientation of the association as flag for showing the ball (provide) or socket (required). Adding the association from component to interface, means provide and from interface to component specifies require. The added association then needs a property to switch the direction  (relative easy to implement)

2. Add support for a <<required>> stereotype to specify a required interface

3. Another option would be to use a different association type (much more implementation work)

4. Reuse one of the available association type for supporting sockets.

I think it is required to check first if there are any UML2 related specifications to get an indication, which of the mentioned solution would be the best.
Comment 2 sggdev.im 2019-02-03 09:22:08 UTC
Created attachment 117800 [details]
attachment-988-0.html

I think the best way is

"4. Reuse one of the available association type for supporting sockets"

Dependence association is the best candidat for this.

сб, 2 февр. 2019 г., 3:04 Ralf Habacker bugzilla_noreply@kde.org:

> https://bugs.kde.org/show_bug.cgi?id=403808
>
> Ralf Habacker <ralf.habacker@freenet.de> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |ralf.habacker@freenet.de
>
> --- Comment #1 from Ralf Habacker <ralf.habacker@freenet.de> ---
> > Umbrello need to implement one more connection type - Required
> Connection.
> Just some notes:
>
> 1. In UML (and umbrello) such connections are named associations (see
> https://en.wikipedia.org/wiki/Association_(object-oriented_programming))
>
> 2. The socket symbol has been introduced by UML to indicate a required
> interface (www.agilemodeling.com/artifacts/componentDiagram.htm)
>
> 3. The current implementation of umbrello uses an UMLAssociation type
> 'association' connected to the interface for "providing" that interface.
>
> 4. in umbrello the interface get a socket symbol by adding an additional
> dependency or generalization.
>
> The question is how to add this new association type.
>
> Currently the following solutions come to my mind:
>
> 1. Take the orientation of the association as flag for showing the ball
> (provide) or socket (required). Adding the association from component to
> interface, means provide and from interface to component specifies
> require. The
> added association then needs a property to switch the direction  (relative
> easy
> to implement)
>
> 2. Add support for a <<required>> stereotype to specify a required
> interface
>
> 3. Another option would be to use a different association type (much more
> implementation work)
>
> 4. Reuse one of the available association type for supporting sockets.
>
> I think it is required to check first if there are any UML2 related
> specifications to get an indication, which of the mentioned solution would
> be
> the best.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Gerhard Landsmann 2019-02-03 16:27:20 UTC
PLEASE GET ME OFF THE DISTRIBUTION!!!


Am 03.02.19 um 10:22 schrieb bugzilla_noreply@kde.org:
> https://bugs.kde.org/show_bug.cgi?id=403808
>
> --- Comment #2 from sggdev.im@gmail.com ---
> I think the best way is
>
> "4. Reuse one of the available association type for supporting sockets"
>
> Dependence association is the best candidat for this.
>
> сб, 2 февр. 2019 г., 3:04 Ralf Habacker bugzilla_noreply@kde.org:
>
>> https://bugs.kde.org/show_bug.cgi?id=403808
>>
>> Ralf Habacker <ralf.habacker@freenet.de> changed:
>>
>>             What    |Removed                     |Added
>>
>> ----------------------------------------------------------------------------
>>                   CC|                            |ralf.habacker@freenet.de
>>
>> --- Comment #1 from Ralf Habacker <ralf.habacker@freenet.de> ---
>>> Umbrello need to implement one more connection type - Required
>> Connection.
>> Just some notes:
>>
>> 1. In UML (and umbrello) such connections are named associations (see
>> https://en.wikipedia.org/wiki/Association_(object-oriented_programming))
>>
>> 2. The socket symbol has been introduced by UML to indicate a required
>> interface (www.agilemodeling.com/artifacts/componentDiagram.htm)
>>
>> 3. The current implementation of umbrello uses an UMLAssociation type
>> 'association' connected to the interface for "providing" that interface.
>>
>> 4. in umbrello the interface get a socket symbol by adding an additional
>> dependency or generalization.
>>
>> The question is how to add this new association type.
>>
>> Currently the following solutions come to my mind:
>>
>> 1. Take the orientation of the association as flag for showing the ball
>> (provide) or socket (required). Adding the association from component to
>> interface, means provide and from interface to component specifies
>> require. The
>> added association then needs a property to switch the direction  (relative
>> easy
>> to implement)
>>
>> 2. Add support for a <<required>> stereotype to specify a required
>> interface
>>
>> 3. Another option would be to use a different association type (much more
>> implementation work)
>>
>> 4. Reuse one of the available association type for supporting sockets.
>>
>> I think it is required to check first if there are any UML2 related
>> specifications to get an indication, which of the mentioned solution would
>> be
>> the best.
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
Comment 4 Ralf Habacker 2019-07-22 21:41:15 UTC
Git commit 6c00e9878fec11f397d4f044439efda06946fcfa by Ralf Habacker.
Committed on 22/07/2019 at 21:40.
Pushed by habacker into branch 'Applications/19.08'.

We do not need a cast to get UMLWidget::localID() because it is not a virtual method

M  +2    -2    umbrello/umlwidgets/associationwidget.cpp
M  +1    -1    umbrello/umlwidgets/widget_utils.cpp

https://commits.kde.org/umbrello/6c00e9878fec11f397d4f044439efda06946fcfa
Comment 5 Ralf Habacker 2019-07-22 21:41:15 UTC
Git commit 366c2e4f4be5937efc640fa9298fe12fc9c7794d by Ralf Habacker.
Committed on 22/07/2019 at 21:40.
Pushed by habacker into branch 'Applications/19.08'.

Make WidgetRole struct member umlWidget save against dangled pointers

M  +1    -1    umbrello/umlwidgets/associationwidget.h

https://commits.kde.org/umbrello/366c2e4f4be5937efc640fa9298fe12fc9c7794d
Comment 6 Ralf Habacker 2019-08-03 17:28:16 UTC
(In reply to sggdev.im from comment #2)
> Created attachment 117800 [details]
> attachment-988-0.html

You do not need to add a reply as attachment. Instead you can simply reply to a message and cut out the uninteresting texts. ;-)

> I think the best way is

>> "4. Reuse one of the available association type for supporting sockets"
I agree 

> Dependence association is the best candidat for this.

This only is true for UML1 diagrams, not for UML2 where dependencies are an independent association type (see  http://agilemodeling.com/artifacts/componentDiagram.htm)

What remains is one or both of the following options added to (what I can see yet) normal associations.

>> 1. Take the orientation of the association as flag for showing the ball
>> (provide) or socket (required). Adding the association from component to
>> interface, means provide and from interface to component specifies
>> require. 
>>
>> 2. Add support for a <<required>> stereotype to specify a required
>> interface

>>
>> I think it is required to check first if there are any UML2 related
>> specifications to get an indication, which of the mentioned solution would
>> be the best.
The above mentioned example do not show any stereotypes on the "required" association, which let me think that option 1. would be the best.

To get an impression, it would be interesting to see how other UML tools do this.
Comment 7 Ralf Habacker 2019-08-05 08:04:08 UTC
Git commit 48ae6b8ec83505a22cdc8811feeafa3040db13a7 by Ralf Habacker.
Committed on 05/08/2019 at 04:58.
Pushed by habacker into branch 'master'.

Add UML2 support for "required interface" associations

With UML2 a "required interface" association is created by adding a
normal association from the interface to the component, wherein adding
an association from the component to the interface creates a "provided
interface".

With UML1, according to current research, there is no visible label for
a required interface mapping. This behavior has been corrected.

M  +142  -136  umbrello/assocrules.cpp
M  +2    -0    umbrello/assocrules.h
M  +2    -0    umbrello/icons.qrc
M  +25   -14   umbrello/umlwidgets/classifierwidget.cpp

https://commits.kde.org/umbrello/48ae6b8ec83505a22cdc8811feeafa3040db13a7
Comment 8 Ralf Habacker 2019-08-06 12:44:59 UTC
Git commit 3d1984979cd3b621bd4e7c6db38433d18a550672 by Ralf Habacker.
Committed on 06/08/2019 at 12:39.
Pushed by habacker into branch 'Applications/19.08'.

Add UML2 support for "required interface" associations

With UML2 a "required interface" association is created by adding a
normal association from the interface to the component, wherein adding
an association from the component to the interface creates a "provided
interface".

With UML1, according to current research, there is no visible label for
a required interface mapping. This behavior has been corrected.
Related: bug 115269
(cherry picked from commit 48ae6b8ec83505a22cdc8811feeafa3040db13a7)

M  +142  -136  umbrello/assocrules.cpp
M  +2    -0    umbrello/assocrules.h
M  +25   -14   umbrello/umlwidgets/classifierwidget.cpp

https://commits.kde.org/umbrello/3d1984979cd3b621bd4e7c6db38433d18a550672
Comment 9 Ralf Habacker 2019-08-06 12:44:59 UTC
Git commit 00ca55576b815ddd54466d1da48eeecf04d6b0d2 by Ralf Habacker.
Committed on 06/08/2019 at 12:40.
Pushed by habacker into branch 'Applications/19.08'.

Activate newly added association rules for UML2 "required interface"

Fixup of commit 48ae6b8ec83505a22cdc8811feeafa3040db13a7.

(cherry picked from commit 0514f21fbc66e54a3afb8e91d89e38b127ac1ff2)
Related: bug 115269
FIXED-IN:2.29.0 (KDE Applications 19.08.0)

M  +3    -4    umbrello/assocrules.cpp

https://commits.kde.org/umbrello/00ca55576b815ddd54466d1da48eeecf04d6b0d2