704
*/
705
export function resolveResourcesForSearchIncludes(resources: URI[], contextService: IWorkspaceContextService): string[] {
706
>
resources = arrays.distinct(resources, resource => resource.toString());
queryBuilder.ts
707
>
708
>
const folderPaths: string[] = [];
709
>
const workspace = contextService.getWorkspace();
710
>
711
>
if (resources) {
712
>
resources.forEach(resource => {
713
>
let folderPath: string | undefined;
714
>
if (contextService.getWorkbenchState() === WorkbenchState.FOLDER) {
715
>
// Show relative path from the root for single-root mode
716
>
folderPath = relativePath(workspace.folders[0].uri, resource); // always uses forward slashes
717
>
if (folderPath && folderPath !== '.') {
718
>
folderPath = './' + folderPath;
719
>
}
720
>
} else {
721
const owningFolder = contextService.getWorkspaceFolder(resource);
722
if (owningFolder) {