Package org.eclipse.core.resources

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


      Object adapter = getAdapter(element, IResource.class);
      if (adapter instanceof IResource) {
        IResource resource = (IResource) adapter;
        if ((resource.getType() == IResource.PROJECT) ||
          (resource.getType() == IResource.FOLDER)) {
          resource.accept(new RV(resources));
        } else {
          resources.add(adapter);
        }
      }
    }
View Full Code Here


        if (result == null)
            return new IFile[0];
        while (resources.hasNext()) {
            IResource resource = (IResource) resources.next();
            try {
                resource.accept(new IResourceProxyVisitor() {
                    public boolean visit(IResourceProxy proxy) throws CoreException {
                        if (proxy.getType() == IResource.FILE) {
                            IResource file = proxy.requestResource();
                            if (result.getMatchCount(file) > 0) {
                                files.add(file);
View Full Code Here

          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 (IndexAllProject.this.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 (IndexAllProject.this.isCancelled) return false;
                  switch(proxy.getType()) {
                    case IResource.FILE :
View Full Code Here

          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 (IndexAllProject.this.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 (IndexAllProject.this.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.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.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName())) {
View Full Code Here

        if (fragmentRoot instanceof JarPackageFragmentRoot) {
          visitor.visitJar((JarPackageFragmentRoot) fragmentRoot);
        }
        IResource resource = fragmentRoot.getResource();
        if (resource != null) {
          resource.accept(visitor);
        }
      }
      List<String> suggestedClassNames = visitor.getSuggestedClassNames();
      for (String suggestedClassName : suggestedClassNames) {
        proposals.add(new RenameToSimilarNameQuickFixProposal(suggestedClassName, offset, length,
View Full Code Here

        IPath[] paths = ResourceUtils.getAllJavaSourceLocations(project);
        if (paths.length > 0) {
          for (IPath path : paths) {
            IResource resource = ResourceUtils.findResource(path);
            if (resource.exists()) {
              resource.accept(new ResourceProxyVisitor(contexts), IContainer.EXCLUDE_DERIVED);
            }
          }
        }
        else {
          project.accept(new ResourceProxyVisitor(contexts), IContainer.EXCLUDE_DERIVED);
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.