Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
New code completion remarks/issues
ollydbg:
--- Quote from: blueshake on October 31, 2009, 05:21:59 am ---
--- Quote ---At this time, we don't need to rebuild the tree again.
--- End quote ---
hi,ollydbg:
The contexts in C:\BBB\AAA.cpp are different from C:\BBB\AAA.h,why we don't need to rebuild the tree again?
--- End quote ---
At this time, we get the same browser tree, if you select "current file's token" in browser view.
blueshake:
when the parse is done ,the UpdateClassBrowser(); will be called in void NativeParser::OnParserEnd(wxCommandEvent& event)
at this time ,some token maybe has been changed.So the tree should be rebuilt.
and in the situation you mentioned.yes,it don't need be rebuilt.But how do we distinguish these , need or not.
by the way,ollydbg,have you encounter this issue.http://forums.codeblocks.org/index.php/topic,11432.0.html
ollydbg:
Here is another bug.
See the screen shot:
And the test code:
--- Code: ---#include <iostream>
using namespace std;
int variableA;
int main()
{
int variableA;
variableA = 1;
cout << "Hello world!" << endl;
return 0;
}
--- End code ---
Both the auto variable in main and global variable will be shown together.
This is because:
1, the global variable "variableA" was already exist in the Token trie.
2, the auto variable "variableA" was added when parsing the function block.
So, my suggestion is:
Search the local tokens first. I mean, if we find a token is already exist in the local context, we don't need to search the global namespace.
This can make code completion more fast.
oBFusCATed:
Hm, Olly having both in the tooltip can be quite helpful.
If for example the tooltip looks like this:
global int variableA
local int variableA
or
int ::variableA
int variableA
int my_namespace::variableA
blueshake:
--- Quote from: oBFusCATed on November 02, 2009, 10:24:46 am ---Hm, Olly having both in the tooltip can be quite helpful.
If for example the tooltip looks like this:
global int variableA
local int variableA
or
int ::variableA
int variableA
int my_namespace::variableA
--- End quote ---
should be easy to do this.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version