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
}
			if (headerEnd != -1) {
				return new Region(headerStart, headerEnd - headerStart);
			}
		}
		return null;
	}
	private Position createProjectionPosition(IRegion region, IJavaElement element) {
		if (fCachedDocument == null)
			return null;
		try {
			int start= fCachedDocument.getLineOfOffset(region.getOffset());
			int end= fCachedDocument.getLineOfOffset(region.getOffset() + region.getLength());
			if (start != end) {
				int offset= fCachedDocument.getLineOffset(start);
				int endOffset;
				if (fCachedDocument.getNumberOfLines() > end + 1)
					endOffset= fCachedDocument.getLineOffset(end + 1);
				else if (end > start)
					endOffset= fCachedDocument.getLineOffset(end) + fCachedDocument.getLineLength(end);
				else
					return null;
				if (element instanceof IMember)
					return new JavaElementPosition(offset, endOffset - offset, (IMember) element);
				else
					return new CommentPosition(offset, endOffset - offset);
			}
		} catch (BadLocationException x) {
		}
		return null;