Bug 535907 - [TableControlRenderer] Make action bar extensible so new actions can be introduced more easily
Summary: [TableControlRenderer] Make action bar extensible so new actions can be intro...
Status: RESOLVED FIXED
Alias: None
Product: ECP
Classification: Modeling
Component: EMF Forms (show other bugs)
Version: 1.17.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.18.0   Edit
Assignee: Mat Hansen CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2018-06-14 09:38 EDT by Mat Hansen CLA
Modified: 2018-08-23 05:39 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mat Hansen CLA 2018-06-14 09:38:11 EDT

    
Comment 1 Eclipse Genie CLA 2018-06-14 09:55:05 EDT
New Gerrit change created: https://git.eclipse.org/r/124542
Comment 2 Eclipse Genie CLA 2018-06-25 11:46:39 EDT
New Gerrit change created: https://git.eclipse.org/r/124993
Comment 4 Eclipse Genie CLA 2018-07-25 18:50:11 EDT
New Gerrit change created: https://git.eclipse.org/r/126629
Comment 6 Lucas Koehler CLA 2018-07-26 05:43:08 EDT
TEST INFORMATION

Note: All changes mentioned for the table renderer also apply to the grid renderers. The explicit mention is just omitted to improve readability.

Summary of the critical part of the change

The table renderer's buttons to add, remove, and move items of a table are no longer hard coded in the table. Instead, a new ActionBar and ActionConfiguration mechanism was introduced. An ActionConfiguration allows to define actions for a table viewer. For each action, it can be defined whether a control (e.g. a button) should be rendered and/or if the action should be bound to one or more keyboard shortcuts.
Such an ActionBar and ActionConfiguration can be configured for any table viewer swt builder. These are then used by the AbstractTableViewerComposite to generate the action buttons and bind the actions' keybindings (This also applies for the grid builder and composite).

For the configuration of keybindings outside of the source code, a new view template style (VTKeyBindings) was introduced.

A concrete change in the behavior of actions occurred for the move up and move down actions of a table: The corresponding buttons are now disabled if the selected item(s) cannot be moved up or down (because they are already at the top/bottom).

For the default actions of a table renderer, no keybindings were configured.


Potential regressions

Custom implementations of table renderers that extend the buttons of a table could run into conflict with the new mechanism. Please make sure this does not happen. If it does consider adding the needed mechanism as actions by overriding TableControlSWTRender#configureActions.

The change in the move up/down enablement behavior could break unit or UI test cases.


Affected areas / use cases

Rendering of tables or creating tables with EMF Forms's table builder. Concretly, defining actions that can be executed on the table viewer


Things that shall be tested

All buttons are still shown as expected (Especially custom buttons)
All actions are executed as expected when clicking the buttons
Comment 7 Eclipse Genie CLA 2018-08-20 09:59:02 EDT
New Gerrit change created: https://git.eclipse.org/r/127714