Bug 60414 Should generate IMarker if editor doesn't provide AnnotationModel
To be backward compatible with existing multi page editors we should generate temporary search markers if the text editor doesn't support Annotation models.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindAction.java
private Class[] fValidTypes;
	private JavaEditor fEditor;	
	FindAction(IWorkbenchSite site, String label, Class[] validTypes) {
		super(site);
		setText(label);
		fValidTypes= validTypes;
	}
	FindAction(JavaEditor editor, String label, Class[] validTypes) {
		this (editor.getEditorSite(), label, validTypes);
		fEditor= editor;
		setEnabled(SelectionConverter.canOperateOn(fEditor));
	}
	private boolean canOperateOn(IStructuredSelection sel) {
		return sel != null && !sel.isEmpty() && canOperateOn(getJavaElement(sel, true));
	}
		
	boolean canOperateOn(IJavaElement element) {
		if (fValidTypes == null || fValidTypes.length == 0)
			return false;
		if (element != null) {
			for (int i= 0; i < fValidTypes.length; i++) {
				if (fValidTypes[i].isInstance(element)) {
					if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT)
						return hasChildren((IPackageFragment)element);
					else
						return true;
				}
			}
		}