Consider a tree with three levels: L1, L2, L3 (but this is only a special case, for the convenience of questions, there are no restrictions on the number of levels and children at each level).
Each level contains a key and a value (for example, [string, integer]).
Algorithm . If direct children have the same value, then these values are not displayed at the child level, but at the parent level. Only leaves can make a difference; parents simply present data depending on the contents of the sheet .
My solution : I changed my mind. I need a generic solution excluding JFace LabelProviders. I move the tree in order and save the values on the map. I would prefer to save only entries that are not null (i.e. the level has something to display). Performance is critical.
    Case 1 Case 2 Case 3
-------------- -------------- --------------  
L1 | 1 L1 | - L1 | -
| - L2 | - | - L2 | 1 | - L2 | -
| | - L3 | - | | - L3 | - | | - L3 | 1
| + - L3 | - | + - L3 | - | + - L3 | 2
+ - L2 | - + - L2 | 2 + - L2 | -
    | - L3 | - | - L3 | - | - L3 | 1
    + - L3 | - + - L3 | - + - L3 | 2
: , . , getColumnText(Object element, int columnsIndex), element - L1/L2/L3, columnIndex .
. , element, / , , conicide. , element. , , . reaaaaaallllllyyyy , .
: , ( getColumnText). ? , , "" ?
a >