Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong coloring during debugging for Spring components in the dark theme #357

Closed
vogella opened this issue Aug 29, 2019 · 9 comments
Closed
Milestone

Comments

@vogella
Copy link

vogella commented Aug 29, 2019

While initially the colors are correct in the Java editor for Spring components, at some point they switch to yellow. See screenshot.

image

Any idea where this coloring is coming from? I don't think we do this in standard Eclipse but I'm not sure.

@vogella
Copy link
Author

vogella commented Aug 29, 2019

Ah, just learned that this coloring is coming from the language server to show that additional information is available. If that color is defined as a preference you could style it better in the dark theme. Let me know if you want to do this, I can then search for an example how to style preferences via CSS.

@vogella vogella changed the title Sometimes coloring wrong for Spring components in the dark theme Wrong coloring during debugging for Spring components in the dark theme Aug 29, 2019
@martinlippert
Copy link
Member

Absolutely, any pointers and hints would be highly appreciated

@martinlippert martinlippert added this to the 4.4.0.RELEASE milestone Aug 29, 2019
@vogella
Copy link
Author

vogella commented Aug 29, 2019

OK, I assume you have a preference for this color already. In this case you can contribute styling to the dark theme for this color via an extension.

Not sure, if you have already a css for the dark theme? If not, create one file ("css/e4-dark_sts4_prefstyle.css") and point via an extension to it:

 <extension
        point="org.eclipse.e4.ui.css.swt.theme">
     <stylesheet uri="css/sts4.css" />
     <stylesheet
           uri="css/e4-dark_sts4_prefstyle.css">
        <themeid
              refid="org.eclipse.e4.ui.css.theme.e4_dark">
        </themeid>
     </stylesheet>
  </extension>

Within this file you can style your preferences.

Example (from egit)

/* ############################## EGIT preferences ############################## */

/* See bug 466075 about the pseudo-selector ":org-eclipse-egit-ui" */
IEclipsePreferences#org-eclipse-ui-workbench:org-eclipse-egit-ui {
		preferences:
			'org.eclipse.egit.ui.DiffAddBackgroundColor=11,121,90'
			'org.eclipse.egit.ui.DiffAddForegroundColor=216,254,245'
			'org.eclipse.egit.ui.DiffHeadlineBackgroundColor=71,71,71'
			'org.eclipse.egit.ui.DiffHeadlineForegroundColor=242,242,242'
			'org.eclipse.egit.ui.DiffHunkBackgroundColor=53,97,113'
			'org.eclipse.egit.ui.DiffHunkForegroundColor=233,242,254'
			'org.eclipse.egit.ui.DiffRemoveBackgroundColor=117,2,36'
			'org.eclipse.egit.ui.DiffRemoveForegroundColor=255,232,237'
			'org.eclipse.egit.ui.IgnoredResourceBackgroundColor=42,42,42'
			'org.eclipse.egit.ui.IgnoredResourceForegroundColor=120,120,120'
			'org.eclipse.egit.ui.UncommittedChangeBackgroundColor=42,42,42'
			'org.eclipse.egit.ui.UncommittedChangeForegroundColor=114,157,186'
}

The :org-eclipse-egit-ui should be replaced with your plugin ID and is important as you otherwise override styling from other plugins.

@vogella
Copy link
Author

vogella commented Aug 30, 2019

@martinlippert do you have a preference for this color already? If yes, please let me know the key for it. I could use a preference initializer to set it to something readable for me until this bug is fixed.

@vogella
Copy link
Author

vogella commented Aug 30, 2019

Also the Dashboard could use CSS configured colors with the same approach as described above.

image

@BoykoAlex
Copy link
Contributor

BoykoAlex commented Sep 5, 2019

@martinlippert do you have a preference for this color already? If yes, please let me know the key for it. I could use a preference initializer to set it to something readable for me until this bug is fixed.

The plugin id: org.springframework.tooling.ls.eclipse.commons
Preference key: 'STS4BootMarkerIndicationColor'

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Alex Boyko:)

I have updated some colors to use theme in Boot Dash. Also updated green color for boot highlights to come from the Theme. However, I have updated it for the hacky version of marker that is used together with CodeLenses (to work around the bug with CodeLens and marker painting). If CodeLens is off then the marker looks come from org.eclipse.ui.editors.markerAnnotationSpecification ext point. There doesn't seem to be any theme support for this extension, but it is the culprit for the yellow color seen on the screenshot as looks like Eclipse is trying to invert this color automatically based on the background (didn't figure out where yet)
We do not need the second hacky version of the marker - it's going away. The marker from org.eclipse.ui.editors.markerAnnotationSpecification stays, I might introduce the second marker for the dark theme if i don't find any support for themes

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Martin Lippert:)

one minor thing that I noticed: the background of the filter box in the boot dashboard is a bit too light (in the dark mode), would be better if the background would be darker.

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Alex Boyko:)

I raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=550939 All Text with SWT.SEARCH style look like that :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants