Bug 96183 [reconciling] Incremental compiler falsely complains after method moved.
Move the method from Source.java to Target.java. The result is legal, but Source.java falsely shows an error indication (red x). Add some whitespace anywhere in Source.java and the error indicator rightfully goes away! -------------------- Target.java -------------------------- package bug; public class Target {} -------------------- Source.java BEFORE ------------------- class Source { public static String noop(){return "";} {noop().toString();} } -------------------- Source.java AFTER ------------------- import bug.Target; class Source { {Target.noop().toString();} // ERROR INDICATED FALSELY! }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaReconciler.java
public JavaReconciler(ITextEditor editor, JavaCompositeReconcilingStrategy strategy, boolean isIncremental) {
		super(strategy, isIncremental);
		fTextEditor= editor;
		
		
		
		
		
		
		
		
		
		
		if (editor instanceof CompilationUnitEditor)
			fMutex= ((CompilationUnitEditor) editor).getReconcilerLock();
		else
			fMutex= new Object(); 
	}
	/*
	 * @see org.eclipse.jface.text.reconciler.IReconciler#install(org.eclipse.jface.text.ITextViewer)
	 */
	public void install(ITextViewer textViewer) {
		super.install(textViewer);
		fPartListener= new PartListener();
		IWorkbenchPartSite site= fTextEditor.getSite();
		IWorkbenchWindow window= site.getWorkbenchWindow();
		window.getPartService().addPartListener(fPartListener);
		fActivationListener= new ActivationListener(textViewer.getTextWidget());
		Shell shell= window.getShell();
		shell.addShellListener(fActivationListener);