How to: Set Language Information
You can set language information for your language by modifying some of the global properties in the Babel package.
This topic is based on the Visual Studio Language Package solution, which provides a basic implementation of the Babel package. For more information about creating one of these solutions, see Walkthrough: Creating a Language Service Package.
To add language information
Create a Visual Studio Language Package solution.
Open the service.cpp file in the language package project.
Replace the following values in the Globals block of this file with the corresponding values for your language:
g_languageName
Specifies a human readable name of the language, for example, "Test Language".
g_languageFileExtensions
Specifies the extension or extensions of the source files, for example, {".testext",NULL}.
g_languageCLSID
Specifies the CLSID of this specific language. You should generate a unique GUID for each language service.
The language properties are defined in the g_languageProperties variable, which is an array of LanguageProperty structures True/false properties are true if set to 1, false if set to 0. The following is the default set of language properties:
const LanguageProperty g_languageProperties[] =
{
{ "RequestStockColors", 1 },
{ "ShowCompletion", 1 },
{ "CodeSense", 0 },
{ "MaxErrorMessages", 5 },
{ "QuickInfo", 0 },
{ "MatchBraces", 0 },
{ "ShowMatchingBrace", 0 },
{ "MatchBracesAtCaret", 0 },
{ NULL, 0 }
};
Change History
Date |
History |
Reason |
---|---|---|
July 2008 |
Rewrote and refactored project. |
Content bug fix. |