Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Scope and type of variable under caret
e.p:
Hello!
I am new to the forum, so I hope this is the right place to ask this question.
I am working on a plugin and I need to know the type of the variable (in C language) under the caret (e.g. int, long,...).
Furthermore I need to know if it is a local or global variable and if it has the static attribute.
If the variable is local, I need to get the function where it is defined, too.
The hover-text generated by the code completion plugin could be parsed to obtain these informations.
But... how do I get this text into my plugin?
And how can I find out if the variable is static?
Regards, e.p
oBFusCATed:
I think this info is private for the CC plugin and another plugin can't access it.
e.p:
--- Quote from: oBFusCATed on April 20, 2011, 12:45:20 pm ---I think this info is private for the CC plugin and another plugin can't access it.
--- End quote ---
The modified version of CB is for internal use in our company only.
So it would not be a problem to modify the rest of CB too in order to gain access to this information.
But I cannot figure out where this text is originated inside CC.
Some hints? ;-)
Regards, e.p
oBFusCATed:
You can start from:
CodeCompletion::OnValueTooltip
CodeCompletion::OnCodeComplete
CodeCompletion::OnShowCallTip
If you succeed in making this feature, I'll be happy to look at the patch (the debugger plugin can benefit from such feature:) )
ollydbg:
Quite interesting feature.
You need to read the Token class under plugins\codecompletion\parser\token.h
Oh, it seems only "line" information is recorded, No column info is here.
In the feature, it can be added.
BTW: I have a test project based on QUEX, which can give a very nice lexer (give token id, token string, column, and line info) , but it is not mature right now. :D
Navigation
[0] Message Index
[#] Next page
Go to full version