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 /** 14 * An <code>AbstractContextProvider</code> is a mechanism to provide arbitrary 15 * context-sensitive help for any part of the UI. <code>AbstractContextProvider 16 * </code>s must be registered via the <code>org.eclipse.help.contexts</code> 17 * extension point. 18 * 19 * @since 3.3 20 */ 21 public abstract class AbstractContextProvider { 22 23 /** 24 * Returns the context-sensitive help content for the UI element with the 25 * given context help ID, and for the given locale. 26 * 27 * @param id the unique context help ID, e.g. "org.my.plugin.my_context_id" 28 * @return the context help, or <code>null</code> if not available 29 */ 30 public abstract IContext getContext(String id, String locale); 31 32 /** 33 * Returns an array of <code>String</code>s containing the ids of the 34 * UI plug-ins for which this provider should be used. This is equivalent to 35 * the <code>plugin</code> attribute of the <code>contexts</code> element 36 * of the <code>org.eclipse.help.contexts</code> extension point, except you 37 * can specify any number of plug-ins. 38 * 39 * @return the UI plug-ins for which this provider should be used 40 */ 41 public abstract String[] getPlugins(); 42 } 43