Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: oBFusCATed on February 03, 2013, 11:46:39 pm
-
I've just found some strange code in the CC plugin.
There is a variable which holds the name of the start page.
And instead of checking for IsBuiltinEditor it does string compares to the filename.
Can someone familiar with the code check it and verify that it is correct (I highly doubt it is)?
To find it search globally for "g_StartHereTitle".
-
Hi, OBF, good catch, by reading the source code, I see that using "IsBuiltinEditor()" check is better. Currently, only cbEditor class have this bool member variable set "m_IsBuiltinEditor = true;". Will fix it.
-
A testing patch.
I see that the logic of updating the Toolbar was not good, so maybe, it still need refactoring.
A related discussion: Time to refresh the CC Toolbar (http://forums.codeblocks.org/index.php/topic,17276.0.html)
-
Done.
Revision: 8844
Author: ollydbg
Date: 2013-2-16 17:20:48
Message:
*CC: Checking a valid builtin editor by using Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor() instead of comparing the global g_StartHereTitle wxString.
-CC: Tweak some comments.
-------------------------------
M : /trunk/src/plugins/codecompletion/codecompletion.cpp
M : /trunk/src/plugins/codecompletion/nativeparser.cpp
M : /trunk/src/plugins/codecompletion/nativeparser.h