Exemplo n.º 1
0
 protected Object getFullFolder(Project project, ERepositoryObjectType itemType, String path)
     throws PersistenceException {
   Object folder = getFolder(project, itemType);
   if (folder == null) {
     return null;
   }
   Object fullFolder;
   if (folder instanceof IFolder) {
     fullFolder = getFolder(project, itemType);
     if (path != null && !"".equals(path)) { // $NON-NLS-1$
       fullFolder = ((IFolder) fullFolder).getFolder(new Path(path));
     }
   } else {
     // FolderItem
     if (path != null && !"".equals(path)) { // $NON-NLS-1$
       // MOD mzhao feature 9207
       if (folder == null) {
         fullFolder = ResourceUtils.getProject(project).getFolder(new Path(path));
       } else {
         fullFolder =
             this.getFolderHelper(project.getEmfProject())
                 .getFolder(
                     ((FolderItem) folder).getProperty().getLabel() + "/" + path); // $NON-NLS-1$
       }
     } else {
       fullFolder = folder;
     }
   }
   return fullFolder;
 }
Exemplo n.º 2
0
  @Override
  public RootContainer<String, IRepositoryViewObject> getRoutineFromProject(Project project)
      throws PersistenceException {
    RootContainer<String, IRepositoryViewObject> toReturn =
        new RootContainer<String, IRepositoryViewObject>();
    ERepositoryObjectType type = ERepositoryObjectType.ROUTINES;
    if (type != null) {
      IProject fsProject = ResourceUtils.getProject(project);

      IFolder objectFolder =
          ResourceUtils.getFolder(fsProject, ERepositoryObjectType.getFolderName(type), true);

      addFolderMembers(project, type, toReturn, objectFolder, true);
      saveProject(project);
    }
    return toReturn;
  }