pharo-spec / NewTools

All development tools for Pharo, developed with Spec
21 stars 52 forks source link

Duplicated logic for showing the shortcuts #765

Open jordanmontt opened 1 month ago

jordanmontt commented 1 month ago

The text shown for the shortcuts, this one:

Sans titre

Is defined in this method through the keyText: message. Like this:

menuCommandOn: aBuilder
    <worldMenu>
    (aBuilder item: #Playground)
        parent: #InputOutput;
        action: [ Smalltalk tools openWorkspace ];
        order: 1;
        keyText: 'o, p';
        help: 'A window used as a scratchpad area where fragments of Pharo code can be entered, stored, edited, and evaluated.';
        iconName: #workspace

But, the shortcuts themselves are defined here:

PharoShortcuts >> openPlaygroundShortcut
    ^ $o meta, $p meta

This causes duplicated logic.