Пример #1
0
 private String tranCH2En(String[] urls, IARESProject project) throws Exception {
   StringBuffer sb = new StringBuffer();
   IARESModuleRoot root = project.getModuleRoot(getModuleRootByCHName(urls[0], project));
   if (root != null) {
     for (int i = 1; i < urls.length; i++) {
       for (IARESModule module : root.getModules()) {
         IARESResource property = module.getARESResource(IARESModule.MODULE_PROPERTY_FILE);
         if (property != null && property.exists()) {
           try {
             ModuleProperty info = property.getInfo(ModuleProperty.class);
             if (info != null) {
               Object obj = info.getValue(ICommonModel.CNAME);
               if (obj != null) {
                 if (StringUtils.equals(urls[i], obj.toString())) {
                   sb.append("/");
                   sb.append(module.getShortName());
                   break;
                 }
               }
             }
           } catch (Exception e) {
             e.printStackTrace();
           }
         }
       }
     }
     for (String enname : urls) {
       root.getModule(enname);
     }
   }
   return sb.toString();
 }
Пример #2
0
 /* (non-Javadoc)
  * @see com.hundsun.ares.studio.core.IARESModule#getNoneARESFiles()
  */
 public IFile[] getNonARESFiles() {
   List<IFile> result = new ArrayList<IFile>();
   IFolder folder = (IFolder) getResource();
   try {
     for (IResource res : folder.members()) {
       if (res.getType() == IResource.FILE) {
         IFile file = (IFile) res;
         IARESResource ares = getARESResource(file);
         if (ares == null || !ares.exists()) result.add((IFile) res);
       }
     }
   } catch (CoreException e) {
     e.printStackTrace();
   }
   return result.toArray(new IFile[0]);
 }