checkstyle / eclipse-cs

The Eclipse Checkstyle plug-in integrates the Checkstyle Java code auditor into the Eclipse IDE. The plug-in provides real-time feedback to the user about violations of rules that check for coding style and possible error prone code constructs.
https://checkstyle.org/eclipse-cs
GNU Lesser General Public License v2.1
97 stars 55 forks source link

Improve support for Dark Theme #98

Open eric-milles opened 6 years ago

eric-milles commented 6 years ago

With default color settings, Checkstyle markers look pretty bad under the Dark Theme (Window > Preferences > General > Appearance > Theme). I'm not sure if I can actually modify these colors or if they are chosen within the Checkstyle plug-ins code.

checkstyle

vorburger commented 6 years ago

I don't see Checkstyle in menu Window > Preferences : General > Appearances > Colours and Fonts, so it's probably hard-coded in the code... do you fancy contributing to the project :smile: by making this configurable?

lkoe commented 6 years ago

It's configurable under Preferences: General > Editors > Text Editors > Annotations There are 3 Checkstyle related annotations definitons (error, warning, info) which can be adapted.

As for supporting the dark theme out of the box, any hints how this could be done?

eric-milles commented 6 years ago

Yes, to add support for the switchover, you can add an extension like this: https://github.com/groovy/groovy-eclipse/blob/master/ide/org.codehaus.groovy.eclipse.ui/plugin.xml#L1211

The idea is to add pseudo-selectors in the CSS that match your preference names.

[https://avatars3.githubusercontent.com/u/64846?s=400&v=4]https://github.com/groovy/groovy-eclipse/blob/master/ide/org.codehaus.groovy.eclipse.ui/plugin.xml#L1211

groovy/groovy-eclipsehttps://github.com/groovy/groovy-eclipse/blob/master/ide/org.codehaus.groovy.eclipse.ui/plugin.xml#L1211 github.com groovy-eclipse - Groovy-Eclipse

There is a longer treatment of it here: https://www.eclipse.org/community/eclipse_newsletter/2018/june/darktheme.php (see Guide for plug-in developers to contribute to the default dark theme)

[https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-200x200.png]https://www.eclipse.org/community/eclipse_newsletter/2018/june/darktheme.php

Dark Theme in Eclipse Photon | The Eclipse Foundationhttps://www.eclipse.org/community/eclipse_newsletter/2018/june/darktheme.php www.eclipse.org With Eclipse Photon, we are shipping the best support for the dark theme so far!


From: Lars Ködderitzsch notifications@github.com Sent: Saturday, August 18, 2018 10:36:32 AM To: checkstyle/eclipse-cs Cc: Milles, Eric (TR Technology & Ops); Author Subject: Re: [checkstyle/eclipse-cs] Improve support for Dark Theme (#98)

It's configurable under Preferences: General > Editors > Text Editors > Annotations There are 3 Checkstyle related annotations definitons (error, warning, info) which can be adapted.

As for supporting the dark theme out of the box, any hints how this could be done?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_checkstyle_eclipse-2Dcs_issues_98-23issuecomment-2D414066523&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=q4qDiXn4Qo_9YZfp2hpL5FQvUHZxUkwShEmzJF17WRo&s=nuf8Pu4dRcgbZffLXBiquuqyQe7WVtC-NPXbLuBUXxk&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ARWdinTuuzqYWVVUiujaiLIn0YrtO9xDks5uSDSAgaJpZM4WAd-2Dt&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=q4qDiXn4Qo_9YZfp2hpL5FQvUHZxUkwShEmzJF17WRo&s=iKx0TH75y2VxGqGm0wVI6Z8JC-TO5tOHeQacc1fDfyA&e=.

caunidom commented 4 years ago

What I have done is to set the marker as "vertical bar" instead of "highlighted" on Window > Preferences > General > Editors > Text Editors and now it does not look such annoying as before.