Folding in Eclipse Text Editors

In this article on the Eclipse website, Prashant Deva explains the new projection infrastructure introduced in the JFace Text framework and shows how to extend the XML Editor example provided with Eclipse to allow folding of text..