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
buffer.append(", "); 
				
			offsets[i]= buffer.length();
			buffer.append(fParameterNames[i]);
			lengths[i]= buffer.length() - offsets[i];
		}
		buffer.append(')');
		return buffer.toString();
	}
	/**
	 * Returns the currently active java editor, or <code>null</code> if it 
	 * cannot be determined.
	 * 
	 * @return  the currently active java editor, or <code>null</code>
	 */
	private JavaEditor getJavaEditor() {
		IEditorPart part= JavaPlugin.getActivePage().getActiveEditor();
		if (part instanceof JavaEditor)
			return (JavaEditor) part;
		else
			return null;
	}
	/*
	 * @see ICompletionProposal#getSelection(IDocument)
	 */
	public Point getSelection(IDocument document) {
		if (fSelectedRegion == null)
			return new Point(getReplacementOffset(), 0);
		return new Point(fSelectedRegion.getOffset(), fSelectedRegion.getLength());
	}