Fold your code – See only what you want to see

Java files today have not only the Java code but many user comments, annotations, javadoc comments and copyright statements.

Just the copyright statement can take up tens of lines in every file and
that too at a place that is prime real estate in a code file, right
at the top. In a blog entry, Tor Norbye looks at how you can free up space and achieve Copyright folding in NetBeans and Sun Java Studio Creator.

He begins by saying “Most source files have copyrights on them. When opening a file you have to scroll past the copyright, and the import statements, before you get to the interesting part – the class javadoc comment. Most IDEs now have a way to have the import section automatically folded. But what about the copyright section? It’s often quite large – in Apache source code for example the copyright is 50 lines long – that’s more than a full editor page. Code folding to the rescue!”

He then discusses how you can get the desired folding and even view the fold contents using just a mouse over.

Is it possible to create user defined folds / copyright folding using Eclipse or any other IDE?

Related:
>> JDeveloper is the most comprehensive Java IDE available.
>> Java IDE in a brand new avatar. Making development server centric
>> Java IDE comparison: Borland JBuilder tops.
>> Top Java IDEs

Reference:
>> Copyright Folding

Content Team

The IndicThreads Content Team posts news about the latest and greatest in software development as well as content from IndicThreads' conferences and events. Track us social media @IndicThreads. Stay tuned!

0 thoughts on “Fold your code – See only what you want to see

Leave a Reply