Bug 85549 [projection] Incorrect folding in CU without terminating linebreak
I20050215-2300 - Have a CU with contents "package copying; public class Class { }" (no linebreak here) - collapse class folding -> a "}" remains on the last line. Expected: last line is empty - set caret to end of text and press Enter -> after reconciling, there are two boxes with dots. Expected: only one box. => Folding at the end of file is only correct if the file ends with at least two empty lines.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/folding/DefaultJavaFoldingStructureProvider.java
headerEnd= scanner.getCurrentTokenEndPosition();
						foundComment= true;
					}
					terminal= scanner.getNextToken();
				}
				
				
			} catch (InvalidInputException ex) {
				return null;
			}
			
			if (headerEnd != -1) {
				return new Region(headerStart, headerEnd - headerStart);
			}
		}
		return null;
	}
	
	/**
	 * Computes the offset of the caption text start relative to
	 * <code>position</code>.
	 * 
	 * @param position the position of the folded region
	 * @param element the java element belonging to the folded region, or <code>null</code>
	 * @return the caption offset relative to the position offset
	 */
	private int computeCaptionOffset(Position position, IJavaElement element) {
		Assert.isNotNull(fCachedDocument); 
		if (element instanceof IMember) {
			try {