From 7b0d60c7c54e37a9aa0e333dbb49b09a6bb0dd6c Mon Sep 17 00:00:00 2001 From: Flavien Volant Date: Mon, 2 Mar 2026 16:54:46 +0100 Subject: [PATCH] v0 for Automatically transforming scripts into debugger commands and Build your own scripting library and make it available to the community --- sindarin/extending.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/sindarin/extending.md b/sindarin/extending.md index 113962b..6b63b6e 100644 --- a/sindarin/extending.md +++ b/sindarin/extending.md @@ -260,4 +260,36 @@ here, you can see all your saved scripts. Select 'Step Until #parseObject', then ### Automatically transforming scripts into debugger commands -### Build your own scripting library and make it available to the community \ No newline at end of file +(This part do Adding a new menu extending the debugger and Command for you) + +Click the "+" button (Create a command from the current debugging scripts) +Then give your command a description and give it an Icon (from the pharo icon list) +Restart your debuggeur to update the menus lists and theirs commands (By default your command is created in the "Scripts" menu). +If you don't want this command in your group you can delete it by pressing the "x" button. + +### Build your own scripting library and make it available to the community + +create a new class in your package, this class should extend StSindarinDebuggerScriptRepository +```Smalltalk +StSindarinDebuggerScriptRepository << #MySindarinCommandsMenu + slots: {}; + package: 'my-sindarin-commands' +``` + +Go to class side and implement repositoryName accessor +``` Smalltalk +repositoryName + ^ 'My Scripting Library' +``` + +Now go to the debuggeur and click on the drop list next to the remove command, you should see your new Scripting Library. +Select it and every command will be put in your library + +in your package you can now see your commands as classes: +``` Smalltalk +SindarinCommand << #SindarinMyScriptingLibraryLastUpdatedCommand + slots: {}; + package: 'my-sindarin-commands' +``` + +if you wish to share your library to the community, other only need your package and reopen their debuggeur. \ No newline at end of file