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; 12 /** 13 * A context registered for context-sensitive help. 14 * <p> 15 * This interface models the context-sensitive help that can be associated with 16 * SWT menus, menu items, and controls, and with JFace actions. A help context 17 * provides the text description of the object with which it is associated with, 18 * as well as topic links that contain more related information. This 19 * information would be displayed to the user when context sensitive help (F1) 20 * is requested. 21 * </p> 22 * <p> 23 * In the current implementation of the Help system, valid contexts can be 24 * contributed through the <code>contexts</code> element of the 25 * <code>"org.eclipse.help.contexts"</code> extension point. The 26 * <code>IHelp.findContext(String)</code> method is used at runtime to create 27 * or fetch IContext objects using there fully qualified contextIds. If there is 28 * a need to override this behavior, then this IContext interface could be 29 * implemented by a client and registered with the SWT control or JFace action. 30 * </p> 31 */ 32 public interface IContext { 33 /** 34 * Returns a list of related topics for this help context. 35 * 36 * @return a list of related help topics or <code>null</code> 37 * if no related topics have been defined for this context. 38 * @since 2.0 39 */ 40 public IHelpResource[] getRelatedTopics(); 41 /** 42 * Returns the text description for this context. 43 * 44 * @return the text description 45 */ 46 public String getText(); 47 } 48