Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

new cc search implemention

<< < (2/3) > >>

blueshake:
see the screen shot.

ollydbg:
Nice work, I will test it soon!!!

blueshake:
BTW:The following messages are not relatived to current topic.but I put it here.just for reminder.

in this thread.http://forums.codeblocks.org/index.php/topic,11227.0.html


if you want to the function mentioned in the above thread,you need to use the following patch.

--- Code: ---Index: src/plugins/codecompletion/codecompletion.cpp
===================================================================
--- src/plugins/codecompletion/codecompletion.cpp (revision 6185)
+++ src/plugins/codecompletion/codecompletion.cpp (working copy)
@@ -562,9 +562,9 @@
             wxArrayInt already_registered;
             std::set< wxString, std::less<wxString> > unique_strings; // check against this before inserting a new string in the list
             TokensTree* tokens = parser->GetTokens();
+            m_SearchItem.clear();
             for (TokenIdxSet::iterator it = result.begin(); it != result.end(); ++it)
             {
-                m_SearchItem.clear();
                 Token* token = tokens->at(*it);
                 if (!token || token->m_Name.IsEmpty())
                     continue;

--- End code ---


ollydbg:

--- Quote from: blueshake on March 03, 2010, 03:32:04 am ---BTW:The following messages are not relatived to current topic.but I put it here.just for reminder.

in this thread.http://forums.codeblocks.org/index.php/topic,11227.0.html

--- End quote ---

Ok, tested and works quite well.
Let me give a simple explanation.

For such code:

--- Code: ---string aaaa;
aaaa.app

--- End code ---

with autocompletion, you will get here, caret moved behind "append":

--- Code: ---string aaaa;
aaaa.append|

--- End code ---

Now, this this patch, you will get additional parenthesis added, so, you get caret in the "()".

--- Code: ---string aaaa;
aaaa.append(|)

--- End code ---

blueshake:
Ok,here comes another patch.


for better function args tip.
when we type ","  this patch can show the tip now.quite simple here.
 :D

--- Code: ---Index: src/plugins/codecompletion/codecompletion.cpp
===================================================================
--- src/plugins/codecompletion/codecompletion.cpp (revision 6185)
+++ src/plugins/codecompletion/codecompletion.cpp (working copy)
@@ -2049,7 +2049,8 @@
                 ++m_ActiveCalltipsNest;
             ShowCallTip();
         }
-
+        else if (ch == _T(','))
+            ShowCallTip();
         // end calltip
         else if (ch == _T(')'))
         {
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version