dolphinsmalltalk / Dolphin

Dolphin Smalltalk Core Image
MIT License
301 stars 58 forks source link

Adopt new command query annotations in Debugger, class & package browsers #1202

Closed blairmcg closed 9 months ago

blairmcg commented 9 months ago

Method history extension was using the deprecated mechanism for adding extension queryCommand: style methods, which can be replaced with the cleaner declarative association (specified using an annotation) between extension commands and a query handler.

This is an appropriate time to replace all the queryCommand: switch methods in the extended dev tools (debugger, class browser, method browser and package browser) too.

Create a common pattern for the context sensitive commands (browse-it, inspect-it, accept-it, etc) and provide the majority of this at the SmalltalkToolShell level. Individual tools implement a mapping function to return the live selector for the context sensitive command, e.g. based on subview focus. They then implement the commands to which the generic/context-sensitive command is matched, and associate these with query handlers.

A number of bugs and inconsistencies in the enablement/action of the commands became much more obvious with the new mechanism, and were fixed.

Further refinement of new command querying ClassSelector.

Remove the interim mechanism for declaring additional queryCommand: methods originally introduced to replace the legacy mechanism. This is unnecessary as it isn't required for backwards compat (the legacy mechanism still works), and it is inferior to the individual command query annotations. The legacy mechanism is now deprecated.