Skip to content

Conversation

FlavienVolant
Copy link
Contributor

Add project-specific script repositories to Sindarin

demo3.mp4

'Create Command' button

demo2.mp4

…ories

- Made `StSindarinDebuggerScriptRepository` an abstract class with `repositoryName` to be implemented by subclasses
- Introduced `SindarinDefaultScriptRepository` to manage Pharo's default scripts
- Updated `StSindarinDebuggerScriptRepositoryPresenter`:
  - Added a dropdown listing all subclasses of `StSindarinDebuggerScriptRepository` to select the active repository
  - Added `loadScript` and `saveScript` to work with the selected repository
- Updated `StSindarinDebuggerScriptingPresenter` to support changes from `StSindarinDebuggerScriptRepositoryPresenter`
- Added StSindarinDebuggerScriptRepositoryChooserPresenter as a subclass of SpDropListPresenter to handle repository selection
- Refactored StSindarinDebuggerScriptRepositoryPresenter to receive the repository as an attribute (removed internal drop list)
- Integrated the new chooser into StSindarinDebuggerScriptingPresenter to manage repository switching
…cript selection

- Renamed StSindarinDebuggerScriptRepositoryChooserPresenter to repositoryChooser
- Renamed StSindarinDebuggerScriptRepositoryPresenter to scriptChooser
- Created StSindarinDebuggerCreateCommandPresenter to let users choose a description and an icon for a new command (command creation logic not implemented yet).
- Updated StSindarinDebuggerScriptingPresenter to use the new presenter when the user clicks on "create command".
- SindarinDefaultScriptRepository is moved to NewTools-Sindarin-Script wich required to add thi package to the baseline
- StSindarinDebuggerCreateCommand createCommand done
- fix load layout
@FlavienVolant
Copy link
Contributor Author

@StevenCostiou

Copy link
Member

@jecisc jecisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a few comments

Also do not hesitate to format methods using cmd/ctrl + shift + f.

It removes for example useless spaces or dots


{ #category : 'actions' }
StSindarinDebuggerCreateCommandPresenter >> createMenu [
StDebugger class compile: ('buildSindarin{2}ExtentionCommandsGroupWith: stDebuggerInstance forRoot: rootCommandGroup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it normal to have this?

If yes, it might be nice to add a comment to explain why we have a method compiling menus :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that relying on the compile is good. Especially since we will probably change this in Toplo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal is to generate a command group for the debugger. To do that I need to add a class side method to StDebugger. I followed 5.4 "Adding a new menu extending the debugger" from https://github.com/The-Pharo-Debugger-Book-Chapters/Sindarin-Scriptable-Debugger.

If there is a better way to add a method without using compile, I'm open to using it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to compile code, so at some point we have to call "compile:".
I do not understand the relation between compiling code and Toplo...?

I would say though the "createMenu" is not a correct method name.

@StevenCostiou StevenCostiou added the need more work This needs to be improved before being considered label Jun 20, 2025
FlavienVolant and others added 6 commits June 23, 2025 16:50
…erCreateCommandPresenter` to allow removal of user-created commands and groups.

- Removed the TODO flag from `createCommandFromScript`.
- Implemented `removeScriptCommand`
- rename StSindarinDebuggerCreateCommandPresenter to StSindarinDebuggerCommandPresenter
- rename whenCancelButtonDo to whenCancelDo
- rename whenLoadButtonDo to whenLoadDo
- rename createCommand and createMenu to generateCommand and generateMenu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more work This needs to be improved before being considered
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants