Bug 63382 Occurrences search: Annotations not shown in re-opened editor [search]
200405210010 - select return type of "TestResult run()" in TestCase.java - Search > Find Occurrences in File -> search annotations are correctly shown in vertical ruler - close editor - Navigate > Back -> only one search annotation is shown in vertical ruler -> expected: all annotations shown "Go to Next/Previous Annotation" also finds only one of the occurrences.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/OccurrencesSearchResult.java
} else if (editorInput instanceof IClassFileEditorInput) {
			IClassFileEditorInput classFileEditorInput= (IClassFileEditorInput) editorInput;
			IClassFile classFile= classFileEditorInput.getClassFile();
			
			Object[] elements= getElements();
			if (elements.length == 0)
				return NO_MATCHES;
			
			JavaElementLine jel= (JavaElementLine) elements[0];
			if (jel.getJavaElement().equals(classFile))
				return getMatches(jel);
		}
		return NO_MATCHES;
	}
	
	/*
	 * @see org.eclipse.search.ui.text.AbstractTextSearchResult#getFile(java.lang.Object)
	 */
	public IFile getFile(Object element) {
		JavaElementLine jel= (JavaElementLine) element;
		IResource resource= null;
		try {
			resource= jel.getJavaElement().getCorrespondingResource();
		} catch (JavaModelException e) {
			
		}
		if (resource instanceof IFile)
			return (IFile) resource;
		else
			return null;