Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » C: semantic coloring broken(I can't get symatic coloring to work with a C file)
C: semantic coloring broken [message #758819] Thu, 24 November 2011 16:10 Go to next message
Angus Mising name is currently offline Angus Mising nameFriend
Messages: 14
Registered: November 2011
Junior Member
I'm a bit new to Eclipse, so this is likely a noob problem: I have a C file open in my project and the only colours I see in the editor (containing 200+ lines of code) are black and white. I've looked in Preferences|C/C++|Editor|Syntax Coloring and this stuff is all enabled, so I don't know what it's waiting for. The outline tab says "An outline is not available". Is that related?
I'm running:
Eclipse IDE for C/C++ Developers

Version: Indigo Service Release 1
Build id: 20110916-0149
What that doesn't seem to tell you is that it's 64-bit (I seem to remember installing) and running Win7.

[Updated on: Thu, 24 November 2011 20:48]

Report message to a moderator

Re: C: semantic coloring broken [message #758885 is a reply to message #758819] Fri, 25 November 2011 02:30 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On 11/24/2011 10:10 AM, Angus wrote:
> I'm a bit new to Eclipse, so this is likely a noob problem: I have a C
> file open in my project and the only colours I see in the editor
> (containing 200+ lines of code) are black and white. I've looked in
> Preferences|C/C++|Editor|Syntax Coloring and this stuff is all enabled,
> so I don't know what it's waiting for.
> I'm running:
> Eclipse IDE for C/C++ Developers
>
> Version: Indigo Service Release 1
> Build id: 20110916-0149
> What that doesn't seem to tell you is that it's 64-bit (I seem to
> remember installing) and running Win7.
You may have opened the file in the generic text editor and not the
C/C++ editor.

You can switch the editor used to open a file by right clicking on the
file and selecting Open with... menu. Choose C/C++ editor.

Also make sure that the project is a C/C++ project.
Re: C: semantic coloring broken [message #759286 is a reply to message #758819] Mon, 28 November 2011 09:33 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
What's the ending of your file? Usually the C editor opens automatically when your file has the ending *.c, *.C, *.cpp, *.c++, , *.cc, *.cxx, *.h, *.hh, *.hpp, *.hxx

See Preferences->C/C++->File Types


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: C: semantic coloring broken [message #759392 is a reply to message #759286] Mon, 28 November 2011 14:40 Go to previous message
Angus Mising name is currently offline Angus Mising nameFriend
Messages: 14
Registered: November 2011
Junior Member
"Open with..." worked. Thanks. Strange it couldn't figure this out on its own. The file name is "main.c".
Also, how do I make sure that the project is C/C++? When I right-click on the project in the "Project Explorer" and select "Properties" I don't find any combo box or anything that let's me select the language, but looking through the many options, I see a lot of project settings that are all ready to expect a C/C++ project to the exclusion of any other language.
Previous Topic:transfer CDT project from linux to windows
Next Topic:CDT using Visual C++
Goto Forum:
  


Current Time: Tue May 14 21:33:08 GMT 2024

Powered by FUDForum. Page generated in 0.03622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top