Community
Participate
Working Groups
Created attachment 212535 [details] Screenshot I have created a specialized version of the SWTFocusCellManager, named SWTFocusBlockManager It maintains a drag state, and updates the block of cells which have focus. For this I also needed a specialized implementation of the FocusBlockHighlighter. This updates the column focus selection. While draggin, a command can be prepared. When Mouse.UP the command is executed. See a screenshot attached. - It now works with SWT.MULTI selection on. - The copy command is embedded in the SWTFocusBlockManager, while it shouldn't be part of it (It now creates dependencies on EMF Command etc...). - The focus/selection direction is now hardcoded. (Down only). - Dragging upwards doesn't pain the border properly. - Dragging can occur within the bounds of the ViewCell, it would be nice to show a handle in one of the corners to drag down.
Created attachment 212536 [details] Raw code
Created attachment 212540 [details] Code with snippet Note: As various methods from Jface are internal, I had to create exposing viewers named OpenTreeViewer and OpenTableViewers, this could eventually use protected methods, when/If part of JFace.
Oops, the current code doesn't work for column 0. - to fix remove the column check in FocusBlockOwnerDrawHighlighterForMultipleSelection -> hookListener() -> handleEvent(): if (event.index > 0) { markFocusedBlock(event, allCells); }