Bug 394230 - Listpopupmenu needs refactoring
Summary: Listpopupmenu needs refactoring
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks: 393188
  Show dependency treegraph
 
Reported: 2018-05-14 06:15 UTC by Ralf Habacker
Modified: 2019-08-01 10:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.25.80 (KDE Applications 18.07.80)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2018-05-14 06:15:38 UTC
While working on bug 393188 it turned out that finding the right place where new context menu entries need to be added is hard hard work because of issues with the current ListPopupMenu implementation. 

1. It is not easy to see which constructor to use for which menu type (list view, diagrams, widgets, dialogs and other)
2. The internal implementation only have a very limited separation (m_listView, widget, umlobject). It is not easy to choose where to add entries for the different source types (list view, diagrams, widgets, dialogs and other), which results into having menu entries in unrelated menus.
3. The enum MenuType specifies separate menu entries, but the values from this enum are also used to specify completes menus, which is confusing.
Comment 1 Ralf Habacker 2018-06-11 19:17:19 UTC
Git commit 0bcf43aa0ff8a5cef25974917bf8513c0a679043 by Ralf Habacker.
Committed on 11/06/2018 at 18:52.
Pushed by habacker into branch 'master'.

Merge remote-tracking branch 'gitlab/394230-listpopupmenu-refactoring'
FIXED-IN: 2.25.80 (KDE Applications 18.07.80)


https://commits.kde.org/umbrello/0bcf43aa0ff8a5cef25974917bf8513c0a679043
Comment 2 Ralf Habacker 2018-07-25 13:26:53 UTC
Git commit 81d90170b369cac6bb6d09f5f8478a06d11783fa by Ralf Habacker.
Committed on 25/07/2018 at 13:26.
Pushed by habacker into branch 'Applications/18.08'.

Position and presence of adding plain text unified using context menu for diagrams and widgets

M  +1    -0    umbrello/menus/umlscenepopupmenu.cpp
M  +1    -1    umbrello/menus/widgetbasepopupmenu.cpp

https://commits.kde.org/umbrello/81d90170b369cac6bb6d09f5f8478a06d11783fa
Comment 3 Ralf Habacker 2018-07-25 13:41:32 UTC
Git commit 66b663bb6813ac58ec6602b2c37516deb863e230 by Ralf Habacker.
Committed on 25/07/2018 at 13:41.
Pushed by habacker into branch 'Applications/18.08'.

Fix position of adding note entry to context menu entries

It has to be added to the current menu, not the global one.

M  +3    -3    umbrello/menus/listpopupmenu.cpp

https://commits.kde.org/umbrello/66b663bb6813ac58ec6602b2c37516deb863e230
Comment 4 Ralf Habacker 2018-07-25 14:39:36 UTC
Git commit 63264ea741c32b33a1b6f95765bb643cdd729f33 by Ralf Habacker.
Committed on 25/07/2018 at 14:39.
Pushed by habacker into branch 'Applications/18.08'.

Never implemented context menu entry for adding a subsystem removed

Adding the implementation would require an extension of the translation
and the stable branch is frozen in this respect.

M  +0    -1    umbrello/menus/umlscenepopupmenu.cpp

https://commits.kde.org/umbrello/63264ea741c32b33a1b6f95765bb643cdd729f33
Comment 5 Ralf Habacker 2018-07-25 14:39:36 UTC
Git commit 144c961de29e2351321b6631e2f0e901c927638a by Ralf Habacker.
Committed on 25/07/2018 at 14:11.
Pushed by habacker into branch 'Applications/18.08'.

Remove context menu entry for adding port on component diagrams

It does not make any sense to add a port when not on a widget.

M  +0    -2    umbrello/menus/umlscenepopupmenu.cpp

https://commits.kde.org/umbrello/144c961de29e2351321b6631e2f0e901c927638a
Comment 6 Ralf Habacker 2018-07-25 14:51:10 UTC
Git commit 30fa4fcc0ab1d019d697fc48e2868b70f9d7597f by Ralf Habacker.
Committed on 25/07/2018 at 14:50.
Pushed by habacker into branch 'Applications/18.08'.

Never implemented context menu entry for adding a subsystem port removed

Adding the implementation would require an extension of the translation
and the stable branch is frozen in this respect.

M  +0    -2    umbrello/menus/widgetbasepopupmenu.cpp

https://commits.kde.org/umbrello/30fa4fcc0ab1d019d697fc48e2868b70f9d7597f
Comment 7 Ralf Habacker 2018-07-30 20:17:47 UTC
Git commit dab5718899f3bc03f5aae6338ff4473d97f6af70 by Ralf Habacker.
Committed on 30/07/2018 at 16:05.
Pushed by habacker into branch 'Applications/18.08'.

Never implemented context menu entry for adding actor, usecase, component, artifact and activity from a widget

Adding the implementation would require an extension of the translation
and the stable branch is frozen in this respect.

M  +0    -12   umbrello/menus/widgetbasepopupmenu.cpp

https://commits.kde.org/umbrello/dab5718899f3bc03f5aae6338ff4473d97f6af70
Comment 8 Ralf Habacker 2018-09-17 11:35:59 UTC
Git commit 50d24f7cef29d492eb0ac164a84c511374400815 by Ralf Habacker.
Committed on 17/09/2018 at 10:31.
Pushed by habacker into branch '394230-bug-fixing'.

Fix adding subsystem from context menu to component diagrams

M  +1    -0    umbrello/menus/umlscenepopupmenu.cpp
M  +12   -0    umbrello/umlscene.cpp

https://commits.kde.org/umbrello/50d24f7cef29d492eb0ac164a84c511374400815
Comment 9 Ralf Habacker 2018-09-17 11:36:00 UTC
Git commit 6377bb02345a82030ac7c0fa1b3bdea131cae6a6 by Ralf Habacker.
Committed on 17/09/2018 at 10:32.
Pushed by habacker into branch '394230-bug-fixing'.

Fix adding ports to components on component diagram

M  +11   -0    umbrello/menus/widgetbasepopupmenu.cpp
M  +15   -0    umbrello/umlwidgets/umlwidget.cpp

https://commits.kde.org/umbrello/6377bb02345a82030ac7c0fa1b3bdea131cae6a6
Comment 10 Ralf Habacker 2018-10-05 21:26:38 UTC
Git commit a8dbaba8164ff1660e4fdfcf7c961f0fd6dd2b76 by Ralf Habacker.
Committed on 05/10/2018 at 22:15.
Pushed by habacker into branch 'master'.

Fix adding subsystem from context menu to component diagrams

M  +1    -0    umbrello/menus/umlscenepopupmenu.cpp
M  +12   -0    umbrello/umlscene.cpp

https://commits.kde.org/umbrello/a8dbaba8164ff1660e4fdfcf7c961f0fd6dd2b76
Comment 11 Ralf Habacker 2018-10-05 21:26:39 UTC
Git commit 4af37ad57f6622f49fb0ebe2a874b19c9cec5f00 by Ralf Habacker.
Committed on 05/10/2018 at 22:15.
Pushed by habacker into branch 'master'.

Fix adding ports to components on component diagram

M  +11   -0    umbrello/menus/widgetbasepopupmenu.cpp
M  +15   -0    umbrello/umlwidgets/umlwidget.cpp

https://commits.kde.org/umbrello/4af37ad57f6622f49fb0ebe2a874b19c9cec5f00
Comment 12 Ralf Habacker 2018-10-05 22:27:19 UTC
Git commit 6cb829c7d474edeb4073b385daa6cdad9853ca22 by Ralf Habacker.
Committed on 05/10/2018 at 23:25.
Pushed by habacker into branch 'master'.

Refactor adding menu entries from action collection

M  +22   -26   umbrello/menus/listpopupmenu.cpp
M  +1    -0    umbrello/menus/listpopupmenu.h

https://commits.kde.org/umbrello/6cb829c7d474edeb4073b385daa6cdad9853ca22
Comment 13 Ralf Habacker 2019-02-13 16:52:33 UTC
Git commit 0d2f0021b63469c2a6011700796584dc9231e2e7 by Ralf Habacker.
Committed on 13/02/2019 at 16:52.
Pushed by habacker into branch 'Applications/18.12'.

Fix crash on adding ports to component widget by context menu

M  +1    -0    umbrello/umlwidgets/umlwidget.cpp

https://commits.kde.org/umbrello/0d2f0021b63469c2a6011700796584dc9231e2e7
Comment 14 Ralf Habacker 2019-05-31 08:17:22 UTC
Git commit 157824d4afa5aa716d29aa4e1211fc7390c3d8e7 by Ralf Habacker.
Committed on 31/05/2019 at 08:14.
Pushed by habacker into branch 'master'.

Merge multiple definitions of menu entries into one place

M  +104  -171  umbrello/menus/listpopupmenu.cpp
M  +1    -1    umbrello/menus/listpopupmenu.h
M  +7    -7    umbrello/menus/umlscenepopupmenu.cpp
M  +13   -13   umbrello/menus/widgetbasepopupmenu.cpp

https://commits.kde.org/umbrello/157824d4afa5aa716d29aa4e1211fc7390c3d8e7
Comment 15 Ralf Habacker 2019-08-01 10:53:12 UTC
Git commit 8bdce12dede45d9467148e67e2711c032cec0873 by Ralf Habacker.
Committed on 01/08/2019 at 10:52.
Pushed by habacker into branch 'master'.

Simplification of the logic in the context menu for the inversion of the alignment

M  +2    -0    umbrello/menus/listpopupmenu.cpp
M  +2    -1    umbrello/menus/listpopupmenu.h
M  +2    -10   umbrello/menus/widgetbasepopupmenu.cpp
M  +5    -11   umbrello/umlwidgets/forkjoinwidget.cpp
M  +5    -3    umbrello/umlwidgets/statewidget.cpp

https://commits.kde.org/umbrello/8bdce12dede45d9467148e67e2711c032cec0873
Comment 16 Ralf Habacker 2019-08-01 10:53:12 UTC
Git commit 8249c4e3b1f30eddf4f0fbd782e32743d895d7b9 by Ralf Habacker.
Committed on 01/08/2019 at 10:52.
Pushed by habacker into branch 'master'.

Merge definitions of menu entries into one place

All actions adding menu entries should be located in
ListPopupMenu::insert().

M  +7    -0    umbrello/menus/listpopupmenu.cpp
M  +29   -30   umbrello/menus/umlscenepopupmenu.cpp
M  +3    -4    umbrello/menus/widgetbasepopupmenu.cpp

https://commits.kde.org/umbrello/8249c4e3b1f30eddf4f0fbd782e32743d895d7b9