Bug 84794 Empty error dialog after code assist
I20050208 - Enable 'fill arguments...', disable 'guess filled...' In the following class (that has IDocument on its class path) use code assist to complete 'se' to 'search'. Empty error dialog pops up. Log contains a stack trace public class A { private int addNewInsertEdit(int currPos, String str, IDocument document, int importsEnd) { document.se } } org.eclipse.jface.text.BadLocationException at org.eclipse.jface.text.link.LinkedPositionGroup.enforceDisjoint(LinkedPositionGroup.java:142) at org.eclipse.jface.text.link.LinkedPositionGroup.enforceDisjoint(LinkedPositionGroup.java:156) at org.eclipse.jface.text.link.LinkedModeModel.enforceDisjoint(LinkedModeModel.java:300) at org.eclipse.jface.text.link.LinkedModeModel.addGroup(LinkedModeModel.java:411) at org.eclipse.jdt.internal.ui.text.java.ExperimentalProposal.apply(ExperimentalProposal.java:85) at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal.apply(JavaCompletionProposal.java:568) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:420) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.selectProposalWithMask(CompletionProposalPopup.java:367) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$19(CompletionProposalPopup.java:363) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$3.widgetDefaultSelected(CompletionProposalPopup.java:328) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:96) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2878) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2516) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1622) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1588) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:299) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:227) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:281) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.basicRun(Main.java:261) at org.eclipse.core.launcher.Main.run(Main.java:817) at org.eclipse.core.launcher.Main.main(Main.java:801)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ExperimentalProposal.java
model.forceInstall();
				JavaEditor editor= getJavaEditor();
				if (editor != null) {
					model.addLinkingListener(new EditorHighlightingSynchronizer(editor));
				}
				
				LinkedModeUI ui= new EditorLinkedModeUI(model, fTextViewer);
				ui.setExitPosition(fTextViewer, baseOffset + replacementString.length(), 0, Integer.MAX_VALUE);
				ui.setDoContextInfo(true);
				ui.enter();
	
				fSelectedRegion= ui.getSelectedRegion();
	
			} catch (BadLocationException e) {
				JavaPlugin.log(e);	
				openErrorDialog(e);
			}		
		} else
			fSelectedRegion= new Region(baseOffset + replacementString.length(), 0);
	}
	
	private String computeReplacementString(int baseOffset, int[] offsets, int[] lengths, IDocument document) {
		StringBuffer buffer= new StringBuffer(getReplacementString());
		int count= fParameterNames.length;
		offsets= new int[count];
		lengths= new int[count];
		
		buffer.append('(');
		for (int i= 0; i != count; i++) {
			if (i != 0)