This commit is contained in:
Sandeep Somavarapu 2024-04-24 15:39:31 +02:00 committed by GitHub
parent f3765fb6eb
commit 38e2814f92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import * as dom from 'vs/base/browser/dom';
import * as network from 'vs/base/common/network';
import * as paths from 'vs/base/common/path';
import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge';
import { ResourceLabels, IResourceLabel } from 'vs/workbench/browser/labels';
@ -18,7 +17,7 @@ import { IDisposable, dispose, Disposable, toDisposable, DisposableStore } from
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
import { QuickFixAction, QuickFixActionViewItem } from 'vs/workbench/contrib/markers/browser/markersViewActions';
import { ILabelService } from 'vs/platform/label/common/label';
import { dirname, basename, isEqual } from 'vs/base/common/resources';
import { basename, isEqual } from 'vs/base/common/resources';
import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
import { ITreeFilter, TreeVisibility, TreeFilterResult, ITreeRenderer, ITreeNode } from 'vs/base/browser/ui/tree/tree';
import { FilterOptions } from 'vs/workbench/contrib/markers/browser/markersFilterOptions';
@ -39,7 +38,6 @@ import { IEditorService, ACTIVE_GROUP } from 'vs/workbench/services/editor/commo
import { SeverityIcon } from 'vs/platform/severityIcon/browser/severityIcon';
import { CodeActionTriggerType } from 'vs/editor/common/languages';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IFileService } from 'vs/platform/files/common/files';
import { Progress } from 'vs/platform/progress/common/progress';
import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems';
import { Codicon } from 'vs/base/common/codicons';
@ -159,8 +157,6 @@ export class ResourceMarkersRenderer implements ITreeRenderer<ResourceMarkers, R
constructor(
private labels: ResourceLabels,
onDidChangeRenderNodeCount: Event<ITreeNode<ResourceMarkers, ResourceMarkersFilterData>>,
@ILabelService private readonly labelService: ILabelService,
@IFileService private readonly fileService: IFileService
) {
onDidChangeRenderNodeCount(this.onDidChangeRenderNodeCount, this, this.disposables);
}
@ -181,11 +177,7 @@ export class ResourceMarkersRenderer implements ITreeRenderer<ResourceMarkers, R
const resourceMarkers = node.element;
const uriMatches = node.filterData && node.filterData.uriMatches || [];
if (this.fileService.hasProvider(resourceMarkers.resource) || resourceMarkers.resource.scheme === network.Schemas.untitled) {
templateData.resourceLabel.setFile(resourceMarkers.resource, { matches: uriMatches });
} else {
templateData.resourceLabel.setResource({ name: resourceMarkers.name, description: this.labelService.getUriLabel(dirname(resourceMarkers.resource), { relative: true }), resource: resourceMarkers.resource }, { matches: uriMatches });
}
templateData.resourceLabel.setFile(resourceMarkers.resource, { matches: uriMatches });
this.updateCount(node, templateData);
const nodeRenders = this.renderedNodes.get(resourceMarkers) ?? [];