codemaid
codemaid copied to clipboard
Attributes Sorting
Environment
- Visual Studio version: 2022 Community
- CodeMaid version: 12.0
- Code language: C#
Description
Allow having the option of being able to sort attributes by default alphabetically and perhaps offer other types of sorting methods.
Expected behavior
Once Cleanup Active Document
or Reorganize Active Document
has been clicked the attributes for the code has been sorted alphabetically. There could also be different types of sorting methods that could be configured in the settings.
Before:
[ToolboxItem(true)]
[ComVisible(true)]
[ToolboxBitmap(typeof(Foo), "Foo.bmp")]
[Designer(typeof(FooDesigner))]
[Description("The Foo")]
[ClassInterface(ClassInterfaceType.AutoDispatch)]
[DefaultEvent("FooChanged")]
[DefaultProperty("Value")]
After:
[ClassInterface(ClassInterfaceType.AutoDispatch)]
[ComVisible(true)]
[DefaultEvent("FooChanged")]
[DefaultProperty("Value")]
[Description("The Foo")]
[Designer(typeof(FooDesigner))]
[ToolboxBitmap(typeof(Foo), "Foo.bmp")]
[ToolboxItem(true)]
Thanks for the suggestion! We do have a sort lines feature, but it is not automatically tied into cleanup currently.