git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1705 AlignmentUtils method renamed
[jalview.git]
/
src
/
jalview
/
gui
/
Desktop.java
diff --git
a/src/jalview/gui/Desktop.java
b/src/jalview/gui/Desktop.java
index
c957444
..
a10ec4e
100644
(file)
--- a/
src/jalview/gui/Desktop.java
+++ b/
src/jalview/gui/Desktop.java
@@
-23,6
+23,7
@@
package jalview.gui;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.bin.Cache;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.bin.Cache;
+import jalview.bin.Jalview;
import jalview.io.FileLoader;
import jalview.io.FormatAdapter;
import jalview.io.IdentifyFile;
import jalview.io.FileLoader;
import jalview.io.FormatAdapter;
import jalview.io.IdentifyFile;
@@
-630,7
+631,7
@@
public class Desktop extends jalview.jbgui.GDesktop implements
String file = (String) contents
.getTransferData(DataFlavor.stringFlavor);
String file = (String) contents
.getTransferData(DataFlavor.stringFlavor);
- String format = new IdentifyFile().Identify(file,
+ String format = new IdentifyFile().identify(file,
FormatAdapter.PASTE);
new FileLoader().LoadFile(file, FormatAdapter.PASTE, format);
FormatAdapter.PASTE);
new FileLoader().LoadFile(file, FormatAdapter.PASTE, format);
@@
-976,7
+977,7
@@
public class Desktop extends jalview.jbgui.GDesktop implements
}
else
{
}
else
{
- format = new IdentifyFile().Identify(file, protocol);
+ format = new IdentifyFile().identify(file, protocol);
}
new FileLoader().LoadFile(file, protocol, format);
}
new FileLoader().LoadFile(file, protocol, format);
@@
-1027,7
+1028,7
@@
public class Desktop extends jalview.jbgui.GDesktop implements
}
else
{
}
else
{
- format = new IdentifyFile().Identify(choice, FormatAdapter.FILE);
+ format = new IdentifyFile().identify(choice, FormatAdapter.FILE);
}
if (viewport != null)
}
if (viewport != null)
@@
-1110,7
+1111,7
@@
public class Desktop extends jalview.jbgui.GDesktop implements
}
else
{
}
else
{
- String format = new IdentifyFile().Identify(url, FormatAdapter.URL);
+ String format = new IdentifyFile().identify(url, FormatAdapter.URL);
if (format.equals("URL NOT FOUND"))
{
if (format.equals("URL NOT FOUND"))
{
@@
-2381,6
+2382,12
@@
public class Desktop extends jalview.jbgui.GDesktop implements
*/
public static AlignFrame[] getAlignFrames()
{
*/
public static AlignFrame[] getAlignFrames()
{
+ if (Jalview.isHeadlessMode())
+ {
+ // Desktop.desktop is null in headless mode
+ return new AlignFrame[] { currentAlignFrame };
+ }
+
JInternalFrame[] frames = Desktop.desktop.getAllFrames();
if (frames == null)
JInternalFrame[] frames = Desktop.desktop.getAllFrames();
if (frames == null)