private static final String TEXT_EDITOR = "scribes";
- private static final String FILE_INDICATOR = "<FILE>";
-
- public static HashMap<String, String[]> extensionToApplication = new HashMap<String, String[]>();
+ private static final String DOCUMENT_EDITOR = "lowriter";
- public FileAssociationManager() {
+ private static final String SPREADSHEET_EDITOR = "localc";
- extensionToApplication.put("txt", new String[] { TEXT_EDITOR, FILE_INDICATOR });
- extensionToApplication.put("xml", new String[] { TEXT_EDITOR, FILE_INDICATOR });
- extensionToApplication.put("properties", new String[] { TEXT_EDITOR, FILE_INDICATOR });
- extensionToApplication.put("ini", new String[] { TEXT_EDITOR, FILE_INDICATOR });
- extensionToApplication.put("", new String[] { TEXT_EDITOR, FILE_INDICATOR });
-
- extensionToApplication.put("jpg", new String[] { "eog", FILE_INDICATOR });
- extensionToApplication.put("jpeg", new String[] { "eog", FILE_INDICATOR });
- extensionToApplication.put("png", new String[] { "eog", FILE_INDICATOR });
-
- extensionToApplication.put("pdf", new String[] { "evince", FILE_INDICATOR });
-
- extensionToApplication.put("mp3", new String[] { "banshee", FILE_INDICATOR });
- extensionToApplication.put("ogg", new String[] { "banshee", FILE_INDICATOR });
-
- extensionToApplication.put("avi", new String[] { "vlc", FILE_INDICATOR });
- extensionToApplication.put("mkv", new String[] { "vlc", FILE_INDICATOR });
- extensionToApplication.put("ogv", new String[] { "vlc", FILE_INDICATOR });
- extensionToApplication.put("mp4", new String[] { "vlc", FILE_INDICATOR });
- extensionToApplication.put("flv", new String[] { "vlc", FILE_INDICATOR });
- extensionToApplication.put("wmv", new String[] { "vlc", FILE_INDICATOR });
-
- extensionToApplication.put("ods", new String[] { "localc", FILE_INDICATOR });
- extensionToApplication.put("docx", new String[] { "lowriter", FILE_INDICATOR });
+ private static final String FILE_INDICATOR = "<FILE>";
- }
+ public static HashMap<String, String[]> extensionToApplication = new HashMap<String, String[]>();
public static boolean openFile(final File file) {
}
+ public FileAssociationManager() {
+
+ extensionToApplication.put("txt", new String[] { TEXT_EDITOR, FILE_INDICATOR });
+ extensionToApplication.put("xml", new String[] { TEXT_EDITOR, FILE_INDICATOR });
+ extensionToApplication.put("properties", new String[] { TEXT_EDITOR, FILE_INDICATOR });
+ extensionToApplication.put("ini", new String[] { TEXT_EDITOR, FILE_INDICATOR });
+ extensionToApplication.put("", new String[] { TEXT_EDITOR, FILE_INDICATOR });
+
+ extensionToApplication.put("jpg", new String[] { "eog", FILE_INDICATOR });
+ extensionToApplication.put("jpeg", new String[] { "eog", FILE_INDICATOR });
+ extensionToApplication.put("png", new String[] { "eog", FILE_INDICATOR });
+
+ extensionToApplication.put("pdf", new String[] { "evince", FILE_INDICATOR });
+
+ extensionToApplication.put("mp3", new String[] { "banshee", FILE_INDICATOR });
+ extensionToApplication.put("ogg", new String[] { "banshee", FILE_INDICATOR });
+
+ extensionToApplication.put("avi", new String[] { "vlc", FILE_INDICATOR });
+ extensionToApplication.put("mkv", new String[] { "vlc", FILE_INDICATOR });
+ extensionToApplication.put("ogv", new String[] { "vlc", FILE_INDICATOR });
+ extensionToApplication.put("mp4", new String[] { "vlc", FILE_INDICATOR });
+ extensionToApplication.put("flv", new String[] { "vlc", FILE_INDICATOR });
+ extensionToApplication.put("wmv", new String[] { "vlc", FILE_INDICATOR });
+
+ extensionToApplication.put("ods", new String[] { SPREADSHEET_EDITOR, FILE_INDICATOR });
+ extensionToApplication.put("xls", new String[] { SPREADSHEET_EDITOR, FILE_INDICATOR });
+ extensionToApplication.put("xlsx", new String[] { SPREADSHEET_EDITOR, FILE_INDICATOR });
+
+ extensionToApplication.put("docx", new String[] { DOCUMENT_EDITOR, FILE_INDICATOR });
+ extensionToApplication.put("doc", new String[] { DOCUMENT_EDITOR, FILE_INDICATOR });
+
+ }
+
}