I am unsure of what the purpose of tkMacro tokens in CC is. However, when they show up, they tend to spam the popup:
(http://www.pasteall.org/pic/show.php?id=69769)
Reducing the list to a logical set can easily be done with:
Index: src/plugins/codecompletion/codecompletion.cpp
===================================================================
--- src/plugins/codecompletion/codecompletion.cpp (revision 9752)
+++ src/plugins/codecompletion/codecompletion.cpp (working copy)
@@ -968,6 +968,9 @@
if (preprocessorOnly && token->m_TokenKind != tkPreprocessor)
continue;
+ if (token->m_TokenKind & tkMacro && uniqueStrings.find(token->m_Name) != uniqueStrings.end())
+ continue; // what is a "tkMacro" ??
+
int iidx = m_NativeParser.GetTokenKindImage(token);
if (alreadyRegistered.find(iidx) == alreadyRegistered.end())
{
But should tkMacro tokens be included in the search results in the first place? What are they?
The following 2 patches (in attachment) are what I would like to do such variable name refactoring, what's your opinion?
I personally prefer the name changes: tkMacro -> tkMacroUse and tkPreprocessor-> tkMacroDef to avoid excess verbosity. Other than that, I think the changes are fine.
Thanks, just follow your advice, and done in trunk rev 9757.
Now, one task left is to change the png file names associated with the new variable names, but I'm not sure git-svn can handle all those changes. ;)
preproc.png
preproc_folder.png
macro.png
macro_private.png
macro_protected.png
macro_public.png
macro_folder.png
Such as: "preproc.png" to "macro_def.png"; "macro.png" to "macro_use.png", let me do it right now, If failed, I will report and seek help.
EDIT: image file name change is in r9758 now.