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

Bug 350041

Summary: StyledCellLabelProvider ignores fontStyle parameter of StyleRange
Product: [Eclipse Project] Platform Reporter: Thomas Singer <eclipse>
Component: UIAssignee: Sebastian Ratz <sebastian.ratz>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: andreas.r.fischl.work, ma.becker, sebastian.ratz
Version: 3.7   
Target Milestone: 4.18 M3   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/170648
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7f1bbae80300f5d01c9155f59a3a2ddd497152d1
Whiteboard:
Attachments:
Description Flags
Test case none

Description Thomas Singer CLA 2011-06-22 08:33:48 EDT
Build Identifier: 3.7.0.v3735b

It seems impossible to set italic or bold font using the fontStyle parameter of the StyleRange.

Reproducible: Always

Steps to Reproduce:
1. launch the attached test case
2. it shows red and black text, the red part should be bold but isn't
Comment 1 Thomas Singer CLA 2011-06-22 08:34:37 EDT
Created attachment 198394 [details]
Test case
Comment 2 Andreas Fischl CLA 2013-10-06 05:49:02 EDT
This seems to be a duplicate of bug 131988 (colors are fine; fontStyle works with a LineStyleListener but not with a StyledCellLabelProvider).
Comment 3 Eclipse Genie CLA 2020-07-16 00:13:24 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Sebastian Ratz CLA 2020-10-12 09:47:00 EDT
Reopening this.

StyledText / StyledTextRenderer (in swt.custom) supports already this by dynamically creating Font objects based on fontStyle.

StyledCellLabelProvider (in jface) should too. It can be implemented in a very similar fashion.

Having this would make it *much* easier to implement light-weight StyleRanges that can be re-used and dynamically work even after font size settings in preferences are changed.
Comment 5 Eclipse Genie CLA 2020-10-12 10:34:16 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/170648
Comment 7 Matthias Becker CLA 2020-10-19 01:26:38 EDT
(In reply to Eclipse Genie from comment #6)
> Gerrit change
> https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/170648 was merged
> to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=7f1bbae80300f5d01c9155f59a3a2ddd497152d1

Thanks Sebastian for fixing. Can this bug be closed?