Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Generic text editor and syntax highlighting defaults of presentation reconciler
Generic text editor and syntax highlighting defaults of presentation reconciler [message #1806157] Fri, 03 May 2019 23:54
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 149
Registered: March 2010
Senior Member
Hello,

I have contributed a presentation reconciler (org.eclipse.ui.genericeditor.presentationReconcilers) for a content type (org.eclipse.core.contenttype.contentTypes) bound to the generic text editor (org.eclipse.ui.editors of org.eclipse.ui.genericeditor.GenericEditor).

For syntax highlighting I've contributed a theme (org.eclipse.ui.themes) which defines colors for keywords, etc.

This all works great, but when I switched to test the dark theme, I realised that my keyword colors (dark blue) are barely visible against the dark background. At the same time, all text that is not styled by my presentation reconciler switched from being "black foreground" in the light theme, to being "white foreground" in the dark theme and shows very nicely.

In short, all colors I defined in my theme are dark and therefore everything I touch in my presentation reconciler looks terrible in dark theme, whereas everything I did NOT touch switches from a dark to a light font thus looking really nice.

How can I fix my colors so that they behave like the default text? I would like to have two sets of defaults: one for light themes and one for dark themes and switch between them as appropriate (unless the user has specified some specific color in preferences)...

Am I supposed to define two themes and switch between them with some listener for when the theme changes? And how do I know that some them is light or dark? I could identify the "magic names" of the themes that ship with Eclipse by default, but what if the user picks a theme that is not standard?
Previous Topic:Dark Theme and custom Table rows color
Next Topic:Problem not due to Eclipse, please remove post.
Goto Forum:
  


Current Time: Thu Apr 25 14:05:09 GMT 2024

Powered by FUDForum. Page generated in 0.03173 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top