use of net.heartsome.cat.ts.tb.importer.extension.ITbImporter in project translationstudio8 by heartsome.
the class TbImporter method runExtension.
/**
* 加载记忆库匹配实现 ;
*/
private void runExtension() {
IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(TERMIMPORT_EXTENSION_ID);
try {
for (IConfigurationElement e : config) {
final Object o = e.createExecutableExtension("class");
if (o instanceof ITbImporter) {
ISafeRunnable runnable = new ISafeRunnable() {
public void handleException(Throwable exception) {
logger.error(Messages.getString("importer.TbImporter.logger1"), exception);
}
public void run() throws Exception {
tbImporter = (ITbImporter) o;
}
};
SafeRunner.run(runnable);
}
}
} catch (CoreException ex) {
logger.error(Messages.getString("importer.TbImporter.logger1"), ex);
}
}
Aggregations