示例#1
0
 /**
  * 执行导入
  *
  * @param tmxContent 符合TMX标准的字符串
  * @param srcLang 源语言
  * @param monitor 进度条,可以为null
  * @return ;
  * @throws ImportException
  */
 public int executeImport(String tmxContent, String srcLang, IProgressMonitor monitor)
     throws ImportException {
   if (tmImporter != null) {
     return tmImporter.executeImport(tmxContent, srcLang, monitor);
   }
   return ITmImporter.IMPORT_STATE_NONE;
 }
示例#2
0
 /** 清除资源,结束当前导入器的生命周期 ; */
 public void clearResources() {
   if (tmImporter != null) {
     tmImporter.clearResources();
   }
   instance = null;
 }
示例#3
0
 public int getContextSize() {
   if (tmImporter != null) {
     return tmImporter.getContextSize();
   }
   return 1;
 }
示例#4
0
 /**
  * 重复设置将不会产生效率问题<br>
  * 设置当前项目,此信息将用于获取项目的配置信息
  *
  * @param project ;
  */
 public void setProject(IProject project) {
   if (tmImporter != null) {
     tmImporter.setProject(project);
   }
 }
示例#5
0
 /**
  * 检查当前导入器是否可用
  *
  * @return true 可用,false不可用
  */
 public boolean checkImporter() {
   if (tmImporter != null && tmImporter.checkImporter()) {
     return true;
   }
   return false;
 }