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
}
	private void computeAdditions(IJavaElement element, Map map) {
		boolean createProjection= false;
		boolean collapse= false;
		switch (element.getElementType()) {
			case IJavaElement.IMPORT_CONTAINER:
				collapse= fAllowCollapsing && fCollapseImportContainer;
				createProjection= true;
				break;
			case IJavaElement.TYPE:
				collapse= fAllowCollapsing && fCollapseInnerTypes && isInnerType((IType) element);
				createProjection= true;
				break;
			case IJavaElement.METHOD:
				collapse= fAllowCollapsing && fCollapseMethods;
				createProjection= true;
				break;
		}
		if (createProjection) {
			IRegion[] regions= computeProjectionRanges(element);
			if (regions != null) {
				
				for (int i= 0; i < regions.length - 1; i++) {
					Position position= createProjectionPosition(regions[i], null);
					boolean commentCollapse;
					if (position != null) {
						if (i == 0 && (regions.length > 2 || fHasHeaderComment) && element == fFirstType) {
							commentCollapse= fAllowCollapsing && fCollapseHeaderComments;
						} else {
							commentCollapse= fAllowCollapsing && fCollapseJavadoc;