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

Complete code (ctrl+space) adds () at the end completed text

<< < (2/3) > >>

oBFusCATed:
No, because it is random...

Most of the times it happens when I copy the function/method declaration from the .h file,
paste it in the .cpp file and type class_name:: (in the middle of the typing I hit ctrl+space to do auto completion)

blueshake:
@oBFusCATed
please try to change codes (int CodeCompletion::CodeComplete() in the file codecompletion.cpp) from


--- Code: ---if (token->m_TokenKind == tkFunction || token->m_TokenKind == tkConstructor || token->m_TokenKind == tkDestructor)
--- End code ---

to


--- Code: ---if (token->m_TokenKind == tkFunction)// || token->m_TokenKind == tkConstructor || token->m_TokenKind == tkDestructor)
--- End code ---

I hope this can fix your trouble. :D

oBFusCATed:
blueshake: have you seen this problem on your code or you're just guessing a fix?

p.s. I'm using the debugger branch

blueshake:
yes,I have try it in ccbranch.it work well
for example :

test codes:

--- Code: ---class qq
{
   qq() {}
int x;
int y;
};
q|
--- End code ---

when you edit in the positon "|", cc give you codecompletion suggestion box, and you press enter,in the before, it wil auto add the "()" ,but now it will not after applied the modifation.

The reason is :

the class name is the same to the class's construtor,when we generate the suggestion list,we think class construtor is funciton,but actually it maybe is class.and that is why you type class ,but the "()" is added automatically.

Loaden:

--- Quote from: oBFusCATed on May 03, 2010, 03:34:39 pm ---Requests:
1. Please make this feature optional

--- End quote ---
I think we need remove this feature.

BTW. The patch based cc branch.

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version