For the 2011 Q1 release Telerik JustCode brought to its users the ability to easily reorganize code - solution, project or folder wise. One major release later - 2011 Q2, taking into account your feedback, the JustCode Cleaner has now grown even more.

With only few clicks you can change thousands of lines of code to match your requirements. Just right-mouse-click in the Solution Explorer on your solution and select Just Clean All... from the menu or you can do it folder by folder and project by project. You will see a window with available options. Two default profiles are provided (Basic and Full), but custom profiles can also be created.


If you select Format Code, your code will be formatted based on the settings in JustCode -> Options -> Code Style. We really wanted for the user to control every new line and white space, so there are a lot of settings there to alter.

Another cleaning step which was requested a lot is Reorder Using Directives, we listen so now you have it. When you select it, all of your using directives will be reordered alphabetically:


The Introduce File Header Text cleaning step will add the specified header in JustCode -> Options -> Code Style -> Common to all your files. You can read more about the command itself here.

We have also added several steps to remove useless code: Remove redundant casts, Remove empty statements, Remove redundant overrides, Remove unused variables, Remove unused private members and Remove unused using directives. All of those were previously available for specific places in your code as quick-fixes, now you can execute them for your whole solution with just few clicks.

You want the read only fields to be consistent with their purpose and have the readonly modifier used? Easily done. Just select Make private fields readonly where possible and all your private fields which are used only in constructors for writing in them will be made readonly.

And last but not least for today: Use String.Format() where possible. By selecting it you will have all your addition expression, which you have used to construct a string, replaced by the more clear for the eye String.Format() method. More about the command - here .


When the code cleaning is over, all edited files will be opened if you choose to – that way you won’t miss any change made and you will be able to undo it.

You can also clean only the current file, using the default profile (which can be changed by clicking Set as Default from the Code Cleaning Options shown above), by going to JustCode -> Code -> Clean Code with Default Profile or use the provided shortcut: Ctrl + Shift + Alt + F.

So, let’s wrap this up. We hope you like the new additions to Telerik JustCode, there is much more to come. If you have any feedback, something you’d like to see in JustCode – do write to us (in forum or in support)

Happy coding!

The JustCode Team
About the Author

Chris Eargle

is a Microsoft C# MVP with over a decade of experience designing and developing enterprise applications, and he runs the local .NET User Group: the Columbia Enterprise Developers Guild. He is a frequent guest of conferences and community events promoting best practices and new technologies. Chris is a native Carolinian; his family settled the Dutch Form region of South Carolina in 1752. He currently resides in Columbia with his wife, Binyue, his dog, Laika, and his three cats: Meeko, Tigger, and Sookie. Amazingly, they all get along... except for Meeko, who is by no means meek.


Comments are disabled in preview mode.