Bug 31323 QuickAssist only wraps 2 lines
build I20030206. 1. Start with the following class public class Test { public static void main(String[] args) { int x = 3; x++; int y=x*x; } } 2. Select the THREE lines of code in the main method. 3. Press ctrl-1 4. If you select any of the quick assists (do, for, if, try, while), only the first TWO lines of the code are inserted. When I selected FOUR lines, still only the first TWO lines were inserted.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionAssistant.java
}
	public void install(ITextViewer textViewer) {
		super.install(textViewer);
		fViewer= textViewer;
	}			
	/**
	 * Show completions at caret position. If current
	 * position does not contain quick fixes look for
	 * next quick fix on same line by moving from left
	 * to right and restarting at end of line if the
	 * beginning of the line is reached.
	 * 
	 * @see org.eclipse.jface.text.contentassist.IContentAssistant#showPossibleCompletions()
	 */
	public String showPossibleCompletions() {
		if (fViewer == null)
			
			return super.showPossibleCompletions();
		
		int initalOffset= fViewer.getSelectedRange().x;
		int invocationOffset;
		int invocationLength;
		
		if (areMultipleLinesSelected()) {
			try {
				IDocument document= fViewer.getDocument();
				IRegion start= document.getLineInformationOfOffset(initalOffset);
				invocationOffset= start.getOffset();
				int line= document.getLineOfOffset(initalOffset);
				if (line + 1 < document.getNumberOfLines()) {