- // TODO: these names should come from the FormatAdapter lists for readable/writable extensions
- alignSuffix.put("amsa", "AMSA file");
- alignSuffix.put("fasta", "Fasta file");
- alignSuffix.put("fa", "Fasta file");
- alignSuffix.put("fastq", "Fasta file");
- alignSuffix.put("mfa", "Fasta file");
- alignSuffix.put("blc", "BLC file");
- alignSuffix.put("msf", "MSF file");
- alignSuffix.put("pfam", "PFAM file");
- alignSuffix.put("aln", "Clustal file");
- alignSuffix.put("pir", "PIR file");
- alignSuffix.put("jar", "Jalview Project file (old)");
- alignSuffix.put("jvp", "Jalview Project file");
- alignSuffix.put("amsa", "AMSA file");
- alignSuffix.put("sto", "Stockholm File");
- alignSuffix.put("stk", "Stockholm File");
- alignSuffix.put("sto", "Stockholm File");
+ extensions = new HashMap<>();
+ for (FileFormatI ff : FileFormats.getInstance().getFormats())
+ {
+ String desc = ff.getName() + " file";
+ String exts = ff.getExtensions();
+ for (String ext : exts.split(","))
+ {
+ ext = ext.trim().toLowerCase(Locale.ROOT);
+ extensions.put(ext,
+ desc + ("jar".equals(ext) ? " (old)" : ""));
+ }
+ }