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
public HTMLTextPresenter(boolean enforceUpperLineLimit) {
		super();
		fEnforceUpperLineLimit= enforceUpperLineLimit;
	}
	
	public HTMLTextPresenter() {
		this(true);
	}
	
	protected Reader createReader(String hoverInfo, TextPresentation presentation) {
		return new HTML2TextReader(new StringReader(hoverInfo), presentation);
	}
	
	protected void adaptTextPresentation(TextPresentation presentation, int offset, int insertLength) {
				
		int yoursStart= offset;
		int yoursEnd=   offset + insertLength -1;
		yoursEnd= Math.max(yoursStart, yoursEnd);
		
		Iterator e= presentation.getAllStyleRangeIterator();
		while (e.hasNext()) {
			
			StyleRange range= (StyleRange) e.next();
		
			int myStart= range.start;
			int myEnd=   range.start + range.length -1;
			myEnd= Math.max(myStart, myEnd);
			
			if (myEnd < yoursStart)
				continue;