Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.FileInfoMatcherDescription


            return repoLink;
        }
        // Let's filter out some content we don't need.
        repoLink.createFilter(IResourceFilterDescription.EXCLUDE_ALL
                | IResourceFilterDescription.FOLDERS | IResourceFilterDescription.INHERITABLE,
                new FileInfoMatcherDescription(FILE_FILTER_ID, ".git"), 0, monitor);

        repoLink.createLink(repoPath, 0, monitor);

        return repoLink;
    }
View Full Code Here


                "frameworks", "out", "libcore", "development"
        };

        for (String res : resources) {
            repoLink.createFilter(IResourceFilterDescription.INCLUDE_ONLY
                    | IResourceFilterDescription.FOLDERS, new FileInfoMatcherDescription(
                    FILE_FILTER_ID, res), 0, monitor);
        }

        // Let's filter out some content we don't need. To avoid it being
        // indexed
        repoLink.createFilter(IResourceFilterDescription.EXCLUDE_ALL
                | IResourceFilterDescription.FOLDERS | IResourceFilterDescription.INHERITABLE,
                new FileInfoMatcherDescription(FILE_FILTER_ID, "bin"), 0, monitor);
        repoLink.createFilter(IResourceFilterDescription.EXCLUDE_ALL
                | IResourceFilterDescription.FOLDERS, new FileInfoMatcherDescription(
                FILE_FILTER_ID, ".repo"), 0, monitor);
        repoLink.createFilter(IResourceFilterDescription.EXCLUDE_ALL
                | IResourceFilterDescription.FOLDERS | IResourceFilterDescription.INHERITABLE,
                new FileInfoMatcherDescription(FILE_FILTER_ID, ".git"), 0, monitor);
        // repoLink.createFilter(IResourceFilterDescription.EXCLUDE_ALL
        // | IResourceFilterDescription.FOLDERS, new FileInfoMatcherDescription(
        // FILE_FILTER_ID, "out"), 0, monitor);
        final IFolder out = repoLink.getFolder("out");
        // Only allow target/common/R in the out folder
        final int filterFlags = IResourceFilterDescription.INCLUDE_ONLY
                | IResourceFilterDescription.FOLDERS | IResourceFilterDescription.FILES;
        out.createFilter(filterFlags, new FileInfoMatcherDescription(FILE_FILTER_ID, "target"), 0,
                monitor);

        final IFolder target = out.getFolder("target");
        target.createFilter(filterFlags, new FileInfoMatcherDescription(FILE_FILTER_ID, "common"),
                0, monitor);

        final IFolder common = target.getFolder("common");
        common.createFilter(filterFlags, new FileInfoMatcherDescription(FILE_FILTER_ID, "R"), 0,
                monitor);
        repoLink.createLink(repoPath, 0, monitor);

        return repoLink;
    }
View Full Code Here

    testProject2.dispose();
  }

  private static void createFilter(IContainer container, int type, String regexFilterArguments) throws CoreException {
    FileInfoMatcherDescription matcherDescription = new FileInfoMatcherDescription(
        "org.eclipse.core.resources.regexFilterMatcher",
        regexFilterArguments);
    container.createFilter(type, matcherDescription, 0, null);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.resources.FileInfoMatcherDescription

Copyright © 2018 www.massapicom. 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.