Author Topic: Non .c or .cpp file extensions and code completion  (Read 6318 times)

Sebastian

  • Guest
Non .c or .cpp file extensions and code completion
« on: June 21, 2007, 08:06:40 pm »
First and foremost, I want to thank the developers and community here for providing such a fantastic free IDE!

Now, onto my question/problem - I use Code::Blocks as C editor for source files compiled using some sort of proprietary UNIX software (don't ask me what, I'm not really sure). The file extension for the source files is .tl (again no idea why). I've set Code::Blocks to open these files both in the environment configuration, in the windows file extensions list (and also defined it as a C++ source file) and set the extension as a source file in the project file tree. Oh, I also set it as a C source type in the syntax highlighting plugin and it works great.

What I can't do, however, is get the code completion plugin to recognize it as a c/cpp source! I've searched the forums, digged through the GUI configuration, painfully examined the configuration files, but cannot for the life of me find a place to define what extensions the code completion plugin should consider C/C++ sources.

What am I missing? How can I make Code::Blocks code complete these C files without renaming them all to .c files every time I go back and forth between Code::Blocks and the UNIX compiler?

Thank you in advance,
Sebastian

Sebastian

  • Guest
Re: Non .c or .cpp file extensions and code completion
« Reply #1 on: June 28, 2007, 06:09:58 pm »
No ideas?  :?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Non .c or .cpp file extensions and code completion
« Reply #2 on: June 28, 2007, 06:39:52 pm »
I checked the source. Try adding the filetypes as C++ files in the syntax highlighter (filemasks...). That's how Codecompletion checks the filetypes.

Also, we need you to post a feature request to add custom filetypes in the CodeCompletion plugin.

Sebastian

  • Guest
Re: Non .c or .cpp file extensions and code completion
« Reply #3 on: June 28, 2007, 11:44:29 pm »
Thanks for the reply Rick,

I already had them defined in the highlighter filemask for cpp files, and I just tried it again after you mentioned it - still doesn't work.

I'll go ahead and add the feature request.

- Sebastian

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: Non .c or .cpp file extensions and code completion
« Reply #4 on: June 29, 2007, 07:04:16 am »
I already had them defined in the highlighter filemask for cpp files, and I just tried it again after you mentioned it - still doesn't work.
Confirm it. On *.sqx files doesn't work.
I want this feature too.
Thanks.
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Non .c or .cpp file extensions and code completion
« Reply #5 on: June 29, 2007, 01:04:29 pm »
I already had them defined in the highlighter filemask for cpp files, and I just tried it again after you mentioned it - still doesn't work.
Confirm it. On *.sqx files doesn't work.
I want this feature too.
Thanks.

i want a box of icecream please, but no vanilla icecream, that's too boring standard, i'd like chinese gooseberry cream plz, thx  8)

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: Non .c or .cpp file extensions and code completion
« Reply #6 on: June 29, 2007, 01:40:01 pm »
i want a box of icecream please, but no vanilla icecream, that's too boring standard, i'd like chinese gooseberry cream plz, thx  8)
we need you to post a feature request :wink:
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Non .c or .cpp file extensions and code completion
« Reply #7 on: June 29, 2007, 07:11:41 pm »
lol guys. Anyway, you have a point. I want this feature to be added too, so I could class-browse my php files, but I'm not sure if i *SHOULD*. In any case I could post a patch so you can compile your own version of codeblocks with custom-extensions enabled for codecompletion. *BUT* I need you to post that feature request on berlios.

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: Non .c or .cpp file extensions and code completion
« Reply #8 on: July 02, 2007, 08:49:10 am »
*BUT* I need you to post that feature request on berlios.
Sebastian wanted to add request. Wait.
Me found place in source code, dirty patch I can do for self.
Then it's no right.
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen