Bug 31473 Search Engine should not search in working copies that aren't on the build path
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
* 
	 * @see org.eclipse.jdt.core.JavaCore#getSharedWorkingCopies(org.eclipse.jdt.core.IBufferFactory)
	 * @since 2.0
	 */
	public static IWorkingCopy[] getSharedWorkingCopies() {
		return JavaCore.getSharedWorkingCopies(getBufferFactory());
	}
	
	/**
	 * Returns the BufferFactory for the Java UI plug-in.
	 *
	 * @return the BufferFactory for the Java UI plug-in
	 * 
	 * @see org.eclipse.jdt.core.IBufferFactory
	 * @since 2.0
	 */
	public static IBufferFactory getBufferFactory() {
		CompilationUnitDocumentProvider provider= JavaPlugin.getDefault().getCompilationUnitDocumentProvider();
		if (provider != null)
			return provider.getBufferFactory();
		return null;
	}
	/**
	 * Returns the DocumentProvider used for Java compilation units.
	 *
	 * @return the DocumentProvider for Java compilation units.
	 * 
	 * @see IDocumentProvider
	 * @since 2.0
	 */