package eg.ui;

import java.io.File;
import java.io.IOException;

import java.net.URI;
import java.net.URISyntaxException;

//--Eadgyth--/
import eg.utils.FileUtils;

/**
 * Opens help and docu sites in the default browser
 */
public class Help {

   /**
    * Shows the help site in the default browser
    */
   public void showHelpSite() {
      try {
         if (java.awt.Desktop.isDesktopSupported()) {
            java.awt.Desktop.getDesktop().browse(new URI(
                  "https://eadgyth.github.io/Programming-Editor/help/help.html"));
         }
      }
      catch (IOException | URISyntaxException e) {
         FileUtils.logStack(e);
      }
   }
   
   /**
    * Shows the Docu site in the default browser
    */
   public void showDocuSite() {
      try {
         if (java.awt.Desktop.isDesktopSupported()) {
            java.awt.Desktop.getDesktop().browse(new URI(
                  "https://eadgyth.github.io/Programming-Editor/"));
         }
      }
      catch (IOException | URISyntaxException e) {
         FileUtils.logStack(e);
      }
   }
}

@@ -9,16 +9,42 @@
 eg.ui;%0A%0A
+import java.awt.Desktop;%0A%0A
 import j
@@ -56,16 +56,16 @@
 o.File;%0A
-
 import j
@@ -383,33 +383,24 @@
         if (
-java.awt.
 Desktop.isDe
@@ -427,33 +427,24 @@
             
-java.awt.
 Desktop.getD
@@ -693,17 +693,17 @@
 ows the 
-D
+d
 ocu site
@@ -790,25 +790,16 @@
     if (
-java.awt.
 Desktop.
@@ -834,25 +834,16 @@
         
-java.awt.
 Desktop.

add methods open help websites