News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

CodeCompletion Token Replacements Config

Started by daniloz, November 10, 2011, 12:10:59 PM

Previous topic - Next topic

daniloz

Hi All,

I've just figured out that I cannot get rid of the default Token Replacements for the Code Completion plugin.
Even if I delete all of them, after a restart from C::B they're back. :o

Actually, I've traced the bug to a hard-coded addition of them all again in src/plugins/codecompletion/codecompletion.cpp, lines 500-526.

I think this addition should only be done in case token_replacements is not found in the config file in

cfg->Read(_T("token_replacements"), &repl);



MortenMacFly

Quote from: daniloz on November 10, 2011, 12:10:59 PM
I've just figured out that I cannot get rid of the default Token Replacements for the Code Completion plugin.
Even if I delete all of them, after a restart from C::B they're back. :o
As a workaround you could replace something with the same. Then this does not happen.

Quote from: daniloz on November 10, 2011, 12:10:59 PM

cfg->Read(_T("token_replacements"), &repl);

Yes, probably. But leaving the default token replacement is actually a good thing to do, because otherwise for certain compiler CC is broken. I guess that's why it's implemented that way.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

daniloz

Quote from: MortenMacFly on November 10, 2011, 02:19:15 PM
Quote from: daniloz on November 10, 2011, 12:10:59 PM
I've just figured out that I cannot get rid of the default Token Replacements for the Code Completion plugin.
Even if I delete all of them, after a restart from C::B they're back. :o
As a workaround you could replace something with the same. Then this does not happen.
Yeah, that's fine and no problem for me actually.
I just thing it's annoying for the user if he or she deletes an entry and it's there again the next time.

Quote from: MortenMacFly on November 10, 2011, 02:19:15 PM
Quote from: daniloz on November 10, 2011, 12:10:59 PM

cfg->Read(_T("token_replacements"), &repl);

Yes, probably. But leaving the default token replacement is actually a good thing to do, because otherwise for certain compiler CC is broken. I guess that's why it's implemented that way.
That's why I suggested a default value, in case the user has no tokens defined.
Or, if it's just essential to the CC, it should be done in the background, without the user knowledge, so it doesn't look like he or she could change it.

Anyway, just my 2 cents...