Bug 25900 NPE in CompilationUnitEditor
Build I20021105++ - load JUnit - expand a CU - delete CU on disk - select a field of expanded CU - open type hierarchy ==> you get an editor saying that the file doesn't exist on disk - close editor java.lang.NullPointerException at org.eclipse.jdt.internal.ui.javaeditor.LinePainter.drawHighlightLine (LinePainter.java:110) at org.eclipse.jdt.internal.ui.javaeditor.LinePainter.deactivate (LinePainter.java:128) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.stopLineHighlightin g(CompilationUnitEditor.java:1142) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.dispose (CompilationUnitEditor.java:1350) at org.eclipse.ui.internal.WorkbenchPage$5.run(WorkbenchPage.java:910) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:839) at org.eclipse.core.runtime.Platform.run(Platform.java:413) at org.eclipse.ui.internal.WorkbenchPage.disposePart (WorkbenchPage.java:908) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:723) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:690) at org.eclipse.ui.internal.EditorPane.doHide(EditorPane.java:83) at org.eclipse.ui.internal.EditorWorkbook$1.itemClosed (EditorWorkbook.java:121) at org.eclipse.swt.custom.CTabFolder.closeNotify(CTabFolder.java:304) at org.eclipse.swt.custom.CTabFolder.access$13(CTabFolder.java:294) at org.eclipse.swt.custom.CTabFolder$4.handleEvent(CTabFolder.java:434) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1419) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1402) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:831) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:432) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
String line= text.substring(offset, endOffset);
							
							int position= 0;
							if (i == 0) {
								IRegion firstLine= document.getLineInformationOfOffset(command.offset);
								position= command.offset - firstLine.getOffset();	
							}
							
							int length= line.length();
							for (int j= 0; j < length; j++) {
								char c= line.charAt(j);
								if (c == '\t') {
									position += insertTabString(buffer, position);
								} else {
									buffer.append(c);
									++ position;
								}
							}
							
						}
						
						command.text= buffer.toString();
						
				} catch (BadLocationException x) {
				}
			}
		}
	};
	
	private class PropertyChangeListener implements IPropertyChangeListener {