How to add user-defined functions to completion lists of Expression editor and SQL Text editor?
Last modified:
Handle the CustomizeFunctions event and add new functions in the following way:
void expressionEditor1_CustomizeFunctions(Dictionary<string, AdvancedKeywordInfo> functions)
{
functions.Add(
"customfunction1", // dictionary key for hashing (lowercase!)
new AdvancedKeywordInfo(
// Function display name
"CustomFunction1",
// Function template that will be inserted into the text editor cursor position.
// May contain %CURSOR% macro to specify new cursor position.
"CustomFunction1(%CURSOR%)",
// Function description (displayed in tooltips). Use \n character to split lines up.
"CustomFunction1(param1, param2)\nFunction description.\nBla Bla..."
));
functions.Add(
"customfunction2",
new AdvancedKeywordInfo(
"CustomFunction2",
"CustomFunction2(%CURSOR%)",
"CustomFunction2(param1, param2)\nFunction description.\nBla Bla..."
));
}