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
/**
	 * Internal Shell activation listener for activating the reconciler.
	 */
	private class ActivationListener extends ShellAdapter {
		private Control fControl;
		public ActivationListener(Control control) {
			Assert.isNotNull(control);
			fControl= control;
		}
		/*
		 * @see org.eclipse.swt.events.ShellListener#shellActivated(org.eclipse.swt.events.ShellEvent)
		 */
		public void shellActivated(ShellEvent e) {
			if (!fControl.isDisposed() && fControl.isVisible() && hasJavaModelChanged())
				JavaReconciler.this.forceReconciling();
		}
		/*
		 * @see org.eclipse.swt.events.ShellListener#shellDeactivated(org.eclipse.swt.events.ShellEvent)
		 */
		public void shellDeactivated(ShellEvent e) {
			if (!fControl.isDisposed() && fControl.isVisible())
				setJavaModelChanged(false);
		}
	}
	/**
	 * Internal Java element changed listener
	 *
	 * @since 3.0
	 */
	private class ElementChangedListener implements IElementChangedListener {