hpi-swa / sandblocks

A projectional editor for Squeak/Smalltalk.
MIT License
35 stars 3 forks source link

core/st: add UI for projection suggestions #87

Closed LinqLover closed 2 years ago

LinqLover commented 2 years ago

A projection suggestion is an item in a suggestion menu like a normal suggestion but will insert a substitution when chosen for completion. With this patch, projections appear with a small preview in the suggestions menu that should make the choice more intuitive for users.

Besides, on the class-side protocol of st substitutions, #instanceSuggestion is extracted which answers a factory block for a new instance, making it easier for subclasses to provide their suggestions.

Suggestions are added to the substitutions memoize, point, language box, regex, and toggled code.

image image SBToggledCode-suggestion ´

Open issues (ideally to be addressed while/before merging this):

Ideas for later: