Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: ollydbg on March 11, 2009, 02:40:11 am

Title: Suggest on changing the Variables name in Tokenizer
Post by: ollydbg on March 11, 2009, 02:40:11 am
In the Tokenizer class include Tokenizer.cpp and Tokenizer.h.

I think these member names should be changed to confirm the  coding style (http://wiki.codeblocks.org/index.php?title=Coding_style#Variables_naming).

Code
    
m_peek             ->  m_PeekToken
m_curtoken        -> m_CurToken
m_peekavailable  -> m_PeekAvailable

I do think it is necessary, really? :D
Title: Re: Suggest on changing the Variables name in Tokenizer
Post by: MortenMacFly on March 11, 2009, 08:41:52 am
Code
    
m_peek             ->  m_PeekToken
m_curtoken        -> m_CurToken
m_peekavailable  -> m_PeekAvailable
No objections. Could you provide a patch?
Title: Re: Suggest on changing the Variables name in Tokenizer
Post by: ollydbg on March 11, 2009, 12:12:38 pm
Ok.
I have created a patch. See the attachment file. (I have successfully built them in my windows svn 5482)
I change the m_curtoken   -> m_Token
So that there are three groups members. Also, I change the Tokenizer.cpp's encoding to UTF8 without BOM.

Current:
m_Token XXX 
......
Undo:
m_UndoTokenXXX
......
Peek:
m_PeekTokenXXX
......

Also, I change the sequence of initial member list in the constructor to avoid compiling warnings.

[attachment deleted by admin]
Title: Re: Suggest on changing the Variables name in Tokenizer
Post by: MortenMacFly on March 11, 2009, 02:34:36 pm
I have created a patch.
Thanks. Give me some days to test it...


BTW, this:
Also, I change the Tokenizer.cpp's encoding to UTF8 without BOM.
...caused a comment to be not readable anymore. So I am not going to apply the UTF8 change. Be careful with such. ;-)
Title: Re: Suggest on changing the Variables name in Tokenizer
Post by: ollydbg on March 11, 2009, 02:40:19 pm
OK
The reason I change it's encoding is that by default, the "search thread" can't do search on this file( a messagebox will jump to say "can't open this file  :(), but after changing to UTF8 with out BOM( I converted it by NotePad++), then it can be searched correctly. :D
Title: Re: Suggest on changing the Variables name in Tokenizer
Post by: MortenMacFly on March 11, 2009, 02:51:45 pm
the "search thread" can't do search on this file
If you mean the thread search plugin - this works fine for me (see image attached). Hence I have applied a couple of patches - so probably it's not working in trunk, indeed.

changing to UTF8 with out BOM( I converted it by NotePad++)
Hehe - what Notepad++ did was "converting" the characters in question to something else, but different. So the conversion is in fact kind of broken and just "works" because the problematic chars (² and ³) are no more. ;-)

[attachment deleted by admin]
Title: Re: Suggest on changing the Variables name in Tokenizer
Post by: ollydbg on March 11, 2009, 05:43:36 pm
If you mean the thread search plugin - this works fine for me (see image attached). Hence I have applied a couple of patches - so probably it's not working in trunk, indeed.
Thank you!
I can see your image, I'm looking forward to the new nightly build version that all these patches were applied to trunk. :D
Title: Re: Suggest on changing the Variables name in Tokenizer
Post by: ollydbg on April 11, 2009, 05:11:53 pm
@MortenMacFly

Just a reminder, are all the patches on code completion still in testing phase? (It seems one months passed, I can't wait :D...)

Thanks.
Title: Re: Suggest on changing the Variables name in Tokenizer
Post by: MortenMacFly on April 11, 2009, 08:22:54 pm
Just a reminder, are all the patches on code completion still in testing phase? (It seems one months passed, I can't wait :D...)
Yes, they are. We (the devs) do still testing. Hence the release schedule is like that:
- merge wxaui branch
- create CC branch for official testing
- merge CC branch (won't take as long as wxaui branch though)
All I can say: Please be patient. Good things won't get lost - I promise. Keep in mind that these are hard times for all of us. Time is limited. But again: Nothing will get lost. For sure.
Title: Re: Suggest on changing the Variables name in Tokenizer
Post by: ollydbg on April 12, 2009, 02:52:33 am
Thanks for explanation. :D
Thanks for all your efforts!