JAL-653 JAL-1968 FeaturesFile now handles Jalview or GFF2 or GFF3
[jalview.git] / src / jalview / bin / JalviewLite.java
index 3d59a12..ae84ba5 100644 (file)
@@ -850,7 +850,7 @@ public class JalviewLite extends Applet implements
   {
     AlignmentI al = null;
 
-    String format = new IdentifyFile().Identify(text,
+    String format = new IdentifyFile().identify(text,
             AppletFormatAdapter.PASTE);
     try
     {
@@ -1967,7 +1967,7 @@ public class JalviewLite extends Applet implements
         return null;
       }
       String resolvedFile = resolveFileProtocol(fileParam);
-      String format = new IdentifyFile().Identify(resolvedFile, protocol);
+      String format = new IdentifyFile().identify(resolvedFile, protocol);
       dbgMsg("File identified as '" + format + "'");
       AlignmentI al = null;
       try
@@ -2404,8 +2404,7 @@ public class JalviewLite extends Applet implements
         return rtn;
       } catch (Exception ex)
       {
-        System.out.println("Exception checking resources: " + f + " "
-                + ex);
+        System.out.println("Exception checking resources: " + f + " " + ex);
         return false;
       }
     }
@@ -2860,6 +2859,15 @@ public class JalviewLite extends Applet implements
           URL localref)
   {
     String resolvedPath = "";
+    if (targetPath.startsWith("/"))
+    {
+      String codebase = localref.toString();
+      String localfile = localref.getFile();
+      resolvedPath = codebase.substring(0,
+              codebase.length() - localfile.length())
+              + targetPath;
+      return resolvedPath;
+    }
 
     /*
      * get URL path and strip off any trailing file e.g.