Bug 94730 [projection] Nondeterministic folding summary
I20050509-2010 With the CU below: - fold the method declaration -> 'bar()' is shown as summary - unfold again - select the method name 'bar' - type 'foo' - fold the method declaration again -> 'void' is shown as summary "interface Bar { void bar(); } "
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/folding/DefaultJavaFoldingStructureProvider.java
CommentPosition(int offset, int length) {
			super(offset, length);
		}
		/*
		 * @see org.eclipse.jface.text.source.projection.IProjectionPosition#computeFoldingRegions(org.eclipse.jface.text.IDocument)
		 */
		public IRegion[] computeProjectionRegions(IDocument document) throws BadLocationException {
			DocumentCharacterIterator sequence= new DocumentCharacterIterator(document, offset, offset + length);
			int prefixEnd= 0;
			int contentStart= findFirstContent(sequence, prefixEnd);
			int firstLine= document.getLineOfOffset(offset + prefixEnd);
			int captionLine= document.getLineOfOffset(offset + contentStart);
			int lastLine= document.getLineOfOffset(offset + length);
			Assert.isTrue(firstLine <= captionLine, "first folded line is greater than the caption line"); 
			Assert.isTrue(captionLine <= lastLine, "caption line is greater than the last folded line"); 
			IRegion preRegion;
			if (firstLine < captionLine) {
				int preOffset= document.getLineOffset(firstLine);
				IRegion preEndLineInfo= document.getLineInformation(captionLine);
				int preEnd= preEndLineInfo.getOffset();
				preRegion= new Region(preOffset, preEnd - preOffset);
			} else {
				preRegion= null;
			}
			if (captionLine < lastLine) {
				int postOffset= document.getLineOffset(captionLine + 1);
				IRegion postRegion= new Region(postOffset, offset + length - postOffset);
				if (preRegion == null)
					return new IRegion[] { postRegion };