Bug 10957 IllegalArgumentException from drawing Highlight Line
20020305 Dont know if reproducible: 1. create new project with 2 classes pack.A & pack.B 2. add a long comment to B 3. Open Browser perspective, no editors open 4. Select B (opens editor), select comment, now switch to A ->IAE (Editor is reused) java.lang.IllegalArgumentException: Index out of bounds Stack trace: java/lang/Throwable.<init>()V java/lang/Throwable.<init>(Ljava/lang/String;)V org/eclipse/swt/SWT.error(ILjava/lang/Throwable;)V org/eclipse/swt/SWT.error(I)V org/eclipse/swt/custom/StyledText.redrawRange(IIZ)V org/eclipse/jdt/internal/ui/javaeditor/LinePainter.drawHighlightLine()V org/eclipse/jdt/internal/ui/javaeditor/LinePainter.paint()V org/eclipse/jdt/internal/ui/javaeditor/PaintManager.paint()V org/eclipse/jdt/internal/ui/javaeditor/PaintManager.access$2 (Lorg/eclipse/jdt/internal/ui/javaeditor/PaintManager;)V org/eclipse/jdt/internal/ui/javaeditor/PaintManager$1.run()V org/eclipse/swt/widgets/RunnableLock.run()V org/eclipse/swt/widgets/Synchronizer.runAsyncMessages()Z org/eclipse/swt/widgets/Display.runAsyncMessages()Z org/eclipse/swt/widgets/Display.readAndDispatch()Z org/eclipse/ui/internal/Workbench.runEventLoop()V org/eclipse/ui/internal/Workbench.run(Ljava/lang/Object;)Ljava/lang/Object; org/eclipse/core/internal/boot/InternalBootLoader.run (Ljava/lang/String;Ljava/net/URL;Ljava/lang/String;[Ljava/lang/String;) Ljava/lang/Object; org/eclipse/core/boot/BootLoader.run (Ljava/lang/String;Ljava/net/URL;Ljava/lang/String;[Ljava/lang/String;) Ljava/lang/Object; SlimLauncher.main([Ljava/lang/String;)V
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/LinePainter.java
fLine[1]= content.getOffsetAtLine(fLineNumber + 1) - fLine[0];
		} catch (IllegalArgumentException x) {
			fLine[1]= -1;
		}
	}
	
	private void drawHighlightLine() {
		if (fLine[1] == -1 || (fLineNumber + 1) == fTextWidget.getLineCount()) {
			Point upperLeft= fTextWidget.getLocationAtOffset(fLine[0]);
			int width= fTextWidget.getClientArea().width;
			int height= fTextWidget.getLineHeight();			
			fTextWidget.redraw(upperLeft.x, upperLeft.y, width, height, false);
		} else {
			fTextWidget.redrawRange(fLine[0], fLine[1], true);
		}
	}
	
	/*
	 * @see IPainter#deactivate(boolean)
	 */
	public void deactivate(boolean redraw) {
		if (fIsActive) {
			fIsActive= false;
			fTextWidget.removeLineBackgroundListener(this);
			if (redraw)
				drawHighlightLine();
		}
	}
	
	/*