Refactorings: code factorization and separation of preoccupations
Changes:
- enabling the deletion of the default Chest when naming a new chest or renaming an existing chest with a name identical to the default chest's name
- renaming
ChestLoadObjectIntoCode
intoChestLoadObjectIntoCodeCommand
Fixes:
- Fixing a bug because of which the load command could be used in code presenters even if its interaction model couldn't add bindings. Now, this is only possible to add bindings in a playground, in the debugger and in the Chest playground.
Implementation Notes:
- adding helpers in
StDebugger
to access its code interactionModel and its bindings more easily - cleaning unused methods and inst vars
- factorizing of the handling block from
on:do:
when another chest has already the name that the user chooses inChestPresenter>>#presenterToNameNewChest:
andChestPresenter>>#presenterToRenameChest:
- factorizing code of popovers opening in
ChestPresenter>>#requestRenameChest:fromContextMenuItem
andrequestNameNewChestFromToolbar:
andChestPresenter>>#requestRenameObjectFromChest:fromContextMenu:Item:
ChestPresenter>>#warningNamingObjectInChest:
now delegates to the method of same name inChestTableWithContentPresenter
- factorizing
transmitDo:
blocks inChestTableWithContentPresenter
so that it can be reused inChestPresenter
when overriding thetransmitDo:
block - refactoring
#isVisibleForContext:
by adding a#canLoadBindings
method inSpCodeInteractionModel
+ taking this into account inChestCommandTreeBuilder
so that the load command is only visible if the code presenter's interaction model can add bindings. - Storing cancel and accept buttons in
ChestTableWithContentPresenter
instead of assuming that they are the last and first button in theChestTableWithContentPresenter
's toolbar - making
Variable>>#comesFromChest
access the chest tag via an accessor onChest class
so that this tag can be accessed by any class that needs to know it - classifying methods + removing unused temps + renaming ChestTests into ChestTest + making ChestTest>>#setUp and ChestTest>>#tearDown call
super setUp
and `super tearDown, necessary for green CI (~~ 30min)