if (fAdapterFactory.isNodeProjectable(node)
&& node instanceof IndexedRegion) {
// IDocument document =
// fAdapterFactory.getProjectionViewer().getDocument();
// if (document != null) {
IndexedRegion inode = (IndexedRegion) node;
// only want to fold regions of the valid type and with a valid
// range
if (inode.getStartOffset() >= 0 && inode.getLength() >= 0) {
IDOMNode node1 = (IDOMNode) inode;
IStructuredDocumentRegion startRegion = node1
.getStartStructuredDocumentRegion();
IStructuredDocumentRegion endRegion = node1
.getEndStructuredDocumentRegion();