IBabelService Interface
Provides access to the Babel language service wrapper for integrating a language into Visual Studio.
IBabelService : IDispatch
Methods in Vtable Order
The following table shows the methods of this interface.
Method |
Description |
---|---|
Specifies the language selected by the user in the Visual Studio environment. |
|
Called once to indicate that the language service is no longer needed. |
|
Returns the number of custom color classes. |
|
Retrieves color information for a custom color class. |
|
Returns colorization information for the specified line. |
|
Parses a specified block of text. |
|
Used for formatting IntelliSense Parameter Info ToolTips. |
|
Used for commenting and uncommenting selected text. |
|
Returns a set of custom icons. |
Remarks
The methods of this interface are called by the Babel Package in the following order:
-
Called once to provide the IBabelService implementation with the current language setting in Visual Studio (for example, French, German, or Japanese).
IBabelService::ColorCount Method, IBabelService::GetColorInfo Method
Called to obtain the number of custom colorable items and the style for each colorable item.
IBabelService::GetMethodFormat Method, IBabelService::GetCommentFormat Method
Called once to get custom method and comment information.
IBabelService::GetImageList Method
Called to get an image list of icons.
IBabelService::ColorLine Method
Called multiple times from the main (UI) thread to obtain colorization information for different spans of text. With the exception of the IBabelService::ParseSource Method method, all methods of IBabelService are called from this thread.
IBabelService::ParseSource Method
Called multiple times from the parse thread to obtain information used to display error markers, brace matching, statement completion, Parameter Info ToolTips, and so on.
The ParseSource and ColorLine methods can be called simultaneously. For more information about threading in your IBabelService implementation, see Implementing the IBabelService Interface.
-
Called once to indicate that the language service is no longer needed.
Notes for Implementers
Implement this interface to provide a language service in the environment using the Babel package. You can use the default Babel implementation (see The Default Babel Implementation in the Language Service Package) or you can implement the IBabelService interface yourself (see Implementing the IBabelService Interface).
Notes for Callers
This interface is accessed from within the Babel Package. When a file is loaded into Visual Studio, the file extension is used to look up which language service to instantiate. The Babel Package is loaded for all Babel language services.. The Babel Package examines all registered languages and determines which are the Babel Language services. For the specified file extension, the Babel Package gets the GUID of the specific language service and instantiates that language service's IBabelService interface. The default Babel classes then use that particular IBabelService interface to provide language-specific support to Visual Studio for the loaded file.
Requirements
Header: BabelService.idl
See Also
Concepts
The Default Babel Implementation in the Language Service Package
Implementing the IBabelService Interface