Codemaid visual studio как пользоваться
Go Straight to the Source
Features
Code Cleaning
Cleanup random white space into a simple standard order. Add unspecified access modifiers. Utilize Visual Studio’s built-in formatting capabilities. Remove and sort using statements. And do it all automatically on save or on demand, from an individual file to the entire solution.
Code Digging
Code Reorganizing
Comment Formatting
Format comments to wrap at a specified column and arrange tags on separate lines. Run on demand or automatically during cleanup.
Joining
Join two adjacent lines, or a highlighted section of code onto a single line.
Collapsing
Recursively collapse nodes or the entire tree in the solution explorer window.
Configuring
Enable, modify or disable many of the aspects of how CodeMaid does its work.
Sorting
Sort a highlighted section of code alphabetically.
Progressing
View the overall progress of a build within Visual Studio, or in the Windows taskbar, both with a green/red status indication.
Toggling
Toggle read-only state of files without jumping into the windows explorer.
Finding
Find the current file in the solution explorer window.
Switching
Switch between related files, such as cpp and header files or xaml and code-behind.
Code cleanup can run automatically on save,
or on demand. It can run on an individual file,
all open files, any selection in the solution
explorer, or the entire solution.
Actions taken on cleanup
- Remove unused using statements
- Sort using statements
- Add unspecified access modifiers
- Remove empty regions
- Add blank line padding
- Remove blank lines next to braces
- Run Visual Studio formatting
- Remove consecutive blank lines
- Remove end of line whitespace
- Update endregion tags
Code Digging
Quickly switch between different sorting methods to get a better overview.
Digging sort order
Type a search filter to find specific items.
Drag and drop to reorganize the code.
Digging drag and drop
Including multi-selection capabilities.
See McCabe complexity scores and informative tooltips.
Code Reorganizing
Automatically generate regions to match.
Comment Formatting
Format comments to wrap at a specified column and arrange tags on separate lines.
Joining
Join two adjacent lines, or a highlighted section of code onto a single line.
Sorting
Sort a highlighted section of code alphabetically.
Finding
Find the current file in the solution explorer window.
Collapsing
Recursively collapse nodes or the entire tree in the solution explorer window.
Progressing
View the overall progress of a build within Visual Studio.
or in the Windows taskbar, both with a green/red status indication.
Switching
Switch between related files, such as cpp and header files or xaml and code-behind.
Configuring
Enable, modify or disable many of the aspects of how CodeMaid does its work.
Configuration Cleaning File Types
Configuration Cleaning Insert
Toggling
Toggle read-only state of files without jumping into the windows explorer.
Check out GitHub issues labeled enhancement for ideas and to give others a heads up about what you might be thinking about doing.
Getting comfortable with the code
The code is broken up into four projects:
- CodeMaid is the VS2019 installer
- CodeMaid.UnitTests contains unit tests
- CodeMaid.VS2022 is the VS2022 installer
- CodeMaidShared is the core code
Within the shared project, CodeMaidPackage.cs is the start of it all and includes a lot of the initialization logic.
- Helpers contains general utilities (e.g. the UndoTransactionHelper facilitates wrapping actions into an undo session).
- Integration handles wire-up to the IDE, and contains Commands (menu items) and Events (IDE event listeners).
- Logic contains the business logic rules and main functionality.
- Model contains representations of code objects (e.g. a method).
- UI contains all dialogs and tool windows.
Within the installer projects CodeMaid and CodeMaid.VS2022 are largely the same files. These are mostly files used for generating the VSIX installer. The most interesting file in there may be CodeMaid.vsct which defines buttons, menu items, images and keyboard shortcuts.
If you have questions about where to find or insert something, please ask on GitHub.
Testing/debugging your changes
Visual Studio provides an “Experimental Instance” of itself that is a sandbox environment for extensions. To test your changes, it is as simple as starting the project (F5) which will handle installing your changes into the experimental instance and launching it for debugging.
If you are debugging VS2019 you will want CodeMaid to be your startup project.
If you are debugging VS2022 you will want CodeMaid.VS2022 to be your startup project.
Works on my machine
Please read the CONTRIBUTING.md for guidelines and submit a pull request with your changes.
Currently supports VS2019 and VS2022.
For Visual Studio 2017, the last supported version is v11.2.
For Visual Studio 2012/2013/2015, the last supported version is v10.6.
For Visual Studio 2010, the last supported version is v0.8.1.
For Visual Studio 2005/2008, the last supported version is v0.4.3.
Links
Code, Issues: GitHub
Continuous Integration: AppVeyor
Features
Code Cleaning
Cleanup random white space into a simple standard order. Add unspecified access modifiers. Utilize Visual Studio’s built-in formatting capabilities. Remove and sort using statements. And do it all automatically on save or on demand, from an individual file to the entire solution.
Code Digging
Code Reorganizing
Comment Formatting
Format comments to wrap at a specified column and arrange tags on separate lines. Run on demand or automatically during cleanup.
Joining
Join two adjacent lines, or a highlighted section of code onto a single line.
Finding
Find the current file in the solution explorer window.
Sorting
Sort a highlighted section of code alphabetically.
Collapsing
Recursively collapse nodes or the entire tree in the solution explorer window.
Progressing
View the overall progress of a build within Visual Studio, or in the Windows taskbar, both with a green/red status indication.
Configuring
Enable, modify or disable many of the aspects of how CodeMaid does its work.
Switching
Switch between related files, such as cpp and header files or xaml and code-behind.
Toggling
Toggle read-only state of files without jumping into the windows explorer.
Currently supports VS2019 and VS2022.
For Visual Studio 2017, the last supported version is v11.2.
For Visual Studio 2012/2013/2015, the last supported version is v10.6.
For Visual Studio 2010, the last supported version is v0.8.1.
For Visual Studio 2005/2008, the last supported version is v0.4.3.
Code, Issues: GitHub
Continuous Integration: AppVeyor
Cleanup random white space into a simple standard order. Add unspecified access modifiers. Utilize Visual Studio’s built-in formatting capabilities. Remove and sort using statements. And do it all automatically on save or on demand, from an individual file to the entire solution.
Format comments to wrap at a specified column and arrange tags on separate lines. Run on demand or automatically during cleanup.
Join two adjacent lines, or a highlighted section of code onto a single line.
Find the current file in the solution explorer window.
Sort a highlighted section of code alphabetically.
Recursively collapse nodes or the entire tree in the solution explorer window.
View the overall progress of a build within Visual Studio, or in the Windows taskbar, both with a green/red status indication.
Enable, modify or disable many of the aspects of how CodeMaid does its work.
Switch between related files, such as cpp and header files or xaml and code-behind.
Toggle read-only state of files without jumping into the windows explorer.
Читайте также: