Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Hiding code temporarily
Hiding code temporarily [message #1385554] Mon, 09 June 2014 10:23 Go to next message
H vN is currently offline H vNFriend
Messages: 9
Registered: November 2009
Junior Member
Hi,

I'm debugging a large piece of code with many if's. The error I get at a few places is that there is a missing ; but after checking I suspect a missing { or } is the real issue. To check this I would like to temporarily 'hide' the code so I can check that both { and } are there. Is this possible in Eclipse and if so, how ? BTW, it's the same idea as in Matlab where you can click the - or + next to an if-statement.

Thanks.
Re: Hiding code temporarily [message #1386080 is a reply to message #1385554] Fri, 13 June 2014 11:19 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
When you place the cursor close to a bracket/brace then the editor will highlight the corresponding bracket/brace. When you press Shift+Ctrl+P then the cursor will jump to this bracket.
You can also use the code folding feature. When you click at the left border the little circle with a minus next to an if statement then Eclipse will fold (hide) the code that belongs to this if statement (the same holds true for else/for/while etc.).
There is also a plugin which visually separates these blocks by different colors
http://editbox.sourceforge.net/

The bracketeer plugin https://github.com/chookapp/Bracketeer is also very helpful.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:How to exclude XML folders from validation in Kepler
Next Topic:Cant add "-static-libgcc -lws2_32 "
Goto Forum:
  


Current Time: Fri Apr 26 18:45:57 GMT 2024

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

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

Back to the top