Dear list,

I'm about to integrate some settings in replacement of some preferences,
and I would like to have your opinions about the way.

The new setting package make it possible to completely separate a 
setting value
from the setting browser. In fact, the setting browser package should be 
removeable
without any modification elsewhere.

As an example, let's  consider the #annotationPanes preference.
The only mandatory thing is that there is a class variable or an 
instance variable of a singleton
in the package which owns the setting along with corresponding get/set 
accessors.
For #annotationPanes, I define the #BrowsersHaveAnnotationPane class 
variable in CodeHolder.
In addition, I define CodeHolder class>>browsersHaveAnnotationPane and 
CodeHolder class>>browsersHaveAnnotationPane:.

In order to be able to manage this setting from the setting browser, we 
have to define a setting declaration for it.
Because the setting browser must be removeable, I would  create a new 
package for it.
Let's Tools-Base-Settings be this new package which then includes the 
CodeHolderSettings class with the following declaration:

CodeHolderSettings class>>browsersHaveAnnotationPaneSetting
    <setting>
    ^ (SettingManager newSetting: 'Show annotation pane' translated) 
parent: #codeBrowsingSettingNode;
            default: false;
            target: CodeHolder;
            setSelector: #browsersHaveAnnotationPane:;
            getSelector: #browsersHaveAnnotationPane;
            description: 'If checked then the annotation pane is shown 
in browsers; it is dynamically updated with useful informations about 
the code which is currently browsed' translated

Is it ok like that ?

Thanks
Alain







           


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to