/** * Try to find an id in a toolbox * * @param tbxName the toolbox's name * @param id the id to find * @return the URL corresponding to the id */ public URL getURLFromID(String tbxName, String id) { if (tbxName == null) { return getURLFromID(id); } URL url = null; try { for (HelpSet hs : helpSets) { if (hs.getHelpSetURL().toString().replaceAll("\\\\", "/").contains("/" + tbxName + "/")) { javax.help.Map map = hs.getLocalMap(); if (map.isValidID(id, hs)) { url = map.getURLFromID(javax.help.Map.ID.create(id, hs)); if (url != null) { return url; } } } } url = new URL( helpSets .get(0) .getHelpSetURL() .toString() .replace("jhelpset.hs", "ScilabErrorPage.html")); } catch (MalformedURLException ex) { } return url; }