Export (0) Print
Expand All

Managed Language Service Overview (Managed Package Framework)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The managed package framework (MPF) includes a complete set of classes that simplify creating a language service.

Discussion

A language service provides support in the editor for a particular programming language. This support enables each language service to implement certain Visual Studio features fully, partially, or not at all, depending on the needs of the programming language. The MPF language service classes provide full support for frequently used features and partial support for some other features.

At the heart of a language service are a parser and a scanner. A parser converts a programming language source file into discrete elements called tokens. The language service can then react to the type and functionality of those tokens to provide syntax highlighting, brace matching, IntelliSense support and other features. For more information, see The Language Service Parser and Scanner (Managed Package Framework).

The Visual Studio SDK Managed Language Services relies on Bison and Flex, two open-source tools for parsing and scanning that are available freely on the Internet.

NoteNote

Be careful when you redistribute your Managed Language Services code. Bison and Flex are covered by the GPL. If you modify the source code of these tools, the GPL requires that you publish the modifications. Also, use of Bison and Flex could contaminate your code.

Supported Features in the MPF

The MPF language service classes support the following features. A parser and scanner must be supplied.

  • Syntax highlighting

  • Outlining

  • Commenting blocks of code

  • Brace matching

  • Code Snippets

  • Custom Document Properties

  • IntelliSense Parameter Info

  • IntelliSense Quick Info

  • IntelliSense Member Completion

  • IntelliSense Complete Word

Partially Supported Features in the MPF

The MPF provides only partial support for the following features. The MPF classes call your methods, which must perform the actual work. A parser and scanner must be supplied.

  • Reformatting code. You supply the reformatting code.

  • Validating breakpoints by identifying valid code spans. You supply the code to identify code spans.

  • Supporting the debugger's Autos window for displaying variables. You supply the code to determine what to show in the window.

  • Supporting the Navigation bar for quick navigation between types and members. You implement and return a helper class that populates the lists in the Navigation bar combo boxes.

Implementation

See Also

Community Additions

ADD
Show:
© 2014 Microsoft