I don't think this should be difficult.
You can create a plugin and on top of the normal plugin-functions implement following functions:
I totally agree, I think creating a tiny plugin is needed.
cbCodeCompletionPlugin::CCProviderStatus YourPlugin::GetProviderStatusFor( cbEditor* ed )
--> Return 'ccActive' if you support this file
std::vector<cbCodeCompletionPlugin::CCToken> YourPlugin::GetAutocompList( bool isAuto, cbEditor* ed, int& tknStart, int& tknEnd )
--> Return your codecompletion results, in your case maybe your full list
bool YourPlugin::DoAutocomplete(cbCodeCompletionPlugin::CCToken& token, cbEditor* ed)
--> To insert your code completion result
Now building your database might be a little bit more tricky since you need to parse your document, but you can install an EditorHook where your plugin gets triggered every time the user changes the document, you could even just reparse the current line to keep the operation lightweight.
Yves
To parse the current active editor's content, I think the only interested events are:
cbEVT_EDITOR_ACTIVATED, when this event is received, read the content of the editor, and use a simple lexer to get all the tokens, and store them in a database.
cbEVT_EDITOR_SAVE, when this event is received, this means the user has changed the content of the editor, so you may need to reparse the database.
For simplicity reasons, I think you don't need to use EditorHook.