Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
New code completion remarks/issues
blueshake:
Dear ollydbg,
I think the actualtype should be qq,and the type should be qq(*), and the ancestor should be qq too,
for codes:
--- Code: ---typedef qq (*ptr)(int a, int b);
--- End code ---
can be treat as
--- Code: ---typedef qq ptr;
--- End code ---
and this maybe can fix the bug.
ollydbg:
--- Quote from: blueshake on October 08, 2009, 04:17:14 am ---Dear ollydbg,
I think the actualtype should be qq,and the type should be qq(*), and the ancestor should be qq too,
for codes:
--- Code: ---typedef qq (*ptr)(int a, int b);
--- End code ---
can be treat as
--- Code: ---typedef qq ptr;
--- End code ---
and this maybe can fix the bug.
--- End quote ---
Good idea, I will try it :D.
blueshake:
Do some modification on value tip.
patch:
--- Code: ---Index: src/plugins/codecompletion/parser/token.cpp
===================================================================
--- src/plugins/codecompletion/parser/token.cpp (revision 5852)
+++ src/plugins/codecompletion/parser/token.cpp (working copy)
@@ -126,15 +126,42 @@
wxString Token::DisplayName() const
{
-// wxString result(_T(""));
-// wxString parentname = GetParentName();
-// if (!parentname.IsEmpty())
-// result << parentname << _T("::");
- wxString result = GetNamespace();
- result << m_Name << m_Args;
- if (!m_Type.IsEmpty())
- result << _T(" : ") << m_Type;
- return result;
+ wxString result;
+ if (m_TokenKind == tkClass)
+ {
+ result << _T("class ") << m_Name << _T(" {...}");
+ return result;
+ }
+ else if (m_TokenKind == tkNamespace)
+ {
+ result << _T("namespace ") << m_Name << _T(" {...}");
+ return result;
+ }
+ else if (m_TokenKind == tkEnum)
+ {
+ return result << _T("enum ") << m_Name << _T(" {...}");
+ }
+ else if (m_TokenKind == tkTypedef)
+ {
+ result << _T("typedef") ;
+ if (!m_Type.IsEmpty())
+ result << _T(" ") << m_Type;
+ result << _T(" ") << m_Name;
+ return result;
+ }
+ else if (m_TokenKind == tkPreprocessor)
+ {
+ result << _T("#define ") << m_Name << m_Args;
+ if(!m_Type.IsEmpty())
+ result << _T(" ") << m_Type;
+ return result;
+ }
+ else
+ {
+ if (!m_Type.IsEmpty())
+ result << m_Type << _T(" ");
+ return result << GetNamespace() << m_Name << m_Args;
+ }
}
Token* Token::GetParentToken()
--- End code ---
[attachment deleted by admin]
mmkider:
Hi,
In SVN 5840, code completion can pop up function paramter.
But SVN 5853, it's not.
What happen ? or do I some error thing ? :(
--- Code: ---
int bbbbb(int cccccc)
{
//can't pop up cccccc
}
--- End code ---
ollydbg:
--- Quote from: mmkider on October 09, 2009, 03:33:59 am ---Hi,
In SVN 5840, code completion can pop up function paramter.
But SVN 5853, it's not.
What happen ? or do I some error thing ? :(
--- Code: ---
int bbbbb(int cccccc)
{
//can't pop up cccccc
}
--- End code ---
--- End quote ---
I can confirm this bug.
In the function body, if you enter cccc, then, there is no suggestion list "cccccc".
Need time to find the bug.
By the way, the code in nativeparser.cpp, such as
--- Code: ---// Start an Artificial Intelligence (!) sequence to gather all the matching tokens..
// The actual AI is in FindAIMatches() below...
size_t NativeParser::AI(TokenIdxSet& result,
cbEditor* editor,
Parser* parser,
const wxString& lineText,
bool noPartialMatch,
bool caseSensitive,
TokenIdxSet* search_scope,
int caretPos)
--- End code ---
is really hard to read and understand for me. :( :(
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version