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
public void elementChanged(ElementChangedEvent e) {
			IJavaElementDelta delta= findElement(fInput, e.getDelta());
			if (delta != null)
				processDelta(delta);
		}
		private IJavaElementDelta findElement(IJavaElement target, IJavaElementDelta delta) {
			if (delta == null || target == null)
				return null;
			IJavaElement element= delta.getElement();
			if (element.getElementType() > IJavaElement.CLASS_FILE)
				return null;
			if (target.equals(element))
				return delta;
			IJavaElementDelta[] children= delta.getAffectedChildren();
			for (int i= 0; i < children.length; i++) {
				IJavaElementDelta d= findElement(target, children[i]);
				if (d != null)
					return d;
			}
			return null;
		}
	}
	/**
	 * Projection position that will return two foldable regions: one folding away
	 * the region from after the '/**' to the beginning of the content, the other
	 * from after the first content line until after the comment.
	 *
	 * @since 3.1
	 */
	private static final class CommentPosition extends Position implements IProjectionPosition {