IBabelService::GetMethodFormat Method
Returns information that is used for formatting IntelliSense Parameter Info ToolTips.
HRESULT GetMethodFormat (
BSTR* parStart,
BSTR* parSep,
BSTR* parEnd,
BSTR* typeStart,
BSTR* typeEnd,
VARIANT_BOOL* typePrefixed
);
Parameters
parStart
[out] Returns a string containing the character that starts a parameter list, for example, "(".parSep
[out] Returns a string containing the character that separates parameters, for example ",".parEnd
[out] Returns a string containing the character that ends a parameter list, for example, ")".typeStart
[out] Returns a string that precedes the method type. For example, "As" in Visual Basic.typeEnd
[out] Returns a string that follows the method type.typePrefixed
[out] Returns whether the method type comes before or after the method name. Return a value of non-zero (TRUE) if the method type precedes the name (for example, long MyMethod). Return a value of zero (FALSE) if the method type follows the name (for example, MyMethod As Long).
Return Value
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
The Default Babel Implementation in the Language Service Package, the StdService class's implementation of this method calls the getMethodFormat method which can be overridden in your language service class to return a MethodFormat structure that contains the information about method formats in your language. By default, the StdService class returns NULL to indicate that the default values (as supplied by Visual Studio, see "Using Default Values" below) should be used. The MethodFormat structure is defined in the Babel\Common\stdservice.h file.
See How to: Enable Parameter Info ToolTips to see how methods are parsed.
Using Default Values
All parameters can be set to NULL, in which case they default to the C language style of formatting (as supplied by Visual Studio), using the following standard conventions:
Type |
String |
---|---|
Parameter List Start (parStart) |
"(" |
Parameter Delimiter (parSep) |
"," |
Parameter List End (parEnd) |
")" |
Method Type Prefix (typeStart) |
"" |
Method Type Postfix (typeEnd) |
"" |
Method Type is Prefixed (typePrefixed) |
TRUE |
See Also
Concepts
How to: Enable Parameter Info ToolTips