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
private IResource getResource() {
			IEditorInput input= fTextEditor.getEditorInput();
			if (input instanceof IFileEditorInput) {
				IFileEditorInput fileInput= (IFileEditorInput) input;
				return fileInput.getFile();
			}
			return null;
		}
		/*
		 * @see IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
		 */
		public void resourceChanged(IResourceChangeEvent e) {
			IResourceDelta delta= e.getDelta();
			IResource resource= getResource();
			if (delta != null && resource != null) {
				IResourceDelta child= delta.findMember(resource.getFullPath());
				if (child != null) {
					IMarkerDelta[] deltas= child.getMarkerDeltas();
					if (deltas.length > 0)
						forceReconciling();
				}
			}
		}
	}