Package org.eclipse.core.resources

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


    if (inputElement instanceof File) {
      File root = (File) inputElement;   
      IContainer rootContainer = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(new Path(root.getAbsolutePath()));
     
      try {
                rootContainer.accept(new IResourceVisitor() {
                   
                    public boolean visit(IResource resource) throws CoreException {
                        if(resource instanceof IFolder){
                            return true;
                        }
View Full Code Here


                                pathOptions);
                        monitor.worked(1);

                        monitor.setTaskName("transfering design");
                        IContainer designContainer = _runtime.getConnectedDesignContainers().get(_webApplication);
                        designContainer.accept(new IResourceVisitor() {

                            public boolean visit(IResource resource) throws CoreException {
                                IPath remotePathObj = resource.getLocation();
                                int count = remotePathObj.matchingFirstSegments(_runtime.getDesignRoot().getLocation());
                                remotePathObj = remotePathObj.removeFirstSegments(count);
View Full Code Here

  public boolean select(Viewer viewer, Object parentElement, Object element) {   
    _resourceOk = false;
    if (element instanceof IContainer) {
      IContainer container = (IContainer) element;
      try {
        container.accept(new IResourceVisitor() {
          public boolean visit(IResource resource) throws CoreException {
            if (!_resourceOk && resource instanceof IContainer) {
              IContainer container = (IContainer) resource;
              if (isValidLocation(container)) {
                _resourceOk = true;
View Full Code Here

          final IResource resource = (IResource) actualParent;
          final List<IResource> list = new ArrayList<IResource>();
          IContainer lproj = resource.getParent();
          if (lproj != null && "lprog".equals(lproj.getFileExtension())) {
            IContainer p = lproj.getParent();
            p.accept(new IResourceProxyVisitor() {
 
              public boolean visit(IResourceProxy proxy) throws CoreException {
                if (proxy.getName().endsWith(".lproj")) {
                  IContainer f = (IContainer) proxy.requestResource();
                  IResource m = f.findMember(resource.getName());
View Full Code Here

      IPath outPath = getJavaProject().getOutputLocation();
      IContainer output = getProject();
      if (!outPath.segment(0).equals(getProject().getName())) {
        output = getProject().getParent().getFolder(outPath);
      }
      output.accept(_jarBuilder);
    }
    getLogger().debug("prepare jar copy took " + (System.currentTimeMillis() - t0) + " ms");
    monitor.worked(10);
    t0 = System.currentTimeMillis();
    _jarBuilder.executeTasks(monitor);
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.