b207ace51d75056bc6ef0d6cd5aaf3ec23b20e4f
src/plugins/codecompletion/codecompletion.cpp | 18 ++----------------
src/plugins/codecompletion/codecompletion.h | 19 +------------------
2 files changed, 3 insertions(+), 34 deletions(-)
diff --git a/src/plugins/codecompletion/codecompletion.cpp b/src/plugins/codecompletion/codecompletion.cpp
index cd4f9ee..b7cd488 100644
--- a/src/plugins/codecompletion/codecompletion.cpp
+++ b/src/plugins/codecompletion/codecompletion.cpp
@@ -441,8 +441,6 @@ CodeCompletion::CodeCompletion() :
m_TimerReparsing(this, idReparsingTimer),
m_TimerEditorActivated(this, idEditorActivatedTimer),
m_LastEditor(0),
- m_ActiveCalltipsNest(0),
- m_IsAutoPopup(false),
m_ToolBar(0),
m_Function(0),
m_Scope(0),
@@ -452,14 +450,9 @@ CodeCompletion::CodeCompletion() :
m_NeedReparse(false),
m_CurrentLength(-1),
m_NeedsBatchColour(true),
- m_UseCodeCompletion(true),
- m_CCAutoLaunchChars(3),
- m_CCAutoLaunch(true),
- m_CCLaunchDelay(300),
m_CCMaxMatches(16384),
m_CCAutoAddParentheses(true),
m_CCDetectImplementation(false),
- m_CCAutoSelectOne(false),
m_CCEnableHeaders(false),
m_SystemHeadersThreadCS(),
m_DocHelper(this)
@@ -471,6 +464,7 @@ CodeCompletion::CodeCompletion() :
Connect(g_idCCLogger, wxEVT_COMMAND_MENU_SELECTED, CodeBlocksThreadEventHandler(CodeCompletion::OnCCLogger) );
Connect(g_idCCDebugLogger, wxEVT_COMMAND_MENU_SELECTED, CodeBlocksThreadEventHandler(CodeCompletion::OnCCDebugLogger));
+
// the two events below were generated from NativeParser, as currently, CodeCompletionPlugin is
// set as the next event handler for m_NativeParser, so it get chance to handle them.
Connect(ParserCommon::idParserStart, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(CodeCompletion::OnParserStart) );
@@ -516,7 +510,6 @@ CodeCompletion::~CodeCompletion()
void CodeCompletion::OnAttach()
{
- m_PageIndex = -1;
m_EditMenu = 0;
m_SearchMenu = 0;
m_ViewMenu = 0;
@@ -534,8 +527,6 @@ void CodeCompletion::OnAttach()
LoadTokenReplacements();
RereadOptions();
- m_LastPosForCodeCompletion = -1;
-
// Events m_NativeParser does not handle will go to the the next event
// handler which is the instance of a CodeCompletion.
m_NativeParser.SetNextHandler(this);
@@ -1565,7 +1556,7 @@ void CodeCompletion::GetAbsolutePath(const wxString& basePath, const wxArrayStri
void CodeCompletion::EditorEventHook(cbEditor* editor, wxScintillaEvent& event)
{
- if (!IsAttached() || !m_InitDone || !m_UseCodeCompletion)
+ if (!IsAttached() || !m_InitDone)
{
event.Skip();
return;
@@ -1641,15 +1632,10 @@ void CodeCompletion::RereadOptions()
m_LexerKeywordsToInclude[8] = cfg->ReadBool(_T("/lexer_keywords_set9"), false);
// for CC
- m_UseCodeCompletion = cfg->ReadBool(_T("/use_code_completion"), true);
- m_CCAutoLaunchChars = cfg->ReadInt(_T("/auto_launch_chars"), 3);
- m_CCAutoLaunch = cfg->ReadBool(_T("/auto_launch"), true);
- m_CCLaunchDelay = cfg->ReadInt(_T("/cc_delay"), 300);
m_CCMaxMatches = cfg->ReadInt(_T("/max_matches"), 16384);
m_CCAutoAddParentheses = cfg->ReadBool(_T("/auto_add_parentheses"), true);
m_CCDetectImplementation = cfg->ReadBool(_T("/detect_implementation"), false); //depends on auto_add_parentheses
m_CCFillupChars = cfg->Read(_T("/fillup_chars"), wxEmptyString);
- m_CCAutoSelectOne = cfg->ReadBool(_T("/auto_select_one"), false);
m_CCEnableHeaders = cfg->ReadBool(_T("/enable_headers"), true);
if (m_ToolBar)
diff --git a/src/plugins/codecompletion/codecompletion.h b/src/plugins/codecompletion/codecompletion.h
index 93a60fb..08babed 100644
--- a/src/plugins/codecompletion/codecompletion.h
+++ b/src/plugins/codecompletion/codecompletion.h
@@ -270,8 +270,6 @@ private:
/** delayed running of editor activated event, only the last activated editor should be considered*/
void OnEditorActivatedTimer(wxTimerEvent& event);
- /** Not used*/
- int m_PageIndex;
/** Indicates CC's initialization is done*/
bool m_InitDone;
@@ -287,7 +285,6 @@ private:
CodeRefactoring m_CodeRefactoring;
int m_EditorHookId;
- int m_LastPosForCodeCompletion;
/** timer triggered by editor hook function to delay the real-time parse*/
wxTimer m_TimerRealtimeParsing;
@@ -301,9 +298,6 @@ private:
wxTimer m_TimerEditorActivated;
cbEditor* m_LastEditor;
- int m_ActiveCalltipsNest;
-
- bool m_IsAutoPopup;
// The variables below were related to CC's toolbar
/** the CC's toolbar */
@@ -344,16 +338,7 @@ private:
bool m_NeedsBatchColour;
//options on code completion (auto suggestion list) feature
- /** disable the code-completion while editing*/
- bool m_UseCodeCompletion;
- /** how many characters will the user entered to trigger the code-completion*/
- int m_CCAutoLaunchChars;
- /** will the code-completion list pop-up automatically or not*/
- bool m_CCAutoLaunch;
- /** how long will the code-completion list delayed(in microseconds) after you hit the key, if
- the value is zero, then the list will show immediately
- */
- int m_CCLaunchDelay;
+
/** maximum allowed code-completion list entries*/
size_t m_CCMaxMatches;
/** whether add parentheses after user select a function name in the code-completion suggestion list*/
@@ -361,8 +346,6 @@ private:
bool m_CCDetectImplementation;
/** defines characters that work like Tab (empty by Default) but are also inserted*/
wxString m_CCFillupChars;
- /** Should a single item auto-completion list automatically choose the item */
- bool m_CCAutoSelectOne;
/** give code completion list for header files, it happens after the #include directive */
bool m_CCEnableHeaders;
I think it is OK, because the CodeCompletion(code prompt) is now controlled by CCManager.
CodeCompletion::EditorEventHook() is now only trigger reparse of editor, or update the toolbar.