Package org.eclipse.core.resources

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


          final boolean hasOutputs = !outputs.isEmpty();
         
          final char[][] inclusionPatterns = ((ClasspathEntry) entry).fullInclusionPatternChars();
          final char[][] exclusionPatterns = ((ClasspathEntry) entry).fullExclusionPatternChars();
          if (max == 0) {
            sourceFolder.accept(
              new IResourceProxyVisitor() {
                public boolean visit(IResourceProxy proxy) {
                  if (isCancelled) return false;
                  switch(proxy.getType()) {
                    case IResource.FILE :
View Full Code Here


                }
              },
              IResource.NONE
            );
          } else {
            sourceFolder.accept(
              new IResourceProxyVisitor() {
                public boolean visit(IResourceProxy proxy) throws CoreException {
                  if (isCancelled) return false;
                  switch(proxy.getType()) {
                    case IResource.FILE :
View Full Code Here

      final IPath container = this.containerPath;
      final IndexManager indexManager = this.manager;
      final SourceElementParser parser = indexManager.getSourceElementParser(JavaCore.create(this.project), null/*requestor will be set by indexer*/);
      if (this.exclusionPatterns == null && this.inclusionPatterns == null) {
        folder.accept(
          new IResourceProxyVisitor() {
            public boolean visit(IResourceProxy proxy) /* throws CoreException */{
              if (proxy.getType() == IResource.FILE) {
                if (org.aspectj.org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName()))
                  indexManager.addSource((IFile) proxy.requestResource(), container, parser);
View Full Code Here

            }
          },
          IResource.NONE
        );
      } else {
        folder.accept(
          new IResourceProxyVisitor() {
            public boolean visit(IResourceProxy proxy) /* throws CoreException */{
              switch(proxy.getType()) {
                case IResource.FILE :
                  if (org.aspectj.org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName())) {
View Full Code Here

    if (isPerlProject || isPerlFolder) {
      PerlProjectVisitor projectVisitor = new PerlProjectVisitor();
      try {
        //resource.getProject().accept(projectVisitor);
        resource.accept(projectVisitor);
      } catch (CoreException e1) {
        e1.printStackTrace();
      }

      int state = projectVisitor.getState();
View Full Code Here

        IResource importStartingPoint = contentSyncRootDir.findMember(repositoryImportRoot);
        if (importStartingPoint == null) {
            return;
        }
        importStartingPoint.accept(new IResourceVisitor() {

            @Override
            public boolean visit(IResource resource) throws CoreException {

                try {
View Full Code Here

   * an expensive operation since it would trigger the regeneration of
   * @throws CoreException
   */
  protected void cleanJapidviews() throws CoreException {
    IResource japids = getJapidViewsResource();
    japids.accept(new JapidCleanVisitor());
  }
 
}
View Full Code Here

    IPackageFragmentRoot[] roots = javaProject.getPackageFragmentRoots();
    for (IPackageFragmentRoot root : roots) {
      if (!root.isArchive()) {
        IResource rootResource = root.getCorrespondingResource();
        String rootURL = rootResource.getFullPath().toOSString();
        rootResource.accept(new JavaPackageVisitor(allJavaPackages, rootURL), IContainer.NONE);
      }
    }
    return allJavaPackages;
  }
 
View Full Code Here

  public void testGetAllJavaPackagesReturnsPackageWhenItsThere() throws Exception {
    IPackageFragmentRoot[] roots = new IPackageFragmentRoot[1];
    IPackageFragmentRoot root = control.createMock(IPackageFragmentRoot.class);
    IResource resource = control.createMock(IResource.class);
    expect(resource.getFullPath()).andReturn(new Path("SomePath"));
    resource.accept(EasyMock.isA(JavaPackageVisitor.class), EasyMock.anyInt());
   
    expect(root.isArchive()).andReturn(false);
    expect(root.getCorrespondingResource()).andReturn(resource);
    roots[0] = root;
    expect(javaProject.getPackageFragmentRoots()).andReturn(roots);
View Full Code Here

        for (Iterator iter = resources.iterator(); iter.hasNext();) {
            IResource resource = (IResource) iter.next();
            if (resource.exists()) {
                // visit each resource deeply
                try {
                    resource.accept(new IResourceVisitor() {
                    public boolean visit(IResource aResource) {
                        ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(aResource);
                        // skip ignored resources and their children
                        try {
                            if (svnResource.isIgnored()){
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.