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?
>> Copyright Folding
Latest posts by Content Team (see all)
- IndicThreads Pune 2016 To Equip Developers For A New Age Of Software Development - May 27, 2016
- Java Garbage Collectors – Moving to Garbage First (G1) Collector - May 25, 2016
- Using Lambdas and Streams in Java 8 - May 18, 2016