Exemplo n.º 1
0
 public void actionPerformed(ActionEvent e) {
   String url = getUrl();
   if (url == null) return;
   if (!url.startsWith(HelpUtil.getWikiBaseHelpUrl())) {
     String message =
         tr(
             "<html>The current URL <tt>{0}</tt><br>"
                 + "is an external URL. Editing is only possible for help topics<br>"
                 + "on the help server <tt>{1}</tt>.</html>",
             getUrl(), HelpUtil.getWikiBaseUrl());
     JOptionPane.showMessageDialog(
         Main.parent, message, tr("Warning"), JOptionPane.WARNING_MESSAGE);
     return;
   }
   url = url.replaceAll("#[^#]*$", "");
   OpenBrowser.displayUrl(url + "?action=edit");
 }
Exemplo n.º 2
0
 /** Constructs a new {@code HelpBrowser}. */
 public HelpBrowser() {
   reader = new HelpContentReader(HelpUtil.getWikiBaseUrl());
   build();
 }