1 /******************************************************************************* 2 * Copyright (c) 2006, 2007 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; 12 13 import org.eclipse.help.internal.HelpPlugin; 14 15 /** 16 * An <code>AbstractIndexProvider</code> is a mechanism to provide arbitrary 17 * content to the keyword index. <code>AbstractIndexProvider</code>s must be 18 * registered via the <code>org.eclipse.help.index</code> extension point. 19 * 20 * @since 3.3 21 */ 22 public abstract class AbstractIndexProvider { 23 24 /** 25 * Returns all index contributions for this provider. Providers 26 * are free to provide any number of contributions (zero or more). 27 * 28 * @param locale the locale for which to get contributions 29 * @return all the index contributions for this provider 30 */ 31 public abstract IIndexContribution[] getIndexContributions(String locale); 32 33 /** 34 * Notifies the platform that the content managed by this provider may 35 * have changed since the last time <code>getIndexContributions()</code> 36 * was called, and needs to be updated. 37 */ 38 protected void contentChanged() { 39 // will force a reload next time around 40 HelpPlugin.getIndexManager().clearCache(); 41 } 42 } 43