/** @deprecated */ @Deprecated @Override public IToc[] getTocs() { // non-UI method - forward to HelpSystem return HelpSystem.getTocs(); }
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 Object[] getChildren(Object parentElement) { if (parentElement == AllTopicsPart.this) return HelpSystem.getTocs(); if (parentElement instanceof IToc) return ((IToc) parentElement).getTopics(); if (parentElement instanceof ITopic) return ((ITopic) parentElement).getSubtopics(); return new Object[0]; }
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; } } }
void doCategoryLink(String href) { parent.showPage(IHelpUIConstants.HV_ALL_TOPICS_PAGE); AllTopicsPart part = (AllTopicsPart) parent .findPart(IHelpUIConstants.HV_TOPIC_TREE); if (part != null) { IToc[] tocs = HelpSystem.getTocs(); IHelpResource target = null; for (int i = 0; i < tocs.length; i++) { if (tocs[i].getHref().equals(href)) target = tocs[i]; } if (target != null) { part.selectReveal(target); } } }