This article provides useful information about the Telerik JustCode Product
Visual Studio is a proven and tested IDE for the production developer, but despite its many powerful features, there are areas that can be enhanced to improve developer productivity. The market today is abundant with Visual Studio plug-ins offering a wide array of enabling features, but choosing the best one for your particular needs can be a daunting task. Such tools are able to identify errors in your code in real time and suggest solutions, they can alert you to problems that can result from changing a snippet of code somewhere, or boost your productivity by quickly generating whole sections of code, or provide you with templates that you can use.
The Extension Manager feature was included in Visual Studio 2010 to allow you to effortlessly locate such add-ins. You can easily access the extension manager by going to Tools | Extension Manager.
One such tool that can easily be found by the Extension Manager is Telerik JustCode. Simply select the Online Gallery, then type JustCode in the search box and press enter. When JustCode is found, click the Download button next to it. This will take you to Telerik’s website to download a trial edition of JustCode.
JustCode is designed to work for you in an unobtrusive manner, providing the features you need to write code efficiently: code analysis, error checking, smart code navigation, code templates, and powerful refactorings. It also allows you to run unit tests from a variety of frameworks and clean your code according to rules your team has agreed on.
Navigating through errors and warnings from JustCode is as simple as clicking the indicator in the gutter. Advanced navigation is provided through the JustCode menu or the keyboard shortcuts. The menu also allows you to ignore errors or warnings.
You may at times deal with long blocks of code where the beginning and ending blocks of code aren’t clear. JustCode includes a visual aid known as structural highlighting to enable the prevention of errors due to improper blocking. This feature draws lines indicating the start and end of a block of code. Finding the beginning or ending of a segment of code now merely requires a glance.
Writing code level documentation can be a time consuming process, which JustCode helps accelerate. Simply place the cursor on a member name and press Ctrl+Shift+D to get started. The generator infers appropriate text based upon the member and type, leaving additional details to be filled in by you. This is the default documentation generated for the constructor for a Rule class, which saved several keystrokes.
In addition to providing you with this functionality, JustCode allows you to navigate to members based upon analysis of the code. This allows you to find base types, inheritors, members returning the type, and members accepting the type as an argument. It also enables you to find overriding and overridden members. Instead of combing through large codebases, you can now find what you’re looking for quickly and efficiently.
If you happen to navigate to metadata using the ‘Go To Definition’ feature, only the signatures of the type and its public members are displayed. Although this is useful for determining what is available in a class, at times it is necessary to determine the implementation due to incorrect or unknown behavior. By pressing Ctrl+1, JustCode will decompile the type allowing you to see the class’s implementation.
Have you ever been lost while coding? Perhaps the most useful feature on large projects is ‘Locate in Solution Explorer’. Press Shift+Alt+L and the current file is selected in the Solution Explorer pane.
JustCode enhances code formatting through several features. When the Learn Code Style From File command is run, it will analyze the file and formulate a set of code style rules specific to the language of file in which the command was run. These rules are customizable, and the Visual Studio formatting options can be used.
Code styles can differ between solutions, particularly when different team members or organizations are involved. JustCode allows options that are commonly unique to a solution to be stored in solution options. Open JustCode, Options…, and then select Options Sharing. Click the Create solution options button. After saving, the options are stored with the solution file as *.jcsettings.xml. This can then be checked into source control and shared with team members. This makes it easier for developers to adhere to a project’s coding standards.
For those who enjoy a clean code base, the Clean Code command will do much of the work for you in one pass. The code will be formatted according to the formatting settings, redundancy and unused code will be removed, and better language constructs will be utilized if possible. This feature allows for the creation of a profile to store your preferences for use through the life of your project.
When designing applications, implementation patterns emerge that require some degree of typing. Code templates remove this repetitive behavior by allowing you to define code along with the variable snippets. One such pattern is the Notify Property used in MVVM applications. Setting this up in JustCode is quite simple. Click the JustCode menu, select Options…, expand Code Templates and select C#.
Click the Add button. Set the Acronym text to ‘np’. Then type the following in the editor.
public $1$ $2$
$3$ = value;
Here is a screenshot of the completed dialog.
Click Save on the Code Template Editor dialog and the Options dialog. With this code template added, you can add notify properties to your ViewModel classes with ease. Inside of the class, type np then Shift+Space.
Type in the return value for V1, the property name for V2, and the private member for V3, tabbing to each field. Then press enter to complete the template entry.
Although Visual Studio has built in support for unit testing, it is limited to MSTest, Microsoft’s unit test framework. Many projects use other frameworks, and although test runners are provided, there are varying degrees of integration with Visual Studio. JustCode Unit Test Runner supports five frameworks: MSTest, xUnit, NUnit 2.5, MbUnit 2.4, and MSpec. Since JustCode can support multiple testing frameworks at once, it makes transitioning from one framework to another a breeze.
The runner allows for different test groupings to match your style or to help you filter to a particular set of tests to run. Tests can also be searched or selected individually. After a set of impacted tests are selected and run, the test runners allow you to rerun the last set. This is very useful in large solutions when running the full test suite may take minutes.
JustCode adds additional refactorings and enhances the ones provided by Visual Studio. A notable addition is Add Stubs in Inheritors. If an abstract member is added to a class, this refactoring allows you to automatically implement stubs in all derived classes. Enhancements include finer grained control over the action the refactoring will take. For example, Extract Interface allows you to not only select properties, but choose which accessors the interface will include.
There are many productivity enhancing tools available through the Extension Manager’s Online Gallery, and it is a good idea to discover what is available to make Visual Studio work for you. Telerik JustCode is one of the most feature rich products available, while also being unobtrusive and allowing you take advantage of it when needed without slowing Visual Studio down or getting in your way when you just need to code.
This article has been editorially reviewed by Suprotim Agarwal.
C# and .NET have been around for a very long time, but their constant growth means there’s always more to learn.
We at DotNetCurry are very excited to announce The Absolutely Awesome Book on C# and .NET. This is a 500 pages concise technical eBook available in PDF, ePub (iPad), and Mobi (Kindle).
Organized around concepts, this Book aims to provide a concise, yet solid foundation in C# and .NET, covering C# 6.0, C# 7.0 and .NET Core, with chapters on the latest .NET Core 3.0, .NET Standard and C# 8.0 (final release) too. Use these concepts to deepen your existing knowledge of C# and .NET, to have a solid grasp of the latest in C# and .NET OR to crack your next .NET Interview.
Click here to Explore the Table of Contents or Download Sample Chapters!