Package org.eclipse.core.resources

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


  public IFolder[] getDesignsAsFolder(boolean resolveDirlinks) {
    List<IFolder> folders = new ArrayList<IFolder>();
    IFolder designroot = (IFolder) getDesignRoot();
    try {
      IResource resources[] = designroot.members(IFolder.FOLDER);
      for (int i = 0; i < resources.length; i++) {

        if (resources[i] instanceof IFolder) {
          IFolder current = (IFolder) resources[i];
View Full Code Here


  public IFolder[] getPluginsAsFolder(boolean resolveDirlinks) {
    List<IFolder> folders = new ArrayList<IFolder>();
    IFolder pluginroot = (IFolder) getPluginRoot();
    try {
      IResource resources[] = pluginroot.members(IFolder.FOLDER);
      for (int i = 0; i < resources.length; i++) {

        if (resources[i] instanceof IFolder) {
          IFolder current = (IFolder) resources[i];
View Full Code Here

  public static boolean hasDesignFolders(IContainer container) {
    if (container instanceof IFolder) {
      IFolder folder = (IFolder) container;
      try {
        for (IResource current : folder.members()) {
          if (current instanceof IContainer) {
            IContainer currentContainer = (IContainer) current;
            if (isDesignFolder(currentContainer)) {
              return true;
            }
View Full Code Here

  }

  public Set<IFolder> getLabelContainers() throws CoreException {
    IFolder filesFolder = getFileContainerRoot();
    Set<IFolder> containers = new HashSet<IFolder>();
    for (IResource current : filesFolder.members()) {
      if (current instanceof IFolder) {
        IFolder currentFolder = (IFolder) current;
        if (currentFolder.getName().toLowerCase().startsWith("labels_")) {
          containers.add(currentFolder);
        }
View Full Code Here

        }
      } else if (nonJavaResource instanceof IFolder) {
        IFolder folder = (IFolder) nonJavaResource;
        IResource[] members = null;
        try {
          members = folder.members();
        } catch (CoreException e) {
          // ignore
        }
        if (members != null) {
          addNonJavaResources(members, container, rootPathSegmentCounts, collector);
View Full Code Here

                IResource[] extFiles;

                IContainer cnfDir = buildFile.getParent();
                IFolder extDir = cnfDir.getFolder(new Path("ext"));
                if (extDir.exists())
                    extFiles = extDir.members();
                else
                    extFiles = new IResource[0];

                if (extFiles.length > 0) {
                    for (IResource extFile : extFiles) {
View Full Code Here

    if (metaFolder == null) {
      metaFolder = getMetaFolder(javaProject.getProject());
    }

    if (metaFolder != null) {
      IResource[] members = metaFolder.members();
      if (members != null) {
        for (IResource mem : members) {
          if (MANIFEST_FILE.equals(mem.getName().toUpperCase())
              && mem instanceof IFile) {
            return (IFile) mem;
View Full Code Here

        childrenNames.add(node.getName());
      }
     
      if (resource!=null && resource instanceof IFolder) {
        IFolder folder = (IFolder)resource;
        IResource[] members = folder.members();
                List<IResource> membersList = new LinkedList<IResource>(Arrays.asList(members));
        outerLoop: while(membersList.size()>0) {
                    for (Iterator<IResource> it = membersList.iterator(); it.hasNext();) {
                        IResource iResource = it.next();
                        if (isDotVltFile(iResource)) {
View Full Code Here

    private void prune(IContainer folder) throws CoreException {
        if (folder==null || !(folder instanceof IFolder)) {
            return;
        }
        IFolder f = (IFolder)folder;
        IResource[] members = f.members();
        if (members!=null && members.length!=0) {
            return;
        }
        f.delete(true, new NullProgressMonitor());
        prune(folder.getParent());
View Full Code Here

    }

    private void ensureNoAppSrcExists() {
        final IFolder folder = (IFolder) prj.findMember("src");
        try {
            final IResource[] srcs = folder.members();
            for (final IResource f : srcs) {
                assertThat("An .app.src exists: " + f.getName(),
                        !f.getName().endsWith(".app.src"));
            }
        } catch (final CoreException e) {
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.