Visual Studio 11 Development Guide (10) Visual C ++ 11 new IDE function experience

Source: Internet
Author: User
Tags visual studio 2010
Code comprehension: coloring of enhanced function semantics

Semantic coloringIt helps to quickly scan the code and infer more semantic meanings, and through enhanced visual feedback, in the editor. In addition to keywords, strings, and comments, other tag types, enumeration, and macro image are colored; parameters are italic. The following screen snapshot shows an example. Pay attention to how macros, types, function parameters come out, and make it easier to understand the code.

Although there are only a few identifiers in different colors, by default, the following screen snapshot shows about 20 different semantic tags to users.

You can customize the IDE and use these tags for selective coloring in different ways. For example, you can select different colored local and global variables to facilitate the source to understand the aid variables in the same way, but defined in different scopes.

Highlight reference

Another great productivity feature to help you understand the code isSee highlight. When you place the text cursor over the symbol, all instances that highlight the symbol in the file are displayed. Only real references are highlighted-for example, different scopes with the same name (local and global) of the two symbols are not highlighted at the same time. You can use Ctrl + Shift + up and CTRL + Shift + down to highlight the reference movement. This means that you do not need to call to find all references, if you only search for symbols in the file. When the following screen snapshot shows how to highlight all instances of the cxextentmax variable of the internal function body, the cursor is located at one referenced in the max () call. However, this variable is not highlighted unless it has the same name-defined function range.

New Solution Resource Manager

There are a large number of common tasks-for example, navigation to the symbols and files for search, Class View and the tool window required by the Object Browser to check the members of the object, to find all references for use, as well as search references and call hierarchies are all used to search for calls and slave functions. Imagine being able to do all of these operations from a single tool window without switching context or sacrificing other valuable screens. NewSolution Resource ManagerMostly in one place. The combination of functions of these tool windows! Of course, other tool windows can still be used in Visual Studio, but the goal of the new solution resource manager is to greatly reduce the most common situations for calling them. A detailed description of all the new features provided by the versatile new Solution Explorer. Sample:

YesExpandYour file to view fields, functions, and members of the types and types contained in the file.

Allow youSearchThe entire solution goes to members of a single class.

Between Different Views of Solution ExplorerNavigation review and foresightAnd can be createdMultiple instancesLocated on different nodes, If you need solution Resource Manager. YesRangeOnly a view of a specific project, file, or type is required.

In Solution ExplorerThe Editor automatically synchronizesView. On the symbol node in Solution Explorer, click the definition of the symbol in the editor. In addition, you can also see the relationships between types and functions in Solution Explorer, such as calling, phone, reference, and inherited functions.

Code editing Enhancement

The second class of C ++ helps you edit code faster.

Automatically displayed smart sensing member list

In Visual Studio 2010 and earlier versions, the smart sensing Membership List is pulled down to explicitly call the API, or you can press Ctrl + Space key or Ctrl + J or enter the range resolution operator (: :) or select the operator (. or-> ). In the next version, Visual StudioAutomatically display members in the drop-down listYou do not need to call it explicitly when typing.

Automatically display intelligence in the member list-it makes no sense to not display the member list in active mode, for example, to display the list of active members when you type a declaration.

Member list filtering

It is not only automatically displayed, but also filtered when the member list is displayed and only related members are displayed. In this way, you can filter the results by typing two characters, the following screen snapshot

Use Fuzzy logic to quickly search for filtering members. However, if you do not like fuzzy filtering, you can change its prefix or disable filtering completely.

Code segment

Code segmentThe sample code that helps you quickly type several key-hits. Here is the switch statement for how it works: When you start typing, the smart sensing Member List displays the relevant code snippet in the following tab.

Then, you only need to press ENTER or the expression in the switch statement and the entire framework of the switch statement will be added to you. You only need to enter the logic!

In addition to the switch statement, there are other code snippets that can be used to construct the basic code for you-like if anything else, because of loops and so on. Each code segment saves input unnecessary typing, allowing programmers to focus on processing logic and saving time!

In addition, the code snippet function is scalable, so you can also create your own code snippet, which is very simple, just create a simple XML file and copy it to a certain location. You can also call the code snippets in the editor from the context menu and the code snippets that can be inserted or that can enclose the selected code (for example, using the # ifdef Declaration ).

 

Download vs11 now

Http://www.microsoft.com/click/services/Redirect2.ashx? Cr_cc = 200098144

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.