Skip to main content
Jump to: navigation, search

EMF Search Framework Extensibility---org.eclipse.emf.search.modelSearchEngine

Revision as of 13:20, 24 April 2008 by Lucas.bigeardel.gmail.com (Talk | contribs) (org.eclipse.emf.search.modelSearchEngine)

org.eclipse.emf.search.modelSearchEngine

Users wanting to contribute an custom ecore metamodel based search should extends modelSearchEngine.

* id - model search engine unique ID
* label - Query label to be displayed as a prefix of in search result pages
* searchQueryFactory - This extension point element describes a model search engine compliant with org.eclipse.emf.search.providers.IModelSearchQueryFactory APIs.
* queryParametersFactory - parameter factory compliant with IModelSearchQueryParametersFactory
* modelResourceValidator - resource validator compliant with IModelSearchQueryParametersFactory and specializing AbstractModelResourceValidator


<plugin>
   <extension
         point="org.eclipse.emf.search.modelSearchEngine">
      <modelSearchEngine
            id="search.MoviesDbSearchEngine"
            label="MoviesDb Search Engine"
            modelResourceValidator="search.engine.ModelResourceValidator"
            queryParametersFactory="search.factories.ModelSearchQueryParametersFactory"
            searchQueryFactory="search.factories.ModelSearchQueryFactory"/>
   </extension>
</plugin>
import org.eclipse.emf.search.core.resource.AbstractModelResourceValidator;
 
/**
 * Allows users to describe all the specific query search supported model editor extensions.
 */
public class ModelResourceValidator extends AbstractModelResourceValidator {
	public ModelResourceValidator() {
 
		addModelFileExtension("movies"); //$NON-NLS-1$
		addModelFileExtension("customers"); //$NON-NLS-1$
		addModelFileExtension("orders"); //$NON-NLS-1$
	}
}

Back to the top