pharo icon indicating copy to clipboard operation
pharo copied to clipboard

[Meta] Improve protocol creation tools

Open jecisc opened this issue 3 months ago • 4 comments

I wanted to do a simple improvement to the protocol creation window but I'm noticing multiple problems in this tool and I think it deserves some love.

  • [ ] The tool used in Calypso is in Morphic. I think we should have a Spec version in new tools
  • [ ] The tool is in Commander. I don't think this should be the place for such a tool. IMO it should go in NewTools.
  • [ ] The tool relies on SystemNavigation>>#allExistingProtocolsFor: but the name of the method is bad. I don't understand what is the parameter for except when I read the code and it returns protocol names and not real protocols. I propose to rename it and to return real protocols. With a deprecation on the previous version
  • [ ] The debugger implement its own protocol suggestion tool that is based on UIManager. IMO we should have one tool for Calypso and the debugger and they should use the same. (Possibly with some customization to tune the results if we have more context)
  • [ ] I would like the protocols to be sorted by occurrences instead of not been sorted. Like this we would have the most used protocols first

jecisc avatar Apr 05 '24 11:04 jecisc

This would be a tiny step to remove some Morphic from Calypso and have more spec.

jecisc avatar Apr 05 '24 11:04 jecisc

I added as a task the improvement I wanted to have originally: I would like the protocols to be sorted by occurrences instead of not been sorted. Like this we would have the most used protocols first

jecisc avatar Apr 05 '24 13:04 jecisc

Indeed I really like your points!!!!

Ducasse avatar Apr 06 '24 09:04 Ducasse

Protocol suggestion will be removed entirely from the debugger in Pharo 13. It should never have been there. We're waiting a PR from Adrien to pass (but until there is a P13 branch it is stalled).

After that clicking on the "+" button in the debugger will just create the method without asking anything (normally it should be automatically classified, it's not the place of the debugger to tell).

However there will be an extension of the debugger with a spec presenter that allows for custom classification of created methods. But that will be external to the debugger. Perhaps this tool should share code with your proposition.

For now it looks like this:

Capture d’écran 2024-04-17 à 10 17 08

StevenCostiou avatar Apr 17 '24 08:04 StevenCostiou