Hi! 1)
I have dome some work creating "Preferences" framework and writing description that will put to "Project Guide" or somewhere in documentation... The main issue how to manage preferences among plugins. If the developer implements own plug-in and contributes own set of preferences pages - in general it is up to him where to store preferences. But for "core" preferences there should be general way. IPreferencesStore provides good API for dealing. If main plugin class extends AbstractUIPlugin - the support of IReferenceStore is automatically available. ProjectPlugin has another "nature" .. So should we add manually loading and persisting custom IPreferencesStore instance while starting and stopping ProjectPlugin? Project model classes will lazily ask default properties from IPreferenceStore and initialize if necessary, for example as default CRS for the new MapImpl.. and UI preferences pages deal directly with IPreferenceStore - it is a kind of "preferences exchange bus": through UI properties are set to IPreferenceStore - model classes ask IPreferenceStore and instantiate default values, probably cache objects in static variables or whatever.. Then in javadoc of each preference page the list of keys should be described, e.g. <ul> <li><code><b>org.udig.project.preferences.default_map_crs</b><code> - WKT of default Coordinate Reference System for new opened maps. In a such way we have framework where: - unified access and management of properties through IPreferenceStore API, using of FieldEditor's makes the life easier, etc. - for developers the javadoc with keys and values description in each PreferencePage implementation. The main issue for me what API to use: is IPreferenceStore is good enough - in that case how to deal if plugin doesn't extend AbstractUIPlugin. Vitali. _______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
