JAL-3599 gradle tasks to test JalviewJS launches in a chrome or chromium browser
[jalview.git] / src / jalview / gui / Desktop.java
index bfd700f..2dfe820 100644 (file)
@@ -623,6 +623,12 @@ public class Desktop extends jalview.jbgui.GDesktop
       }
     });
     desktop.addMouseListener(ma);
+
+    if (Platform.isJS())
+    {
+      // used for jalviewjsTest
+      jalview.bin.Console.info("JALVIEWJS: CREATED DESKTOP");
+    }
   }
 
   /**
@@ -3132,10 +3138,14 @@ public class Desktop extends jalview.jbgui.GDesktop
     String title = "View of desktop";
     ImageExporter exporter = new ImageExporter(writer, null, TYPE.EPS,
             title);
-    try {
+    try
+    {
       exporter.doExport(of, this, width, height, title);
-    } catch (ImageOutputException ioex) {
-      jalview.bin.Console.error("Unexpected error whilst writing Jalview desktop snapshot as EPS",ioex);
+    } catch (ImageOutputException ioex)
+    {
+      jalview.bin.Console.error(
+              "Unexpected error whilst writing Jalview desktop snapshot as EPS",
+              ioex);
     }
   }
 
@@ -3582,7 +3592,8 @@ public class Desktop extends jalview.jbgui.GDesktop
    */
   public static void closeDesktop()
   {
-    if (Desktop.instance != null) {
+    if (Desktop.instance != null)
+    {
       Desktop.instance.closeAll_actionPerformed(null);
       Desktop.instance.setVisible(false);
       Desktop.instance.dispose();