rsaz / csharp-snippet-productivity

The complete snippet toolbox for C#"
MIT License
19 stars 6 forks source link

Create new class, enum, etc. with VS Code commands instead of the context menu. #22

Closed perrylets closed 5 months ago

perrylets commented 10 months ago

It would be good if there was a way to create classes, enums, etc with a command instead of the conext menu.

Rolami commented 7 months ago

Writing to bump the attention. Create class from the Ctrl+shift+p menu to reach the toolbox options would be neat.

rsaz commented 5 months ago

Hi @perrylets and @Rolami , working currently in this ticket. 80% done. Making the commands available outside of the context menu, I have to adjust the user workflow. Currently, if you right click and use the context menu, I use that exact same right click to capture path and from there I designate where things get created.

Now, doing this via command, I had to rethink a smooth user experience in which the user will place the command and will navigate providing the rest of the information to create it resources.

Here is a sneak peek.

image

All the commands will be available, with shortcuts as well that can be changed as you wish and it will work with multiple project within the same solution as well.

Also, I am working on scaffold webView so that you scaffold other resources like pages, controllers etc, base on your models and structures, in the near future. This will come later after this issue gets resolved.

rsaz commented 5 months ago

Hey @Rolami and @perrylets

Here is your request implemented in the v2.1.1. As soon as you get a change I would love to receive feedback about it.

Also, if you can test the creation of different problem templates and verify if is there any issue, please don't hesitate to report, so that I can easily update the compatibility validation table.

What's new in 2.1.1

  • New Feature added: Added all current scaffold commands from context menu available in the command palette.
  • New Feature added: Added template validation against the .NET SDK installed on the machine.
  • Fix: Adjusted the AddProject command to work with the new template validation and project group selection.

Observations:

- Not all templates from Project Creation are tested and validated. Please report any issues with the following information to help us to improve the extension:
- - Template Name
- - Template Framework

The commands available in the context menu follow a different workflow than the commands available in the command palette. The commands in the context menu will create the project or resource in the same clicked folder.

The commands in the command palette will ask the user to select the project, create or select the folder, and then create the project.

Expect a different interaction when using the commands in the context menu and the command palette.

All commands are available via shortcut keys. You can find the shortcut keys in the command palette.