eclipse / swtchart

Eclipse Public License 2.0
45 stars 41 forks source link

SWTChart should use MenuManager #84

Open laeubi opened 4 years ago

laeubi commented 4 years ago

Currently SWTChart uses a custom made framework to add/remove/mange Context menus. JFace already offers a MenuManger that is more flexible using actions instead of plain listeners and manages adding/removal more gracefully, it also allows deeper nesting, enable/disable on demand and dynamic menu contributions. Currently the SWTChart implementation suffers from most of these features so it would be best to switch over to the JFace Menumanager as it also allows more smooth integration with other components.

laeubi commented 4 years ago

For example under Linux it is extremely annoying: Right clicking on a (non focused) Chart open the poup-menu but immediately closes the menu (now the chart has gained focus) and the user must click once again.

eselmeister commented 4 years ago

That's a good idea. Could you provide a small code example, so that we are able to evaluate using the JFace menu manager.

eselmeister commented 4 years ago

@laeubi I can't see that you have provided a JFace menu manager example or better a PR to address this issue. When closing issues without code contribution, please write a comment. Did the problem disappear?