CFEclipse Features: Code Folding

Robert Blackburn
Jul 12, 2006

By Robert Blackburn

Figure1
Figure 1
Figure1
Figure 2
Figure1
Figure 3

This week in CFEclipse Features we will be looking at code folding. I have seen quite a few developers get frustrated with this feature, though it's quite simple.

As you type code, you will notice a little grey icon in the gutter to the left of the editor pane (where you might see line numbers). (See Figure 1.) That icon will show up any time you write a code block of a specific size. It can be clicked, and the corresponding block of code will collapse down to a single line, as shown in Figure 2. If you want to expand that block again, just click the icon a second time and the code block is returned. If you would like to see what code is inside a collapsed block, you can hover over the icon and an insight window will pop up with the contents of the block, as shown in Figure 3.

The great part is you can configure how large a block of code most be before it is foldable. You can even set certain types of blocks to be folded by default. To configure this, click Window > Preferences > CFEclipse > Code Folding.

It can be frustrating when you're working with large files, especially CFCs and UDF Libraries, where multiple blocks of code can look very similar. With the code folding feature you can hide the code not important to your current work.

In the next CFEclipse Features article we will cover in-line code help, which can provide details about a ColdFusion tag or function right inside the editor pane.

If you liked this article, you might like the rest of Robert Blackburn's CFEclipse Series:


Robert Blackburn is a developer and team leader of the Internet Application Development team at American Power Conversion Corporation (http://www.apcc.com). He has been using ColdFusion since 1999, and has revived and manages the CFUnit open source project (http://cfunit.sourceforge.net). He currently has a blog at http://www.rbdev.net/devblog for his occasional ramblings.

Add a Comment
(If you subscribe, any new posts to this thread will be sent to your email address.)
  
Privacy | FAQ | Site Map | About | Guidelines | Contact | Advertising | What is ColdFusion?
House of Fusion | ColdFusion Jobs | Blog of Fusion | AHP Hosting