documentPath = path.toString();
relativePath = Util.relativePath(path, 1/*remove project segment*/);
}
if (scope instanceof JavaSearchScope) {
JavaSearchScope javaSearchScope = (JavaSearchScope) scope;
// Get document path access restriction from java search scope
// Note that requestor has to verify if needed whether the document violates the access restriction or not
AccessRuleSet access = javaSearchScope.getAccessRuleSet(relativePath, index.containerPath);
if (access != JavaSearchScope.NOT_ENCLOSED) { // scope encloses the path
if (!requestor.acceptIndexMatch(documentPath, this, participant, access))
throw new OperationCanceledException();
}
} else if (scope.encloses(documentPath)) {