Community
Participate
Working Groups
Build Identifier: HEAD Currently, the Grid compontent truncates any cell content "in the middle" and shows an equal number of characters to the left and right of the pivot point. However, the standard SWT TreeViewer widget cuts off content at the end. e.g. "demo content" --> GRID: |dem...ent| TREE: |demo c...| Depending on the use case, one or the other may be more useful. I am currently porting an application from TreeViewer to GridTreeViewer and need to maintain a consistent user experience - including truncation at the end. I'll attach a patch that adds a setTruncationStyle() method to all Renderers. The Renderers ultimately pass that to TextUtils, which I modified to de-duplicate the existing code. The new code currently proposes three truncation styles: START: |...ontent| MIDDLE: |dem...ent| END: |demo c...| Reproducible: Always
Created attachment 186042 [details] Suggested patch
Fixed in Nebula 2.3.0 (my first enhancement on Grid) Thank to Hannes Erven for the patch. I had to change what Hannes did on TextUtils because the code changes a lot since 2011