Bug 35236 Attaching source redraws editor many times, causing much flashing
build I20030316 Kevin called in to report the following: - with an installed JRE that does not have source attached, - open a type in the rt.jar (e.g. java.awt.Color) - attach source - the editor flashes many times before it displays the source, then continues to flash for several more seconds I was able to reproduce it on Win XP.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
if (fSourceAttachmentForm != null) {
				fSourceAttachmentForm.dispose();
				fSourceAttachmentForm= null;
				fStackLayout.topControl= fViewerComposite;		
				fParent.layout();
			}
		}		
	}	
	/*
	 * @see ClassFileDocumentProvider.InputChangeListener#inputChanged(IClassFileEditorInput)
	 */
	public void inputChanged(final IClassFileEditorInput input) {
		if (input != null && input.equals(getEditorInput())) {	
			ISourceViewer viewer= getSourceViewer();
			if (viewer != null) {
				StyledText textWidget= viewer.getTextWidget();
				if (textWidget != null && !textWidget.isDisposed()) {
					textWidget.getDisplay().asyncExec(new Runnable() {
						public void run() {
							setInput(input);
						}
					});
				}
			}						
		}
	}
	
	/*
	 * @see JavaEditor#createJavaSourceViewer(Composite, IVerticalRuler, int)
	 */