-
Notifications
You must be signed in to change notification settings - Fork 71
Add project-specific script repositories to Sindarin and make 'Create Command' button working #1175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Pharo14
Are you sure you want to change the base?
Add project-specific script repositories to Sindarin and make 'Create Command' button working #1175
Conversation
…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
…RepositoryChooser
- 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
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
src/NewTools-Sindarin-Tools/StSindarinDebuggerCreateCommandPresenter.class.st
Outdated
Show resolved
Hide resolved
src/NewTools-Sindarin-Tools/StSindarinDebuggerScriptingPresenter.class.st
Outdated
Show resolved
Hide resolved
…senter.class.st Co-authored-by: CyrilFerlicot <[email protected]>
…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
Add project-specific script repositories to Sindarin
demo3.mp4
'Create Command' button
demo2.mp4