CodeLens amazing feature in VS 2013


Visual Studio 2013 is available few hours ago. The main features are already presented through CTP and RC version. Started from today, MSDN subscribers can download VS 2013, and public availability will be 13th of November this year.

One of the best feature in this release is definitely CodeLens.

CodeLens is new feature in Visual Studio 2013 which provides lot of information through the code editor. It is amazing how UI team from Microsoft design this feature by combining text in code with floating and docking windows. For me, this is the best feature in the last several versions.

In this blog post it will be presents several case when you can use CodeLens to find information specific to you code e.g. Unit test methods, class definitions etc.

Full Power of CodeLens you can feel when you have installed Visual Studio 2013, TFS 2013 and Lync 2013.

As you can see CodeLens uses different services to provide information about your code, people worked on code, communication between developers, and more.

Here is some hints about CodeLens

Enabling CodeLens

You can enable CodeLens in Options dialog. You can also enable specific information provided by CodeLens. Picture below shows CodeLens options.
101713_1512_CodeLensama1.png

Reference, Definitions and other information

Reference counter, and other very useful information is integrated in to code editor like picture below. The constructor of every class contains information about reference number, test methods, as well as Code changes, date and time changes, review etc. On picture below you can see reference number and test methods.

 

If you run VS 2013 with TFS 2013 you can get other information like (see picture below taken from Microsoft site) last change author, total changes, review and other information.

If you have installed Lync 2013 you can call directly from code editor other dev. team member. This is amazing feature.

Using Code Lens with CodeMap

You can combine CodeLens with CodeMap, by clicking on the link at the bottom of CodeLens floating window.

CodeLens_CodeMap

Peek Definition

When you right click on some type, now you have a new option called “Peek Definition” which provide developer athoder window inlined within current code edito and shows information about selected type.

In previous action, this option is achieved by showing another window, while current windows was hide. Now you can see information, even you can make some modification if you like, but you current window edition still remain and it is presented all the time. At the edn you can Peek definition promote to standard tab windows if you like. In the nexst cup of picture you can see how it looks like.

Right Click on method:

Choose Peek Definition

Inline windows is present with definition of the method. You can scroll and edit this window. It is like ordinary window. You can use ScrollBar too, in case you need some other information within it. You can promote this windows in to ordinary, by clicking on icon from the Title.

More information you can find here.

That was my first impression for this release.

Again Microsoft and Visual Studio team done great job.

Happy programming!

About Bahrudin Hrnjica

PhD in Mechanical Engineering, Microsoft MVP for .NET. Likes .NET, Math, Mechanical Engineering, Evolutionary Algorithms, Blogging.

Posted on 17/10/2013, in .NET, C# and tagged . Bookmark the permalink. 6 Comments.

  1. It looks really promising. I have to try it

  2. Nicely written and its a great feature. I term the features as LIT :-

    L for latest changes , I for impact analysis and T for test

    Here is a youtube video i just created for code lens http://www.youtube.com/watch?v=rYrERPbtBqk

  3. Heya! I know this is kind of off-topic however
    I needed to ask. Does building a well-established blog such as yours take a large
    amount of work? I’m completely new to running a blog but I do write in my journal on a daily basis.
    I’d like to start a blog so I will be able to share my experience and views online.

    Please let me know if you have any ideas or tips for new aspiring bloggers.

    Thankyou!

  4. Very nice blog post. I certainly love this site. Keep writing!

  5. These types of stimulation are vital for rapid healing.
    Sometimes, after just a few months, the pain returns. Gradually worsening
    pain that is located from one to two centimeters from the
    bony area of the elbow.

  6. Balance of Trade – Refers to the distinction amongst a
    country’s worth of exports and imports.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s