Page MenuHomePhabricator

Preferences store
Closed, ResolvedPublic

Description

Implement a central preferences (i.e. options) store. See OSGi Standard (R4.1 Preferences Service, ~17 pages) for a reference design. This is very important to get a feature-parity with the QT3-MainApp.

Event Timeline

See "OSGi Service Platform Release 4 Version 4.1 Compendium Specification" (downloadable on http://www.osgi.org/Download/Release4V41 '''you dont need to register'''), page 147-166!

Maybe the POCO class in the Util / Configuration package on http://pocoproject.org/docs/ can be of help for a "quick" implementation.

The Eclipse OSGi implementation of the Preferences service can be checked out via

cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/rt co org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.preferences (preferably inside Eclipse...)

This is now an open source bug

Please have a look at T1194 as well for some possible problems.

Added party keyword. This may be done during bugsquashing.

Specification file for the Preferences store

Added specification file for requesting core_modification_flag

Core Modification granted :-)

[SVN revision 18702]
FIX (#1850): Added classes and infrastructure for the PreferencesStore:

in org.opencherry.core.runtime

Added classes:
  cherryBackingStoreException
  cherryICherryPreferences
  cherryICherryPreferencesService
  cherryIPreferences
  cherryIPreferencesService
  cherryAbstractPreferencesStorage
  cherryPreferences
  cherryPreferencesService
  cherryXMLPreferencesStorage

in org.opencherry.ui
  Changed plugin.xml (added extension points "preferencePages" and "keywords")
  Added: IPreferencePage

in org.opencherry.ui.qt
  Added: IQtPreferencePage

For further details, see http://bugs.mitk.org/show_bug.cgi?id=1850

[SVN revision 18703]
COMP (#1850): Added a PreferencesDialog for the MainWindow, accessible through Edit > Preferences
Furthermore, there are new extension points "org.opencherry.ui.preferencePages" and "org.opencherry.ui.keywords" with which the preferences dialog may be extended

[SVN revision 18709]
COMP (#1850): Removed testing temporarily as long as no solution is found for opencherry testing

[SVN revision 18710]
COMP (#1850): Added preference pages for setting hotkeys in the DataManager module. Furthermore, added QmitkHotkeyLineEdit for setting Hotkeys.

[SVN revision 18769]
FIX (#1850): Added a few more hotkey preferences for the DataManager (e.g. Load, Save, Show Information)

[SVN revision 18793]
FIX (#1850):

  1. Introduced ICherryPreferences which throw Events when a preference changed
  2. Updated the import function of the PreferencesService: Automatic Backup of old Preferences. Furthermore, the old Preferences are not deleted. Instead, just the properties get overwritten (all pointers to preferences nodes will stay valid after import)
  3. New Method Update for PreferencePages: Should be used after import was invoked in order to show updated values

[SVN revision 18794]
COMP (#1850):

  1. Adapted exisiting PreferencesPage to new IPreferencesPage Interface
  2. QmitkFunctionality now offers a convenience method GetPreferences() which returns a preferences node that has the same name as the bundle (ID)

[SVN revision 19036]
FIX (#1850): Adding test bundle for core.runtime Preferences

[SVN revision 19037]
COMP (#1850): Fixing test issues

[SVN revision 19038]
COMP (#1850): Temporary Delete for further error investigation

[SVN revision 19111]
FIX (#1850): Fixed bug in preferences dialog: While searching for extending PreferencePages the category string variable was not cleared on each iteration with the consequence that all pref pages were shown in the datamanager category

[SVN revision 19458]
COMP (#1850): The Changed-Event of ICherryPreferences now emits a raw const Pointer instead of a Smart Pointer for saving some memory and avoid calling cycles by changing properties in an event processing function (this time const correctness is really needed)

[SVN revision 19484]
FIX (#1850): Moved PreferenceDialog to org.mitk.gui.qt.common

[SVN revision 19696]
FIX (#1850): Fixed warning in Preferences Dialog

[SVN revision 19700]
ENH (#1850): (Re-)Added Tests for Preferences Framework

Sounds as if this could be closed, right?

[SVN revision 19848]
FIX (#1850): Now every visited page is being queried for save its preferences if "OK" (previously "Apply") was clicked

[SVN revision 19921]
FIX (#1850): - New Nodes are added at the beginning

  • Dragging a node into an empty point of the table will move this node to the end of the TreeItem
  • Added Drop support for files, therefore used the DNDFrameWidget which had to be made public

[SVN revision 19922]
COMP (#1850): - Fixed include

[SVN revision 20135]
FIX (#1850): Preferences get flushed when Plugin is stopped. Prior to that the Preferences were flushed in the destructor of the Pref Service which was not garantueed to be reached during execution

[SVN revision 20391]
ENH (#1850): Added the possibility to set a selected page in the PreferencesDialog

[SVN revision 20603]
ENH (#1850): added preference for logo file location with ID "DepartmentLogo"

kislinsk merged a task: Restricted Maniphest Task.Aug 1 2016, 10:47 PM