Bug 40355 quick fix: list of completions not wanted when there's only 1 [quick fix]
20030716 int f(){ return 1; } change '1' to 'true' use quick fix to change method type content assist window appears with 1 proposal (i don't need it then) moreover, after pressing esc i'm not taken to where i was before, i'm stuck in the method declaration
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CUCorrectionProposal.java
LinkedPositionManager manager= new LinkedPositionManager(viewer.getDocument());
		LinkedPositionUI editor= new LinkedPositionUI(viewer, manager);
		
		for (int i= 0; i < linked.length; i++) {
			GroupDescription curr= linked[i];
			String name= curr.getName(); 
			TextRange range= change.getNewTextRange(curr.getTextEdits());
			if (range != null && range.isValid() && name != null) {
				ICompletionProposal[] linkedModeProposals= getLinkedModeProposals(name);
				if (linkedModeProposals != null) {
					manager.addPosition(range.getOffset(), range.getLength(), name, linkedModeProposals);
				} else {
					manager.addPosition(range.getOffset(), range.getLength(), name);
				}
				if (i == 0) {
					editor.setInitialOffset(range.getOffset());
				}
			}
		}
			
		if (selection != null) {
			TextRange range= change.getNewTextRange(selection.getTextEdits());
			if (range != null && range.isValid()) {
				editor.setFinalCaretOffset(range.getOffset() + range.getLength());
			}					
		} else {
			int cursorPosition= viewer.getSelectedRange().x;
			if (cursorPosition != 0) {
				editor.setFinalCaretOffset(cursorPosition);
			}