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

Enable Commands within VS Document Windows #22

Open
rogersears02 opened this issue Apr 13, 2021 · 1 comment
Open

Enable Commands within VS Document Windows #22

rogersears02 opened this issue Apr 13, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@rogersears02
Copy link

rogersears02 commented Apr 13, 2021

I have a need to perform inline code injection/generation within the Document Windows within Visual Studio. Below would be some common scenarios:

  1. Add NEW controls/Tags to Markup Files (i.e. HTML, XAML, etc) - I could easily envision developers needing to perform refactorizations or generate new code inline within a markup file. From inserting a table, to a pre-defined control, I envision that a developer would be able to right-click within a markup file via the Document Window in VS and selecting the command "Insert Custom Table". This would then execute Command logic to potentially prompt a dialog box where maybe they define some table parameters (i.e. enable sorting, enable search, enable pagination, enable row count, enable row selection, etc), or select a data model to bind to, and then it would inject, inline a new HTML/XAML table with everything wired-up.
  2. Refactor an Existing HTML/XAML Element - You could add an attribute to that table that helps the EnableCommand logic determine if this is auto-generated code and determine what, based-on the tag, type of tag/element this is and potentially have some additional commands like: "Update Parameters", "Update DataSource/Model", "Enable Search", etc).
  3. Refactor C# Class Methods - This is another example where you could regenerate a method by right clicking on a method and selecting a command like: "Generate Unit Test", "Add Bounds Checking", "Add Logging", "Enable full CDF", "Add Exception Handling", etc). This would only affect that method and not the entire class.

The list of examples surely goes on from there. I know this would be a significant enhancement to CF, but I could envision customers asking for this type of flexibility/control down the road. Today I can get by with the Solution Explorer-level CF Commands in about 80% of my use cases, but there are times where it would be nice to perform code generation in-line within the code files directly. I suppose this could be similar to how we use snippets, but with more flexibility in terms of being able to prompt for additional details from the developer/user via a dialog window. Where snippets also have shortcomings are in terms of our access to the full CF SDK and automated project referencing to generate new code/refactor selected code...

@sgiffinlcd sgiffinlcd added the enhancement New feature or request label Mar 15, 2022
@sgiffinlcd
Copy link
Contributor

@rogersears02
Roger I am adding this to the backlog for the CodeFactory project. This capability will likely happen in the Version 2.0 timeframe for CodeFactory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants