Skip to content

Commit 38e2814

Browse files
authored
1 parent f3765fb commit 38e2814

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as dom from 'vs/base/browser/dom';
7-
import * as network from 'vs/base/common/network';
87
import * as paths from 'vs/base/common/path';
98
import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge';
109
import { ResourceLabels, IResourceLabel } from 'vs/workbench/browser/labels';
@@ -18,7 +17,7 @@ import { IDisposable, dispose, Disposable, toDisposable, DisposableStore } from
1817
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
1918
import { QuickFixAction, QuickFixActionViewItem } from 'vs/workbench/contrib/markers/browser/markersViewActions';
2019
import { ILabelService } from 'vs/platform/label/common/label';
21-
import { dirname, basename, isEqual } from 'vs/base/common/resources';
20+
import { basename, isEqual } from 'vs/base/common/resources';
2221
import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
2322
import { ITreeFilter, TreeVisibility, TreeFilterResult, ITreeRenderer, ITreeNode } from 'vs/base/browser/ui/tree/tree';
2423
import { FilterOptions } from 'vs/workbench/contrib/markers/browser/markersFilterOptions';
@@ -39,7 +38,6 @@ import { IEditorService, ACTIVE_GROUP } from 'vs/workbench/services/editor/commo
3938
import { SeverityIcon } from 'vs/platform/severityIcon/browser/severityIcon';
4039
import { CodeActionTriggerType } from 'vs/editor/common/languages';
4140
import { IOpenerService } from 'vs/platform/opener/common/opener';
42-
import { IFileService } from 'vs/platform/files/common/files';
4341
import { Progress } from 'vs/platform/progress/common/progress';
4442
import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems';
4543
import { Codicon } from 'vs/base/common/codicons';
@@ -159,8 +157,6 @@ export class ResourceMarkersRenderer implements ITreeRenderer<ResourceMarkers, R
159157
constructor(
160158
private labels: ResourceLabels,
161159
onDidChangeRenderNodeCount: Event<ITreeNode<ResourceMarkers, ResourceMarkersFilterData>>,
162-
@ILabelService private readonly labelService: ILabelService,
163-
@IFileService private readonly fileService: IFileService
164160
) {
165161
onDidChangeRenderNodeCount(this.onDidChangeRenderNodeCount, this, this.disposables);
166162
}
@@ -181,11 +177,7 @@ export class ResourceMarkersRenderer implements ITreeRenderer<ResourceMarkers, R
181177
const resourceMarkers = node.element;
182178
const uriMatches = node.filterData && node.filterData.uriMatches || [];
183179

184-
if (this.fileService.hasProvider(resourceMarkers.resource) || resourceMarkers.resource.scheme === network.Schemas.untitled) {
185-
templateData.resourceLabel.setFile(resourceMarkers.resource, { matches: uriMatches });
186-
} else {
187-
templateData.resourceLabel.setResource({ name: resourceMarkers.name, description: this.labelService.getUriLabel(dirname(resourceMarkers.resource), { relative: true }), resource: resourceMarkers.resource }, { matches: uriMatches });
188-
}
180+
templateData.resourceLabel.setFile(resourceMarkers.resource, { matches: uriMatches });
189181

190182
this.updateCount(node, templateData);
191183
const nodeRenders = this.renderedNodes.get(resourceMarkers) ?? [];

0 commit comments

Comments
 (0)