public void actionEditFile()
   {
      // use the environment?
      if (!Joculus.settings.editor_use_env)
      {
         // use the user-specified editor (if it was specified).
         File f = new File(Joculus.settings.editor_path);
         if (!f.exists() || !f.canExecute())
         {
            Joculus.showError(UIStrings.ERROR_NO_TEXT_EDITOR);
            return;
         }
         else
         {
            if (Joculus.os_type == Joculus.OSType.OS_MacOSX)
            {
               String[] cmdarray = new String[]
               {
                  "/usr/bin/open", "-a", Joculus.settings.editor_path, app_instance.cur_file.getAbsolutePath()
               };
               try
               {
                  Runtime.getRuntime().exec(cmdarray);
               }
               catch (IOException ex)
               {
                  Joculus.showError(ex.getMessage());
               }
            }
         }
      }
      else if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.EDIT))
      {
         // try using the system-defined editor to edit the file.
         try
         {
            Desktop.getDesktop().edit(app_instance.cur_file);
         }
         catch (IOException exc)
         {
            Joculus.showError(exc.getMessage());
         }
      }
   }