Package org.eclipse.core.resources

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


      state.setFqPath(resource.getFullPath());
      state.setPath(computeRelativPathFrom(resource, base).makeRelative().toString());   
      if (resource instanceof IContainer) {
        state.setType(FSDesignResourceState.TYPE_FOLDER);
        IContainer container = (IContainer) resource;
        for (IResource child : container.members()) {
          List<LocalFSDesignResourceState> childStates = buildFSDesignResourceStates(child, base);
          states.addAll(childStates);
        }
      } else if (resource instanceof IFile) {
        IFile file = (IFile) resource;
View Full Code Here


    state.setFqPath(resource.getFullPath());   
    state.setPath(new Path(linkName).append(computeRelativPathFrom(resource, linkTarget.getFullPath()).makeRelative()).toString());   
    if (resource instanceof IContainer) {
      state.setType(FSDesignResourceState.TYPE_FOLDER);
      IContainer container = (IContainer) resource;
      for (IResource child : container.members()) {
        List<LocalFSDesignResourceState> childStates = buildDirLinkFSDesignResourceStates(linkTarget, linkName, child);
        states.addAll(childStates);
      }
    } else if (resource instanceof IFile) {
      IFile file = (IFile) resource;
View Full Code Here

    if (!(resource instanceof IContainer)) {
      return null;
    }
    IContainer folder = (IContainer) resource;
    // Only look for META-INF folder at top-level in the given container.
    IResource[] members = folder.members();
    if (members != null) {
      for (IResource mem : members) {
        if (META_FOLDER_NAME.equals(mem.getName())
            && mem instanceof IFolder) {
          return (IFolder) mem;
View Full Code Here

    public boolean buildStructure(final IProgressMonitor pm) throws ErlModelException {
        final IErlModel model = ErlangEngine.getInstance().getModel();
        final IContainer c = (IContainer) getResource();
        try {
            // FIXME this is general stuff -> model or model manager?
            final IResource[] members = c.members();
            for (final IResource resource : members) {
                model.create(resource);
            }
        } catch (final CoreException e) {
            throw new ErlModelException(new ErlModelStatus(
View Full Code Here

        addConfigurationChangeListeners();

        try {
            final IContainer c = (IContainer) r;
            final IResource[] elems = c.members();
            final List<IErlElement> children = new ArrayList<IErlElement>(
                    elems.length + 1);
            // ErlLogger.debug(">>adding externals");
            addExternals(children);
            // ErlLogger.debug("childcount %d", children.size());
View Full Code Here

    static private void findModulesRecursively(final IResource res,
            final List<IFile> files) throws CoreException {
        if (res instanceof IContainer) {
            final IContainer c = (IContainer) res;
            for (final IResource r : c.members()) {
                findModulesRecursively(r, files);
            }
        } else if (res instanceof IFile) {
            final IFile file = (IFile) res;
            if (isErlangFile(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

                if (!select && element instanceof IContainer) {
                    // Search the container hierarchy
                    IContainer container = (IContainer) element;
                    try {
                        IResource members[] = container.members();
                        if (members != null) {
                            for (int i = 0;
                                 i < members.length && !select;
                                 i++) {
                                select =
View Full Code Here

                if (!select && element instanceof IContainer) {
                    // Search the container hierarchy
                    IContainer container = (IContainer) element;
                    try {
                        IResource members[] = container.members();
                        if (members != null) {
                            for (int i = 0;
                                 i < members.length && !select;
                                 i++) {
                                select =
View Full Code Here

    }

    private static void findProcessFiles(IResource resource, List<IFile> fileList, IPath excludePath) throws CoreException {
        if (resource instanceof IContainer) {
            IContainer folder = (IContainer) resource;
            IResource[] resources = folder.members();
            for (int i = 0; i < resources.length; i++) {
                findProcessFiles(resources[i], fileList, excludePath);
            }
        } else if (resource instanceof IFile) {
            IFile file = (IFile) resource;
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.