parsingError("helpset.subHelpSetTrouble", spec);
/** * A title is found */ public void processTitle(HelpSet hs, String value) { String title = hs.getTitle(); if ((title != null) && !title.equals("")) { parsingWarning("helpset.wrongTitle", value, title); } hs.setTitle(value); }
@Override public void processView(HelpSet hs, String name, String label, String type, Hashtable viewAttributes, String data, Hashtable dataAttributes, Locale locale) { if (name.equals("Search")) { // check if a search engine can be created, this means the search index is available try { // just for checking if it can be created QueryEngine qe = new QueryEngine(data, hs.getHelpSetURL()); } catch (Exception exception) { String message = String.format("Help set [%s] of module [%s] has no or bad search index. Search view removed.", helpSetPath, moduleName); logger.log(Level.SEVERE, message, ""); return; } } super.processView(hs, name, label, type, viewAttributes, data, dataAttributes, locale); } }
parsingError("helpset.malformedURL", spec); } catch (IOException ee) { parsingError("helpset.incorrectURL", spec); } catch (Exception ex) {
/** * Creates a HelpSet. The locale for the data is either that indicated in * the <tt>lang</tt> attribute of the <tt>helpset</tt> tag, or * <tt>Locale.getDefault()</tt> if the <tt>lang</tt> attribute is not present. * * @param loader The class loader to use to locate any classes * required by the navigators in the Helpset * If loader is null, the default ClassLoader is used. * @param helpset The URL to the HelpSet "file" * * @exception HelpSetException if there are problems parsing the helpset */ public HelpSet(ClassLoader loader, URL helpset) throws HelpSetException { this(loader); this.helpset = helpset; // so it can be used in parseInto() HelpSetFactory factory = new DefaultHelpSetFactory(); parseInto(helpset, factory); HelpSet x = factory.parsingEnded(this); // use the error reporting if (x == null) { // We had trouble parsing // May need to revisit this... throw new HelpSetException("Could not parse\n"+errorMsg); } }
/** * Process a DOCTYPE * @param publicID the document. If null or is not valid a parsingError * will be generated. */ public void processDOCTYPE(String root, String publicID, String systemID) { if (publicID == null || (publicID.compareTo(publicIDString) != 0 && publicID.compareTo(publicIDString_V2) != 0)) { parsingError("helpset.wrongPublicID", publicID); } }
/** * A HomeID is found. */ public void processHomeID(HelpSet hs, String value) { ID homeID = hs.getHomeID(); if ((homeID == null) || homeID.equals("")) { //parsingError("helpset.wrongHomeID", value, homeID.id); hs.setHomeID(value); }else{ parsingError("helpset.wrongHomeID", value, homeID.id); } }
private void parsingError(String key) { String s = HelpUtilities.getText(key); reportMessage(s, false); // tree will be wrong }
/** * @throws Error if key is invalid. */ private void parsingError(String key, String s1, String s2) { String msg = HelpUtilities.getText(key, s1, s2); reportMessage(msg, false); // tree will be wrong }
/** * @throws Error if key is invalid. */ private void parsingError(String key, String s) { String msg = HelpUtilities.getText(key, s); reportMessage(msg, false); // tree will be wrong }
private void parsingWarning(String key, String s1, String s2) { String msg = HelpUtilities.getText(key, s1, s2); reportMessage(msg, true); // warning only }