Tabnine Logo
IToc
Code IndexAdd Tabnine to your IDE (free)

How to use
IToc
in
org.eclipse.help

Best Java code snippets using org.eclipse.help.IToc (Showing top 12 results out of 315)

origin: org.eclipse.platform/org.eclipse.help

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());
}
origin: org.eclipse/org.eclipse.help.ui

private boolean isNotEmpty(IToc toc) {
  ITopic[] topics = toc.getTopics();
  return isNotEmpty(topics);
}
origin: org.eclipse/org.eclipse.help.ui

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;
}
origin: org.eclipse.platform/org.eclipse.help

private Map<String, String> createNameIdMap(Map<String, Object> categorized) {
  Map<String, String> map = new HashMap<>();
  for (Iterator<String> iter = categorized.keySet().iterator(); iter.hasNext();) {
    String key = iter.next();
    Object value = categorized.get(key);
    ITocContribution toc;
    if (value instanceof TocCategory) {
      TocCategory category = (TocCategory)value;
      toc = category.get(0);
    } else {
      toc = (ITocContribution)value;
    }
    map.put(key, toc.getToc().getLabel());
  }
  return map;
}
origin: org.eclipse/org.eclipse.help.ui

  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;
  }
}
origin: org.eclipse/org.eclipse.help.ui

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);
    }
  }
}
origin: org.eclipse.platform/org.eclipse.help

for (int i=0;i<srcContributions.length;++i) {
  process(srcContributions[i]);
  IUAElement[] children = srcContributions[i].getToc().getChildren();
  for (int j=0;j<children.length;++j) {
    parent.insertBefore((UAElement)children[j], anchor);
origin: org.eclipse.platform/org.eclipse.help

} else {
  String tocLabel = toc.getToc().getLabel();
  boolean done = false;
  for (int next = 0; next < category.size() && !done; next++ ) {
    String nextName = category.get(next).getToc().getLabel();
    if (tocLabel.compareToIgnoreCase(nextName) < 0) {
      done = true;
origin: org.eclipse/org.eclipse.help.ui

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;
    }
  }
}

origin: org.eclipse.platform/org.eclipse.help

  @Override
  public short handle(UAElement element, String id) {
    if (element instanceof Link) {
      Link link = (Link)element;
      UAElement parent = link.getParentElement();
      if (parent != null) {
        String toc = link.getToc();
        if (toc != null) {
          TocContribution destContribution = getContribution(id);
          TocContribution srcContribution = getContribution(HrefUtil.normalizeHref(destContribution.getContributorId(), toc));
          if (srcContribution != null) {
            process(srcContribution);
            IUAElement[] children = srcContribution.getToc().getChildren();
            for (int i=0;i<children.length;++i) {
              parent.insertBefore((UAElement)children[i], link);
            }
            addExtraDocuments(destContribution, srcContribution.getExtraDocuments());
          }
          parent.removeChild(link);
        }
      }
      return HANDLED_SKIP;
    }
    return UNHANDLED;
  }
}
origin: org.eclipse/org.eclipse.help.ui

if (hit.getToc()!=null && !Platform.getWS().equals(Platform.WS_GTK)) {
  buff.append(" alt=\""); //$NON-NLS-1$
  buff.append(parent.escapeSpecialChars(hit.getToc().getLabel()));
  buff.append("\""); //$NON-NLS-1$
origin: org.eclipse/org.eclipse.help.ui

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];
}
org.eclipse.helpIToc

Javadoc

An IToc represents the root node of a toc, for either a complete toc (book) or a part of one to be assembled into a larger one.

Most used methods

  • getHref
  • getLabel
  • getTopic
    Returns a topic with the specified href defined by this TOC. If the TOC contains multiple topics wi
  • getChildren
  • getTopics
    Obtains the topics directly contained by a toc.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • BoxLayout (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now