MPS-extensions
MPS-extensions copied to clipboard
Tables: Various fixes to table end cells in combination with insert and deletion handler
@arimer to test the changes, please have a brief look at the MPS-Extensions Tables Sandbox to check for broken stuff. I didn't add any delete or insert handlers there.
For proper testing, you can open https://github.com/IETS3/iets3.opensource/tree/bugfix/tables as a second project and check instances of the following concepts: DataTable, Sheet, LookupTable, DecTab.
When the default implementation for deletion is used (not derived from a header deletion handler), there is a differentiation between BACKSPACE (delete to the left of cursor) and DELETE (delete to the right of the cursor). For the derived delete actions we could create a followup ticket. For INSERT (enter) and INSERT_BEFORE (Shift + Enter) the same applies. For all actions this means that depending on the ACTION it modifies the row before the current row, the current row or the next row. The left and right cell therefore modify different rows. Example: DELETE on a left end cell deletes the current row since it is to the right of the cell, DELETE on a right end cell deletes the next row.
I didn't open a PR in IETS3 yet because without this PR the other PR doesn't build. I also added a few helper methods such as Grid#setEndCellAction
that are unused in both repos as the moment but could be useful for other people.
- fixes https://github.com/JetBrains/MPS-extensions/issues/953
- fixes https://github.com/JetBrains/MPS-extensions/issues/955 in combination with https://github.com/IETS3/iets3.opensource/tree/bugfix/tables
- fixes https://github.com/JetBrains/MPS-extensions/issues/958