Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
several completion issues
ollydbg:
--- Quote from: killerbot on September 30, 2010, 04:41:47 pm ---Issue 1 :
type :
--- Code: ---a.Set(bla_
--- End code ---
You will see it offers 4 possibilities, but it should only be 2, only the 2 from "enumerA", and not the ones from "enumerX"
--- End quote ---
Dear killerbot, let me explanation how CC generate the suggestion list.
It is very simple:
1, find the current statement:
for this code:
--- Code: ---a.Set(bla_
--- End code ---
We just do a backward search from the caret position, then stop at characters like "[" or "(" etc. So, in this case, we stop at "(", so, the actual statement we are interest is:
--- Code: ---bla_
--- End code ---
2, find a initial search scope, Now, we guess the statement "bla_" is in global namespace scope.
3, do a match in the search scope, so all the tokens in the global namespace with a prefix "bla_" will be listed as suggestion list.
From this algorithm, you can see that NO function argument information is used.
Here is another example code:
--- Code: ---#include <iostream>
void bla_my_function();
enum enumerA
{
bla_on,
bla_off
};
enum enumerX
{
bla_on_foo,
bla_off_foo
};
class BitA
{
public:
BitA(){}
void Set(enumerA value) {mValue = value;}
enumerA Get() const {return mValue;}
private:
enumerA mValue;
};
BitA a;
a.Set(bla_)
--- End code ---
You can see the screen shot, even the global function named "bla_my_function" will be in suggest list:
Solution:
The statement analyzer should be more powerful to detect the caret was locate between parentheses, thus, the function argument type information can be used to filter the suggest result. :D
Currently I have no idea how we can improved it, sure, we can, let me think carefully....
killerbot:
I know nothing has been done on this issues, but today due to rev 6663 ( or 6662), things got a little bit worse.
When I type :
--- Code: ---Bta.Set(bla_
--- End code ---
Nothing is suggested anymore.
Loaden:
--- Quote from: killerbot on October 04, 2010, 09:45:48 am ---I know nothing has been done on this issues, but today due to rev 6663 ( or 6662), things got a little bit worse.
When I type :
--- Code: ---Bta.Set(bla_
--- End code ---
Nothing is suggested anymore.
--- End quote ---
This is new issue from r6660.
blueshake:
--- Quote from: killerbot on October 04, 2010, 09:45:48 am ---I know nothing has been done on this issues, but today due to rev 6663 ( or 6662), things got a little bit worse.
When I type :
--- Code: ---Bta.Set(bla_
--- End code ---
Nothing is suggested anymore.
--- End quote ---
I knew,will be fixed soon.
blueshake:
had send patch to Loaden,and should be fixed.enjoy it. :P
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version