Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IContainer.members()


            return new Object[]{};
        } else if(parentElement instanceof IContainer) {
            ArrayList list = new ArrayList();
            IContainer folder = (IContainer)parentElement;
            try{
                IResource[] resources = folder.members(
                        IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS);
                for (int i = 0; i < resources.length; i++) {
                    IResource r = resources[i];
                    if(r instanceof IFolder || !folderOnly) {
                        list.add(r);
View Full Code Here


    case IResource.FOLDER:
    case IResource.PROJECT:
      // Do not traverse into sub-folders like ".svn"
      if (root || isJavaIdentifier(resource.getName())) {
        final IContainer container = (IContainer) resource;
        for (final IResource child : container.members()) {
          walkResource(child, false);
        }
      }
      break;
    }
View Full Code Here

    case IResource.FOLDER:
    case IResource.PROJECT:
      // Do not traverse into folders like ".svn"
      if (isJavaIdentifier(resource.getName())) {
        final IContainer container = (IContainer) resource;
        for (final IResource child : container.members()) {
          walkResource(child);
        }
      }
      break;
    }
View Full Code Here

    case IResource.FOLDER:
    case IResource.PROJECT:
      // Do not traverse into sub-folders like ".svn"
      if (root || isJavaIdentifier(resource.getName())) {
        final IContainer container = (IContainer) resource;
        for (final IResource child : container.members()) {
          walkResource(child, false);
        }
      }
      break;
    }
View Full Code Here

    HashSet<IFile> result = new HashSet<IFile>();
   
    if (res instanceof IContainer) {
      IContainer c = (IContainer) res;
     
      for (IResource r : c.members()) {
        result.addAll(findTargetModels(r));
      }
    }
   
    if (res instanceof IFile) {
View Full Code Here

    if(relative.length() > 0) folders.add( relative );   
   
    m_transfer.setSubTask(Transfer.STASK_SCANNING, new String[] { relative });
   
    try{
      IResource r[] = c.members();
      //System.out.println("This directory has: "+r.length+" members");
      for(int a=0;a<r.length;a++){
        String str = r[a].getLocation().toPortableString();
        switch(r[a].getType()){
          case IResource.FILE:           
View Full Code Here

    if(relative.length() > 0) folders.add( relative );   
   
    m_transfer.setSubTask(Transfer.STASK_SCANNING, new String[] { relative });
   
    try{
      IResource r[] = c.members();
      //System.out.println("This directory has: "+r.length+" members");
      for(int a=0;a<r.length;a++){
        String str = r[a].getLocation().toPortableString();
        switch(r[a].getType()){
          case IResource.FILE:           
View Full Code Here

    }
    IResource resource = _file.getProject().findMember(path);
    if(resource!=null && resource.exists() && resource instanceof IContainer){
      try {
        IContainer container = (IContainer)resource;
        IResource[] children = container.members();
        ArrayList<AssistInfo> list = new ArrayList<AssistInfo>();
        for(int i=0;i<children.length;i++){
          // ignore dot files.
          if(children[i].getName().startsWith(".")){
            continue;
View Full Code Here

      } else {
        workingDirFolder = this.getUnderlyingProject().getFolder(IBuildAdapter.FILE_NAME_BUILD);
      }
      if (workingDirFolder != null && workingDirFolder.exists()) {
        IFolder woaFolder = null;
        IResource[] members = workingDirFolder.members();
        for (int i = 0; woaFolder == null && i < members.length; i++) {
          IResource member = members[i];
          if (member.getType() == IResource.FOLDER && member.getName().endsWith(".woa")) {
            woaFolder = (IFolder) member;
          }
View Full Code Here

    }
  }

  private void cleanupEmptyPackages(IFile metaFile) throws CoreException {
    IContainer container = metaFile.getParent();
    while (container.getType() == IResource.FOLDER && container.members().length == 0) {
      container.delete(true, monitor);
      container = container.getParent();
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.