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
unit.reconcile(ICompilationUnit.NO_AST, false, null, null);
							} catch (JavaModelException x) {
							}
						}
					}
					Map additions= computeAdditions((IParent) fInput);
					model.removeAllAnnotations();
					model.replaceAnnotations(null, additions);
				}
			}
			
		} finally {
			fCachedDocument= null;
			fAllowCollapsing= false;
			
			fFirstType= null;
			fHasHeaderComment= false;
		}
	}
	private void initializePreferences() {
		IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
		fCollapseInnerTypes= store.getBoolean(PreferenceConstants.EDITOR_FOLDING_INNERTYPES);
		fCollapseImportContainer= store.getBoolean(PreferenceConstants.EDITOR_FOLDING_IMPORTS);
		fCollapseJavadoc= store.getBoolean(PreferenceConstants.EDITOR_FOLDING_JAVADOC);
		fCollapseMethods= store.getBoolean(PreferenceConstants.EDITOR_FOLDING_METHODS);
		fCollapseHeaderComments= store.getBoolean(PreferenceConstants.EDITOR_FOLDING_HEADERS);
	}
	private Map computeAdditions(IParent parent) {
		Map map= new LinkedHashMap(); 
		try {