1 /******************************************************************************* 2 * Copyright (c) 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 /** 14 * Extends <code>IContext</code> to provide support for styled text and topic 15 * categorization. 16 * 17 * @since 3.1 18 */ 19 20 public interface IContext2 extends IContext { 21 /** 22 * Returns the optional title for this context. If the title is specified, 23 * it will be used for the presentation of this context. Otherwise, a 24 * default title will be used. 25 * 26 * @return the title to use for this context or <code>null</code> to use 27 * the default title. 28 */ 29 public String getTitle(); 30 31 /** 32 * Returns the text description for this context with bold markers. The 33 * markers are used to allow the UI to distinguish between bold markup and 34 * bold tags that are intended to remain part of the original text. 35 * 36 * @return String with <@#$b>and </@#$b> to mark bold range (as 37 * IContext.getText() used to in 2.x) 38 */ 39 public String getStyledText(); 40 41 /** 42 * Returns the category of the provided topic. The category will be used in 43 * the UI to render all the topics that belong to the same category grouped 44 * together. The category string is expected to be NL-ready i.e. presentable 45 * in all NL locales. 46 * 47 * @param topic 48 * the topic to be categorized 49 * @return the presentable name of the category that the topic belongs to, 50 * or <code>null</code> if the topic belongs to the default 51 * category. 52 */ 53 public String getCategory(IHelpResource topic); 54 }