//////////////////////////////////////////////////////////////////////// // Register Code Completion Handler Application.onCompletion = function(/*IRange*/ selection ) { if ( ActiveDocument.Syntax.IsInheritedFrom("js") ) { // simplest, just pass a list of strings var aSuggestions = ["Item1", "Item2", "Item3", "Item4", "Item5"]; this.ShowCompletionList(selection, aSuggestions, false); return true; // event is handled } // event is not handled, editor shall execute default logic return false; };