private IHelpResource getHelpResource() { StringTokenizer tok = new StringTokenizer(path, "_"); //$NON-NLS-1$ int index = Integer.parseInt(tok.nextToken()); IToc[] tocs = HelpSystem.getTocs(); IToc toc = tocs[index]; if (tok.hasMoreTokens()) { ITopic topic = toc.getTopic(null); while (tok.hasMoreTokens()) { index = Integer.parseInt(tok.nextToken()); topic = topic.getSubtopics()[index]; } return topic; } return toc; } }
public void selectReveal(String href) { IToc[] tocs = HelpSystem.getTocs(); for (int i = 0; i < tocs.length; i++) { IToc toc = tocs[i]; ITopic topic = toc.getTopic(href); if (topic != null) { selectReveal(topic); return; } } }
private String getTopicCategory(String href, String locale) { IToc[] tocs = HelpPlugin.getTocManager().getTocs(locale); for (int i = 0; i < tocs.length; i++) { ITopic topic = tocs[i].getTopic(href); if (topic != null) return tocs[i].getLabel(); } return null; }
public Toc(IToc src) { super(NAME, src); setHref(src.getHref()); setLabel(src.getLabel()); ITopic topic = src.getTopic(null); if (topic != null) { setTopic(topic.getHref()); } appendChildren(src.getChildren()); }