MrDia
(Ad)
December 20, 2018, 2:07pm
1
Hello,
I use Eclipse Java EE IDE for Web Developers. Version: 2018-09 (4.9.0) with Dark Theme enabled.
Here is what I get in SonarLint Rules Description :
As you can see the font is dark, making it difficult to read. How can I change this font color to get a “white” one ?
Thanks for the help.
Hi,
Here is how it looks on my side (Linux):
Are you using the official Dark Theme? What is your operating system? Also what is your version of SonarLint?
++
MrDia
(Ad)
December 20, 2018, 2:59pm
3
Hi Julien,
Thanks for the quick reply.
I’m using the official Dark Theme, also I’m on Windows 7 Pro x64.
Here is my SonarLint version :
I had it white like you at the beginning when I installed the plugin. But I dont know how, it changed to this black foreground color few days after the install.
I tried to uninstall / reinstall, without success…
Your last screenshot shows that your dark theme is not correctly applied (About Eclipse IDE is not dark) so maybe you have a configuration issue on your side.
The SonarLint Rule Description view is using colors provided by Eclipse (using a hidden component). You can see the code here:
data.exclude = true;
hiddenLabel.setLayoutData(data);
try {
browser = new Browser(this, SWT.FILL);
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
browser.setJavascriptEnabled(false);
// Cancel opening of new windows
browser.addOpenWindowListener(event -> event.required = true);
// Replace browser's built-in context menu with none
browser.setMenu(new Menu(parent.getShell(), SWT.NONE));
this.foreground = hiddenLabel.getForeground();
this.background = hiddenLabel.getBackground();
parent.addPaintListener(e -> {
boolean colorChanged = false;
if (!Objects.equals(hiddenLabel.getForeground(), foreground)) {
this.foreground = hiddenLabel.getForeground();
colorChanged = true;
}
if (!Objects.equals(hiddenLabel.getBackground(), background)) {
this.background = hiddenLabel.getBackground();
colorChanged = true;
Maybe this is not working properly on Windows. I will give a try asap, but I only have Windows 10, so not sure this will be the same behavior.
MrDia
(Ad)
December 20, 2018, 3:53pm
5
Thanks for the reply,
I do think the Dark Theme is applied as much as it can on W7.
The thing is I had it working for a while… Wich type of label use this hiddenLabel between those :
Waiting you to get back with results on W10…
Sorry for the late reply, but I was finally able to reproduce the issue on Windows 10.
Ticket created:
https://jira.sonarsource.com/browse/SLE-296
SR-G
(Serge)
August 2, 2019, 9:17am
7
Hey.
Same problem for me. Is there an easy workaround (like manually changing some eclipse font color) ?