Skip to content

Feature/settings refactoring pharo15 - #1556

Merged
demarey merged 9 commits into
pharo-spec:Pharo15from
demarey:feature/settings-refactoring-pharo15
Oct 30, 2026
Merged

demarey merged 9 commits into
pharo-spec:Pharo15from
demarey:feature/settings-refactoring-pharo15

Conversation

@demarey

@demarey demarey commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Build the settings browser on top of the new settings model.
requires pharo-project/pharo#20125

Rename default: -> defaultValue: and parent: -> parentName: in the <systemsettings> declarations
StNewSettingsTree subclassed SettingTree, the tree of the old Morphic SettingBrowser removed from Pharo. It now subclasses Object and defines what it used from it: its nodeList instance variable, the sort of nodes
by order then label, and #childrenOf:, which matches children with their parent setting instead of the parent name (setting names are not unique) and also orders all the children placed before the first ordered one
(the old loop only did it for one of them).

Methods only needed by the old setting nodes are removed: checkForUnknownTarget, newTreeHolder and settingsKeywords.
CmdShortcutActivation>>#asSettingPresenter:owner: displayed the value of CmdShortcutSetting, which is not used anymore and was removed from Pharo.
The settings browser uses StNewSettingsTree, built on the new settings model of Pharo. Remove the old one and what only served it: StSettingsTree, StSettingNode, StSettingTreeBuilder and StSettingNodeBuilder, the presenter extensions of the old setting classes
(PragmaSetting, SettingDeclaration, ActionSettingDeclaration, PickOneSettingDeclaration), SystemSettingsPersistence>>#hasSettingsFile,
the Spotter extension of StSettingsTree and the unused
StSettingsAbstractPresenter>>#newNodePresenterFrom:level:.
Now that the settings tree of the old settings model is removed, its replacements take back their names: StNewSettingsTree becomes StSettingsTree and StNewSettingNode becomes StSettingNode (with
StNewSettingsTreeTest and their Spotter extensions).
A button action may change other settings, and the page showing them had to be refreshed by the action itself, which received the Spec button and announced StSettingModelChanged to the presenter of its window, the settings browser, which forwarded it to its page.

The settings page now gives the button item it creates its
pagePresenter. The button item performs its action as a plain message to its target, then announces StSettingModelChanged to its page
(StSettingDetailPresenter), which updates its settings. The settings browser does not need to forward the announcement anymore.
@demarey
demarey merged commit 376df9d into pharo-spec:Pharo15 Oct 30, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant