Bug 5233 Internal Error during code assist
Start code assist after item.set (assuming SWT & CTabItem are imported): final CTabItem item= new CTabItem(folder, SWT.NONE); item.set ==> a lot of internal error dialogs are opened. The log is not helpful due to bug in SWT: Log: Thu Oct 25 11:56:08 GMT+02:00 2001 4 org.eclipse.core.runtime 0 Failed to execute runnable (String index out of range: 1) org.eclipse.swt.SWTException: Failed to execute runnable (String index out of range: 1) at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java (Compiled Code)) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError(MessageDialog.java:318) at org.eclipse.ui.internal.Workbench.handleExceptionInEventLoop(Workbench.java:362) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:82 0) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/HTMLTextPresenter.java
if (myStart < yoursStart)
				range.length += insertLength;
			else
				range.start += insertLength;
		}
	}
	
	private void append(StringBuffer buffer, String string, TextPresentation presentation) {
		
		int length= string.length();
		buffer.append(string);
		
		if (presentation != null)
			adaptTextPresentation(presentation, fCounter, length);
			
		fCounter += length;
	}
	
	private String getIndent(String line) {
		int i= 0;
		while (Character.isWhitespace(line.charAt(i))) ++ i;
		return (line.substring(0, i) + " ");
	}
	
	/*
	 * @see IHoverInformationPresenter#updatePresentation(Display display, String, TextPresentation, int, int)
	 */
	public String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) {