Search code examples
eclipsepreferences

Eclipse Luna Unable to Save Preferences


Using Eclipse Version: Luna Service Release 1 (4.4.1) -- with the CDT bundle as a base -- with most packages installed using pacman/yaourt under /usr, I am unable to persistently save a few preferences relating to appearance. Though most of the preferences I have set seem to stay over restarts; two only work during one run of eclipse: - General/Appearance/ColorTheme/SetAllBackgroundColorsToTheDefault - General/Editors/TextEditors/Annotations/*

Oddly, the first listed setting shows in the preferences window as set the way I chose; however, eclipse seems to simply ignore it unless I go in and toggle the setting, apply, toggle and reapply.

The Annotarions settings, however, work when set; but on restart, the preferences window show them as having been changed from what I set. It is as if the setting is never persisted to disk.

I have made sure that I own and have u+rw permissions on everything in ~/.eclipse. I have also tested by moving .eclipse to .eclipse_back and running with a new user conf dir. I've also tried the -initialize and -clean switches. Nothing seems to remedy this oddness. Any guidance?

----- EDIT

I have discovered that the annotation and colortheme preferences live under <workspace>/.metadata/. I have verified write access to this dir tree as well. I have also tried changing: warningTextStyle=DASHED_BOX in .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs manually when no eclipse instance is running. While this setting stays persisted in the file, eclipse seems to simply ignore it. WT_?

----- EDIT 2

Manually editing usr/share/eclipse/plugins/org.eclipse.ui.themes_1.0.1.v20140819-1717/css/dark/e4-dark_preferencestyle.css is also only partially useful. To be specific, changing 'AbstractTextEditor.Color.SelectionForeground.SystemDefault' from false to true does indeed work as expected. Changing the annotations like 'warningHighlightingTextStyle=DASHED_BOX' does not seem to make any difference.


Solution

  • I had suffered a long time from the same problems with Annotations setting in Luna/Dark theme. In e4-dark_preferencestyle.css you need to change warningIndicationHighlighting=true to warningIndicationHighlighting=false as well. Afterwards, the text style options like BOX or SQUIGGLES do work as expected.