1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.help.ui; 12 13 import java.util.Dictionary; 14 15 import org.eclipse.help.search.ISearchScope; 16 import org.eclipse.jface.preference.IPreferenceStore; 17 18 /** 19 * Creates search scope objects from the provided preference store. Classes that 20 * implement this interface should take settings manipulated in the search scope 21 * preference pages and create scope objects that are required by search 22 * engines. Search engine and scope factory are defined together in the same 23 * extension point, hence the actual implementation of ISearchScope is up to the 24 * contributor. 25 * 26 * @since 3.1 27 */ 28 public interface ISearchScopeFactory { 29 /** 30 * Returns a new search scope object created from the data in the preference 31 * store. Factories should be prepared to compute default values if they are 32 * missing from the preference store. This can happen before users open 33 * scope preference pages for the first time. 34 * <p> 35 * In cases where conflicting values can be found in the preference store 36 * and parameters, preference store should win i.e. parameters should be 37 * treated as default values only. 38 * 39 * @param store 40 * the preference store that holds the scope data 41 * @param engineId 42 * identifier of the engine instance that needs the scope object. 43 * @param parameters 44 * configuration parameters provided in the engine extension 45 * point. They should be used as default values and preference 46 * store values (if defined) should be given precedance. 47 * @return a new search scope object 48 */ 49 ISearchScope createSearchScope(IPreferenceStore store, String engineId, 50 Dictionary parameters); 51 } 52