JAL-1807 explicit imports (jalview.bin)
[jalview.git] / src / jalview / bin / Jalview.java
index f6d0099..8669a96 100755 (executable)
@@ -22,8 +22,17 @@ package jalview.bin;
 
 import jalview.gui.AlignFrame;
 import jalview.gui.Desktop;
+import jalview.gui.PromptUserConfig;
+import jalview.io.AppletFormatAdapter;
 import jalview.io.BioJsHTMLOutput;
+import jalview.io.FileLoader;
+import jalview.io.FormatAdapter;
 import jalview.io.HtmlSvgOutput;
+import jalview.io.IdentifyFile;
+import jalview.io.NewickFile;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.ColourSchemeProperty;
+import jalview.schemes.UserColourScheme;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.ws.jws2.Jws2Discoverer;
@@ -231,7 +240,7 @@ public class Jalview
     }
 
     String file = null, protocol = null, format = null, data = null;
-    jalview.io.FileLoader fileLoader = new jalview.io.FileLoader(!headless);
+    FileLoader fileLoader = new FileLoader(!headless);
     Vector getFeatures = null; // vector of das source nicknames to fetch
     // features from
     // loading is done.
@@ -262,13 +271,13 @@ public class Jalview
       {
         try
         {
-          String viprotocol = jalview.io.AppletFormatAdapter
+          String viprotocol = AppletFormatAdapter
                   .checkProtocol(vamsasImport);
-          if (viprotocol == jalview.io.FormatAdapter.FILE)
+          if (viprotocol == FormatAdapter.FILE)
           {
             inSession = desktop.vamsasImport(new File(vamsasImport));
           }
-          else if (viprotocol == jalview.io.FormatAdapter.URL)
+          else if (viprotocol == FormatAdapter.URL)
           {
             inSession = desktop.vamsasImport(new URL(vamsasImport));
           }
@@ -354,9 +363,9 @@ public class Jalview
         }
       }
 
-      protocol = jalview.io.AppletFormatAdapter.checkProtocol(file);
+      protocol = AppletFormatAdapter.checkProtocol(file);
 
-      format = new jalview.io.IdentifyFile().Identify(file, protocol);
+      format = new IdentifyFile().Identify(file, protocol);
 
       AlignFrame af = fileLoader.LoadFileWaitTillLoaded(file, protocol,
               format);
@@ -372,12 +381,12 @@ public class Jalview
         {
           data.replaceAll("%20", " ");
 
-          jalview.schemes.ColourSchemeI cs = jalview.schemes.ColourSchemeProperty
+          ColourSchemeI cs = ColourSchemeProperty
                   .getColour(af.getViewport().getAlignment(), data);
 
           if (cs == null)
           {
-            jalview.schemes.UserColourScheme ucs = new jalview.schemes.UserColourScheme(
+            UserColourScheme ucs = new UserColourScheme(
                     "white");
             ucs.parseAppletParameter(data);
             cs = ucs;
@@ -392,14 +401,14 @@ public class Jalview
         if (data != null)
         {
           af.parseFeaturesFile(data,
-                  jalview.io.AppletFormatAdapter.checkProtocol(data));
+                  AppletFormatAdapter.checkProtocol(data));
           System.out.println("Added " + data);
         }
         data = aparser.getValue("features", true);
         if (data != null)
         {
           af.parseFeaturesFile(data,
-                  jalview.io.AppletFormatAdapter.checkProtocol(data));
+                  AppletFormatAdapter.checkProtocol(data));
           System.out.println("Added " + data);
         }
 
@@ -425,11 +434,11 @@ public class Jalview
         data = aparser.getValue("tree", true);
         if (data != null)
         {
-          jalview.io.NewickFile fin = null;
+          NewickFile fin = null;
           try
           {
-            fin = new jalview.io.NewickFile(data,
-                    jalview.io.AppletFormatAdapter.checkProtocol(data));
+            fin = new NewickFile(data,
+                    AppletFormatAdapter.checkProtocol(data));
             if (fin != null)
             {
               af.getViewport().setCurrentTree(
@@ -470,7 +479,7 @@ public class Jalview
         {
           // Execute the groovy script after we've done all the rendering stuff
           // and before any images or figures are generated.
-          if (jalview.bin.Cache.groovyJarsPresent())
+          if (Cache.groovyJarsPresent())
           {
             System.out.println("Executing script " + groovyscript);
             executeGroovyScript(groovyscript, new Object[]
@@ -553,11 +562,11 @@ public class Jalview
     // ////////////////////
 
     if (!headless && file == null && vamsasImport == null
-            && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true))
+            && Cache.getDefault("SHOW_STARTUP_FILE", true))
     {
-      file = jalview.bin.Cache.getDefault(
+      file = Cache.getDefault(
               "STARTUP_FILE",
-              jalview.bin.Cache.getDefault("www.jalview.org",
+              Cache.getDefault("www.jalview.org",
                       "http://www.jalview.org")
                       + "/examples/exampleFile_2_7.jar");
       if (file.equals("http://www.jalview.org/examples/exampleFile_2_3.jar"))
@@ -565,7 +574,7 @@ public class Jalview
         // hardwire upgrade of the startup file
         file.replace("_2_3.jar", "_2_7.jar");
         // and remove the stale setting
-        jalview.bin.Cache.removeProperty("STARTUP_FILE");
+        Cache.removeProperty("STARTUP_FILE");
       }
 
       protocol = "File";
@@ -581,7 +590,7 @@ public class Jalview
       }
       else
       {
-        format = new jalview.io.IdentifyFile().Identify(file, protocol);
+        format = new IdentifyFile().Identify(file, protocol);
       }
 
       startUpAlframe = fileLoader.LoadFileWaitTillLoaded(file, protocol,
@@ -603,7 +612,7 @@ public class Jalview
     // Once all other stuff is done, execute any groovy scripts (in order)
     if (groovyscript != null)
     {
-      if (jalview.bin.Cache.groovyJarsPresent())
+      if (Cache.groovyJarsPresent())
       {
         System.out.println("Executing script " + groovyscript);
         executeGroovyScript(groovyscript, new Object[]
@@ -673,7 +682,7 @@ public class Jalview
     /**
      * start a User Config prompt asking if we can log usage statistics.
      */
-    jalview.gui.PromptUserConfig prompter = new jalview.gui.PromptUserConfig(
+    PromptUserConfig prompter = new PromptUserConfig(
             desktop.desktop,
             "USAGESTATS",
             "Jalview Usage Statistics",