本文整理汇总了Java中org.eclipse.help.HelpSystem类的典型用法代码示例。如果您正苦于以下问题:Java HelpSystem类的具体用法?Java HelpSystem怎么用?Java HelpSystem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HelpSystem类属于org.eclipse.help包,在下文中一共展示了HelpSystem类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getHelpUrl
import org.eclipse.help.HelpSystem; //导入依赖的package包/类
public static String getHelpUrl(String contextId) {
if (contextId != null) {
if (contextId.lastIndexOf(Constants.DOT) == -1) {
contextId = Constants.DOCUMENTATION_PLUGIN_PREFIX + Constants.DOT + contextId;
}
IContext c = HelpSystem.getContext(contextId);
if (c != null) {
IHelpResource[] topics = c.getRelatedTopics();
if (!Utils.isEmpty(topics)) {
return topics[0].getHref();
}
}
}
return null;
}
示例2: getContext
import org.eclipse.help.HelpSystem; //导入依赖的package包/类
public IContext getContext(Object target) {
IContext context= HelpSystem.getContext(fId);
if (fSelected != null && fSelected.length > 0) {
try {
context= new JavadocHelpContext(context, fSelected);
} catch (JavaModelException e) {
// since we are updating the UI with async exec it
// can happen that the element doesn't exist anymore
// but we are still showing it in the user interface
if (!e.isDoesNotExist())
JavaPlugin.log(e);
}
}
return context;
}
示例3: displayHelp
import org.eclipse.help.HelpSystem; //导入依赖的package包/类
public static void displayHelp(String contextId, Object[] selected) throws CoreException {
IContext context= HelpSystem.getContext(contextId);
if (context != null) {
if (selected != null && selected.length > 0) {
context= new JavadocHelpContext(context, selected);
}
PlatformUI.getWorkbench().getHelpSystem().displayHelp(context);
}
}
示例4: getContext
import org.eclipse.help.HelpSystem; //导入依赖的package包/类
@Override
public IContext getContext(Object target) {
return HelpSystem.getContext(id);
}
示例5: setMode
import org.eclipse.help.HelpSystem; //导入依赖的package包/类
public static void setMode(int mode) {
getInstance().mode = mode;
HelpSystem.setShared(mode == MODE_INFOCENTER);
}