|LogView does not use settings from DEFAULT preferences scope [message #997306]
||Sat, 05 January 2013 14:37
| Petras Petkus
Registered: July 2009
This post is related to PDE Error Log View, that is available with org.eclipse.ui.views.log bundle. In Eclipse based RCP application I used it as an error log viewer. This post is about one feature of this View: activating on new log events (this setting is available through LogView menu). Once changed it persists over next sessions. |
The annoyance comes when user starts application for the first time or clears user data, then this setting always defaults to "true". This effect was introduced in v1.0.100 of the plug-in (with Eclipse v3.5) while this behaviour didn't exhibit in v1.0.0. Frequent application updates require to clear user data and this LogView behaviour becomes really annoying.
I've spent quite a time trying to find the reason what caused it and ways to workaround it. The thing is that LogView (i.e. org.eclipse.ui.internal.views.log.LogView class) always reads settings from preferences INSTANCE scope, and if org.eclipse.ui.views.log/activate setting is not set there (on first start or after user data are cleared), it defaults to "true" regardless of the value in DEFAULT scope. That means I may not change this behaviour using settings in plugin_customization.ini since settings from this file are put to DEFAULT scope.
That means the only way to override is hardcoding this value to be set to INSTANCE scope in my Bundle Activator class.
I'm not sure is it a bug, or by design, but it would be desirable that LogView use settings from preferences DEFAULT scope for setting its default values.
Powered by FUDForum
. Page generated in 0.01709 seconds