Telerik’s second major release for 2011 brings a bunch of exciting new functionalities, improvements to existing features, and many performance optimizations for JustCode, Telerik’s unobtrusive Visual Studio plug-in.


Some of the highlights include new additions and improvements to JustCode’s Code Navigation and Search features, new and improved Formatter (wrapping, new line and space formatters), several new Quick Fixes/Quick Hints, as well as new Refactorings, Code Generation features and Code Cleaning Steps, among others.


Let’s have a look at some of these highlights.


JustCode’s innovative Code Navigation and Search has traditionally been a very strong asset of the product that we continuously get praise for. This release marks a number of important improvements in this area, namely the addition of three new features: Find Unused Members, Go to Implementation, and a ToDo Navigator.


Once invoked on a class, Find Unused Members lets you instantly locate any class members not used in the solution. A member is considered used if it is itself used or an implemented/overridden member is used or it implements a library member.




The Go to Implementation, on the other hand, when invoked on an interface, abstract, virtual method, or property invocation, enables you to jump directly to its implementations, saving you a number of steps in the process.



During its real-time, solution-wide code analysis and thanks to the ToDo Navigator JustCode automatically finds ToDo items that you can regroup and filter based on your preferences. Items that are found by the ToDo Navigator are configurable. Now you can also create new, clone or remove existing item patterns.



Let’s move on to the new and improved Quick Fixes\Quick Hints.


Have you ever deleted your event handler from a web form? The typical scenario involves deleting the attribute in the ASPX to then add it back so that Visual Studio will regenerate the method. This isn’t ideal when the handler has been renamed, and an extra step is necessary to rename the newly created method. Thanks to JustCode’s new Create Missing Event Handler Method for ASP.NET functionality, you can now skip these steps. The new feature shows a warning when it detects a missing event handler and offers a quick fix. Easy.


There are times when one has hardcoded a constant value within the body of a method, but the method would have more flexibility if the value were a parameter instead. The new quick hint Move to Parameter allows you to move the variable to a parameter, and it will automatically update calls to the method with the defined value for the variable.


The quick fix Add Parameter to Constructor is available once JustCode has detected that adding a parameter to a constructor declaration can fix constructor invocation without clashing with existing constructor declarations. Executing this quick fix will automatically add a parameter to the declaration of the invoked constructor, and will update all constructor invocations with default value as an argument.


Now, let’s turn your attention to two brand new Refactorings: Extract Class from Parameter and Reverse Assignments.


When invoked on a class parameter with empty selection, the former refactoring enables all parameters to be extracted to newly created class members and replaced with a single parameter of the new class type.



The latter, when invoked on an assignment or a selection of assignments, enables you to swap left and right expressions of it. If it is not possible for a specific assignment, a warning will be shown.


In closing, let’s turn to two of our new Code Generation features.


Whether it is for copyright purposes or inline history tracking required to pass certification, some projects require headers in source code files. To create headers in JustCode, you will need to enable options sharing. Click the JustCode menu, then Options. Introduce Header is available as a code generation command and as a code cleaning step and works for C#, VB and JavaScript. A user is able to set a shared setting (a setting, the value of which is set for the current solution) for the header text, for example "Copyright Telerik", and after executing the refactoring or the code cleaning step, JustCode should introduce commented out text at the beginning of the file.



Partial classes can be used to separate certain types of code from others. When you are doing code generation, you might prefer the generated code be output into a designer file that contains a partial class to keep it separate from custom code. This prevents accidental changes to generated code that will be overwritten the next time code generation occurs. If a class is marked partial, you can generate a partial class in a sister file by choosing Create Partial Class in the Code menu or in the C section of the Visual Aid.



If you’d like to learn more, you can have a look at Telerik JustCode’s What’s New section and the Q2 2011 release notes. And of course make sure to download and test the new version of JustCode on the ground. We’d love to hear what you think about it.


Happy coding and expect more from us in 2011 Q3!

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.