use of net.heartsome.cat.converter.util.ConverterBean in project translationstudio8 by heartsome.
the class FileFormatUtils method getExtensions.
/**
* 得到转换器支持的所有文件类型的拓展名
* @return ;
*/
public static String[] getExtensions() {
List<ConverterBean> list = MODEL.getSupportTypes();
checkAutomaticOO(list);
ArrayList<String> FileFormats = new ArrayList<String>();
for (ConverterBean bean : list) {
String[] extensions = bean.getExtensions();
for (String extension : extensions) {
FileFormats.add(extension);
}
}
return FileFormats.toArray(new String[] {});
}
use of net.heartsome.cat.converter.util.ConverterBean in project translationstudio8 by heartsome.
the class FileFormatUtils method checkAutomaticOO.
/**
* 检查是否启用 Open Office
*/
private static void checkAutomaticOO(List<ConverterBean> list) {
IPreferencesService service = Platform.getPreferencesService();
String qualifier = Activator.getDefault().getBundle().getSymbolicName();
boolean automaticOO = service.getBoolean(qualifier, IPreferenceConstants.AUTOMATIC_OO, false, null);
if (!automaticOO) {
list.remove(new ConverterBean("MS Office Document to XLIFF Conveter", null));
}
}
Aggregations