Index: src/plugins/codecompletion/nativeparser.cpp
===================================================================
--- src/plugins/codecompletion/nativeparser.cpp (revision 6203)
+++ src/plugins/codecompletion/nativeparser.cpp (working copy)
@@ -1033,7 +1033,7 @@
}
if (!end)
break;
- lineText.Remove(end);
+ lineText.Remove(end).Trim(false);
// Manager::Get()->GetLogManager()->DebugLog(_T("Sending \"%s\" for call-tip"), lineText.c_str());
TokensTree* tokens = m_Parser.GetTokens();
@@ -1048,8 +1048,14 @@
ParseLocalBlock(ed);
m_GettingCalltips = true;
+
+ Token* tk = tokens->at(tokens->TokenExists(lineText, -1, tkPreprocessor));
+ if (tk != NULL)
+ lineText = tk->m_Type;
+
if (!AI(result, ed, lineText, true, true, &search_scope))
break;
+
for (TokenIdxSet::iterator it = result.begin(); it != result.end(); ++it)
{
Token* token = tokens->at(*it);
[attachment deleted by admin]
Here are little modify for support global namespace.
Index: src/plugins/codecompletion/nativeparser.cpp
===================================================================
--- src/plugins/codecompletion/nativeparser.cpp (revision 6203)
+++ src/plugins/codecompletion/nativeparser.cpp (working copy)
@@ -1033,7 +1033,9 @@
}
if (!end)
break;
- lineText.Remove(end);
+ lineText.Remove(end).Trim(false);
+ if (lineText.StartsWith(_T("::")))
+ lineText = lineText.Right(lineText.Length() - 2);
// Manager::Get()->GetLogManager()->DebugLog(_T("Sending \"%s\" for call-tip"), lineText.c_str());
TokensTree* tokens = m_Parser.GetTokens();
@@ -1048,8 +1050,14 @@
ParseLocalBlock(ed);
m_GettingCalltips = true;
+
+ Token* tk = tokens->at(tokens->TokenExists(lineText, -1, tkPreprocessor));
+ if (tk != NULL)
+ lineText = tk->m_Type;
+
if (!AI(result, ed, lineText, true, true, &search_scope))
break;
+
for (TokenIdxSet::iterator it = result.begin(); it != result.end(); ++it)
{
Token* token = tokens->at(*it);