eclipse-nattable / nattable

High performance SWT data grid
https://eclipse.dev/nattable/
Eclipse Public License 2.0
15 stars 6 forks source link

[FillHandle] Improve fault handling #86

Closed fipro78 closed 5 months ago

fipro78 commented 5 months ago

There are two places in the fill handle classes, that currently have negative impact on adapting the fill handle in more complex setups:

  1. FillHandleLayerPainter
    The check if the positionRectangle is valid is missing. The SelectionLayerPainter does such a check, to ensure the the returned rectangle does not contain negative values. If someone wants to extend the FillHandleLayerPainter or uses it in a composition that is different from the defaults, it might happen that there you also get an invalid retangle. In such cases you see a NegativeArraySizeException all over. Therefore we should add the check if the rectangle is valid also to the FillHandleLayerPainter
  2. FillHandlePasteCommandHandler
    Currently the value to paste in the cell is always calculated, whether a cell is editable or not. This is not necessary, and might lead to issues in cases where the calculation is done for a series although the cell is not editable for semantic reasons. The cell value should therefore only be calculated if the cell is editable.