开发者

Is it possible to sort code via Resharper?

开发者 https://www.devze.com 2023-02-11 02:25 出处:网络
CodeRush has this nifty plugin called cr_ClassCleaner that allows me to sort the elements in the class (e.g. 开发者_StackOverflow中文版methods, private variables, etc...).

CodeRush has this nifty plugin called cr_ClassCleaner that allows me to sort the elements in the class (e.g. 开发者_StackOverflow中文版methods, private variables, etc...).

Can Resharper 5.x do this, either via the product or plugins?


Yes - ReSharper, Tools, Cleanup Code.

They recently blogged about customising the type layout this generates.


There is an option in code cleanup to reorder type members. This would be done as part of a full cleanup. If you wanted to only reorder, you could create a cleanup profile that only included that step. You can have multiple cleanup profile.


Ctrl+Alt+F (if you're using the IDEA profile) will take you to the cleanup code menu where you can achieve that.

0

精彩评论

暂无评论...
验证码 换一张
取 消