Bug 68157 Search for file occurences keybinding doesn't work
RC3 - 20040622:00:10 I opened org.eclipse.ui.examples.jobs.views.JobsView added a field to the classes saved the file (note at this point there are no errors or warnings in the file) then clicked on another existing field and pressed CTRl+SHIFT+U. All I got was a beep. I get this a lot and it is really annoying because I rely on this search function, I love it! The message in the status line when this happens is "element is not a java element". So here are the exact steps to reproduce 100% of the time (note that I have analyse annotations while typing turned off): 1. open JobsViews (org.eclipse.ui.examples.jobs plugin) 2. click on userField attribute and ctrl+shirt+u works. 3. add an attribute to the end of the Button fields. Don't save yet. 4. Click on another attribute and ctrl+shirt+u. Beep. Nothing happens. 4. save and the file compiles without errors. 5. click on userField again and then ctrl+shirt+u. It no longer works and the above error message is shown in the status line. Closing and then opening the editor will get you out of this state. but this is happening all the time and at first I thought it was a keybinding problem, but it actually looks like a java search issue.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
/*
	 * @see org.eclipse.jdt.internal.ui.javaeditor.ICompilationUnitDocumentProvider#shutdown()
	 */
	public void shutdown() {
		JavaPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPropertyListener);
		Iterator e= getConnectedElementsIterator();
		while (e.hasNext())
			disconnect(e.next());
	}
	
	/*
	 * @see org.eclipse.jdt.internal.ui.javaeditor.ICompilationUnitDocumentProvider#saveDocumentContent(org.eclipse.core.runtime.IProgressMonitor, java.lang.Object, org.eclipse.jface.text.IDocument, boolean)
	 */
	public void saveDocumentContent(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
		if (!fIsAboutToSave)
			return;
		super.saveDocument(monitor, element, document, overwrite);
	}
	
	/*
	 * @see org.eclipse.jdt.internal.ui.javaeditor.ICompilationUnitDocumentProvider#createLineTracker(java.lang.Object)
	 */
	public ILineTracker createLineTracker(Object element) {
		return new DefaultLineTracker();
	}
	
	
	/**
	 * Computes the scheduling rule needed to create or modify a resource. If
	 * the resource exists, its modify rule is returned. If it does not, the