ProvideLanguageServiceAttribute.AutoOutlining Property


Determines if the language service supports automatic outlining.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public bool AutoOutlining { get; set; }

Property Value

Type: System.Boolean

Returns true if the language service supports automatic outlining; otherwise, returns false.

Outlining is used to reduce the visual complexity of a program by allowing source code to be collapsed to an outline, which, for example, hides the contents of all methods, showing only the method names. Visual Studio supports explicit outlining where the user can mark a region of source code and hide it. Automatic outlining is supported if a language service can parse a language and automatically generate regions that can be hidden.

This property is specific to the managed package framework (MPF).

The default is true when the corresponding registry entry is accessed through the LanguagePreferences class.

The registry entry looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\[X.Y]\Languages\Language Services\
  [Language Name]\
    AutoOutlining = reg_dword: 0x00000001

[ProvideLanguageService(typeof(MyLanguageService),           // Required
                        MyConstants.languageName,            // Required
                        MyConstants.languageNameResourceID,  // Required
    // Optional language service properties
    AutoOutlining = true,  // Automatic outlining supported
Return to top