User forums > Using Code::Blocks

CC with keywords

(1/2) > >>

Alpha:
I know in previous versions, CC was able to provide suggestions for non-C-like languages via keyword sets.  However, revision 7862 (CC: applied patch by Darius Markauskas (darmar) to allow foreign CC plugin to take over (basically CC skips file types other than C / C++ now)) seems to have revoked this behavior.  Is there a workaround/option I could use to get this functionality back?

ollydbg:
In the CC option dialog->c/c++ parser(adv) panel, there are some entry that you can specify your own file format support by CC.

Which means, if you custom file is a.abc, you can add "abc" there(no double quote).

Alpha:
I had looked at that option, however, it has the side effect of additionally trying to parse the files (instead of only supplying keywords from the lexer).
My personal preference in this situation would be to return to CC's prior behavior of keyword suggestion for unsupported file types, adding a blacklist (instead of the current whitelist) which the user - or other plugins - could modify as needed.  (This setting would be separate from the one you mentioned, which tells CC what types of files to parse.)

ollydbg:

--- Quote from: Alpha on March 07, 2012, 10:47:31 pm ---I had looked at that option, however, it has the side effect of additionally trying to parse the files (instead of only supplying keywords from the lexer).

--- End quote ---
Yes, adding the "abc" to that option will let our CC parser to parse them.


--- Quote ---My personal preference in this situation would be to return to CC's prior behavior of keyword suggestion for unsupported file types, adding a blacklist (instead of the current whitelist) which the user - or other plugins - could modify as needed.  (This setting would be separate from the one you mentioned, which tells CC what types of files to parse.)

--- End quote ---
I'm not fully understand this idea?
Currently, we have a whitelist in our CC option dialog. But what does "blacklist" used for? You mean the files in blacklist can give some "predefined suggestion texts"? event sent to blacklist files will be handled from other plugins?

MortenMacFly:
CC will not parse files to offer the keywords from lexers (lexers are a scintilla thing). I am aware of the drawback described here and I have already discussed with darmar about what we could do best to re-enable that option.

@ollydbg:
The things is: It was the fallback solution in CodeCompletion::CodeComplete(), starting here:

--- Code: ---                EditorColourSet* theme = ed->GetColourSet();
                if (theme)

--- End code ---

However, that this fired for non-C/C++ files was nice, but technically wrong. So we have to do it properly. The way it was will not return as it was wrong.

Navigation

[0] Message Index

[#] Next page

Go to full version