729
729
/** @brief Base class for code-completion plugins
731
* This interface is subject to change, so not much info here...
731
* The main operations of a code-completion plugin are executed by CCManager
732
* at the appropriate times. Smaller CC plugins *should* not have need to
733
* register very many (if any) events/editor hooks.
733
735
class PLUGIN_EXPORT cbCodeCompletionPlugin : public cbPlugin
736
738
cbCodeCompletionPlugin();
738
virtual wxArrayString GetCallTips() = 0;
739
virtual int CodeComplete() = 0;
740
virtual void ShowCallTip() = 0;
741
/** @brief Does this plugin handle code completion for the editor cb?
743
* A plugin should override this function to indicate whether it will
744
* provide completion and call tips for the editor. The plugin should
745
* then prepare to handle codecomplete and calltip menu messages if
746
* it returns true. To implement this function, plugins will usually
747
* check the mimetype of the file or the current lexer (highlight
750
* Note: Currently the core CC plugin provides a default CodeCompletion
751
* implementation for any file type that is not provided for by any
752
* other CC plugins. The calltip and main menu options that can be handled
753
* by any CC plugin is also supplied by the core CC plugin.
755
* @param cb The editor for which code completion
756
* @return return true if the plugin handles completion for this editor,
758
virtual bool IsProviderFor(cbEditor* cb) { (void) cb; return false; } // purposely not marked 'cb_optional', override should use param
761
//---------------------------------------------------------------------//
762
740
/** Level of functionality a CC plugin is able to provide. */
763
741
enum CCProviderStatus