import jalview.api.ComplexAlignFile;
import jalview.api.FeaturesDisplayedI;
+import jalview.bin.Cache;
+import jalview.bin.Jalview;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.PDBEntry;
String type = protocol.equals(FormatAdapter.FILE) ? "RECENT_FILE"
: "RECENT_URL";
- String historyItems = jalview.bin.Cache.getProperty(type);
+ String historyItems = Cache.getProperty(type);
StringTokenizer st;
newHistory.append(recent.elementAt(i));
}
- jalview.bin.Cache.setProperty(type, newHistory.toString());
+ Cache.setProperty(type, newHistory.toString());
if (protocol.equals(FormatAdapter.FILE))
{
- jalview.bin.Cache.setProperty("DEFAULT_FILE_FORMAT", format);
+ Cache.setProperty("DEFAULT_FILE_FORMAT", format);
}
}
{
format = new IdentifyFile().Identify(file, protocol);
}
+
+ }
+
+ if (format == null || format.equalsIgnoreCase("EMPTY DATA FILE"))
+ {
+ Desktop.instance.stopLoading();
+ System.err.println("The input file \"" + file
+ + "\" has no data content!");
+ if (!Jalview.isHeadlessMode())
+ {
+ JOptionPane.showMessageDialog(null, "The input file \""
+ + file + "\" has no data content!", "Empty data file",
+ JOptionPane.ERROR_MESSAGE);
+ }
+ return;
}
// TODO: cache any stream datasources as a temporary file (eg. PDBs
// retrieved via URL)
try
{
- alignFrame.setMaximum(jalview.bin.Cache.getDefault(
+ alignFrame.setMaximum(Cache.getDefault(
"SHOW_FULLSCREEN", false));
} catch (java.beans.PropertyVetoException ex)
{