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

CodeCompletion Token Replacements Config

(1/1)

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

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

--- End code ---

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

--- End quote ---
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 ---
--- Code: ---cfg->Read(_T("token_replacements"), &repl);

--- End code ---

--- End quote ---
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.

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

--- End quote ---
As a workaround you could replace something with the same. Then this does not happen.

--- End quote ---
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 ---
--- Code: ---cfg->Read(_T("token_replacements"), &repl);

--- End code ---

--- End quote ---
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.

--- End quote ---
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...

Navigation

[0] Message Index

Go to full version