Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 581300

Summary: [RichTextCellPainter] allow configuration of data and markup converter
Product: [Technology] NatTable Reporter: Dirk Fauth <dirk.fauth>
Component: Nebula ExtensionAssignee: Dirk Fauth <dirk.fauth>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.0.5   
Target Milestone: 2.1.0   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/199277
https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=ca3b345bb62c68ac60dced75378f6411013d4ad5
Whiteboard:

Description Dirk Fauth CLA 2023-01-09 02:37:03 EST
Currently the RichTextCellPainter uses the IDisplayConverter configured for CellConfigAttributes.DISPLAY_CONVERTER to convert the data of a cell into an HTML text. This is typically done by registering a MarkupDisplayConverter for CellConfigAttributes.DISPLAY_CONVERTER. As you can only register a single IDisplayConverter for a cell, it is not possible to have a data converter for non-string objects AND a markup display converter to get a HTML markup.
Comment 1 Eclipse Genie CLA 2023-01-09 02:39:35 EST
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/199277
Comment 3 Dirk Fauth CLA 2023-01-09 02:54:23 EST
Introduced the RichTextConfigAttributes.MARKUP_DISPLAY_CONVERTER configuration attribute so it is possible to configure a dedicated markup display converter that can be registered additionally to a CellConfigAttributes.DISPLAY_CONVERTER. The conversion is extracted into RichTextCellPainter#getHtmlText() to first convert the data via CellConfigAttributes.DISPLAY_CONVERTER. The result is then converted via the RichTextConfigAttributes.MARKUP_DISPLAY_CONVERTER if one is registered. This way the change is backwards compatible for existing configurations, but allows the configuration of an additional markup converter for future configurations.
Comment 4 Dirk Fauth CLA 2023-03-31 03:49:34 EDT
Fixed with 2.1.0