Skip to content
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

implemented TerminalShellCommandHandler #188

Merged

Conversation

Alls-DeV
Copy link
Contributor

@Alls-DeV Alls-DeV commented Sep 4, 2023

Implemented #155

Implemented a `TerminalShellCommandHandler` for the EFCore plugin to allow for executing EFCore commands from the terminal. Added new Kotlin class `EFCoreShellCommandHandler.kt` which contains the logic for matching and executing the given commands.

The `matches()` method checks if the input command matches with the known EFCore commands. If the command is 'dotnet ef', it triggers a quick actions popup in the terminal. If the command matches another known EFCore command, the corresponding action is executed.

Also updated the plugin's dependencies in `plugin.xml` and `build.gradle.kts` to include the terminal as a dependency for the EFCore plugin.
Copy link
Member

@seclerp seclerp left a comment

Choose a reason for hiding this comment

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

Thanks! It looks good in general, just a few moments to fix.

Alls-DeV and others added 2 commits September 4, 2023 23:57
Co-authored-by: Andrii Rublov <seclerp.dev@gmail.com>
Refactored EFCoreShellCommandHandler in the EFCore plugin to enhance the processing of entered shell commands. The string "dotnet ef" has been abstracted as a constant for better maintainability and consistency. Furthermore, the manner in which the command string is parsed and compared with known commands has been modified for more efficient execution.
@seclerp seclerp merged commit dfd98f0 into JetBrains:release/233 Sep 5, 2023
1 check passed
@Alls-DeV Alls-DeV deleted the feature/EFCoreShellCommandHandler branch September 5, 2023 13:05
seclerp added a commit that referenced this pull request Sep 5, 2023
* Add command handling for shell terminal in EFCore plugin

Implemented a `TerminalShellCommandHandler` for the EFCore plugin to allow for executing EFCore commands from the terminal. Added new Kotlin class `EFCoreShellCommandHandler.kt` which contains the logic for matching and executing the given commands.

The `matches()` method checks if the input command matches with the known EFCore commands. If the command is 'dotnet ef', it triggers a quick actions popup in the terminal. If the command matches another known EFCore command, the corresponding action is executed.

Also updated the plugin's dependencies in `plugin.xml` and `build.gradle.kts` to include the terminal as a dependency for the EFCore plugin.

* from function to companion object

Co-authored-by: Andrii Rublov <seclerp.dev@gmail.com>

* Refactor EFCoreShellCommandHandler for better command parsing

Refactored EFCoreShellCommandHandler in the EFCore plugin to enhance the processing of entered shell commands. The string "dotnet ef" has been abstracted as a constant for better maintainability and consistency. Furthermore, the manner in which the command string is parsed and compared with known commands has been modified for more efficient execution.

---------

Co-authored-by: Alessio De Vito <alessio.devito@jetbrains.com>
Co-authored-by: Andrii Rublov <seclerp.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants