Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » LogView does not use settings from DEFAULT preferences scope
LogView does not use settings from DEFAULT preferences scope [message #997306] Sat, 05 January 2013 14:37 Go to next message
Petras Petkus is currently offline Petras PetkusFriend
Messages: 2
Registered: July 2009
Junior Member
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.
Re: LogView does not use settings from DEFAULT preferences scope [message #997454 is a reply to message #997306] Mon, 07 January 2013 15:30 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
It was intentional to make the 'bring to front on error' behaviour on by default. However, it is a reasonable request to consider the default scope if the setting is not found in the instance scope. In other places in PDE we use the PDEPreferencesManager which checks instance scope followed by default scope...

I realized I was spending as much time answering your question as it would take to fix it so I just pushed a change to check the default scope
https://bugs.eclipse.org/bugs/show_bug.cgi?id=397586

Hopefully that works for you. Enjoy Smile
Re: LogView does not use settings from DEFAULT preferences scope [message #997470 is a reply to message #997454] Mon, 07 January 2013 16:39 Go to previous message
Petras Petkus is currently offline Petras PetkusFriend
Messages: 2
Registered: July 2009
Junior Member
Great! Thank you very much for the fix. Surprised
Previous Topic:is it possible add a menu contribution with a handler
Next Topic:How to use my plugin to execute others' plugin?
Goto Forum:
  


Current Time: Thu Apr 25 02:19:08 GMT 2024

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

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

Back to the top