"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;
}