X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormats.java;h=b0d5d172f61cf71c0bb8048ae37ef08fa0928076;hb=d043ce47fc710d3eb2629ba926a8a7417bd67d8c;hp=b7dd83475a46b42ee0c4914b0d6944a10b8d5a37;hpb=04c8f7bff663aa469127e9eed4164e02933782f1;p=jalview.git diff --git a/src/jalview/io/FileFormats.java b/src/jalview/io/FileFormats.java index b7dd834..b0d5d17 100644 --- a/src/jalview/io/FileFormats.java +++ b/src/jalview/io/FileFormats.java @@ -29,6 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Set; +import jalview.bin.ApplicationSingletonProvider; +import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI; + /** * A singleton registry of alignment file formats known to Jalview. On startup, * the 'built-in' formats are added (from the FileFormat enum). Additional @@ -38,23 +41,11 @@ import java.util.Set; * @author gmcarstairs * */ -public class FileFormats +public class FileFormats implements ApplicationSingletonI { - private static FileFormats instance = new FileFormats(); - - /* - * A lookup map of file formats by upper-cased name - */ - private static Map formats; - - /* - * Formats in this set are capable of being identified by IdentifyFile - */ - private static Set identifiable; - public static FileFormats getInstance() { - return instance; + return (FileFormats) ApplicationSingletonProvider.getInstance(FileFormats.class); } /** @@ -65,6 +56,17 @@ public class FileFormats reset(); } + /* + * A lookup map of file formats by upper-cased name + */ + private Map formats; + + /* + * Formats in this set are capable of being identified by IdentifyFile + */ + private Set identifiable; + + /** * Reset to just the built-in file formats packaged with Jalview. These are * added (and will be shown in menus) in the order of their declaration in the