提交 5b8a8174 编写于 作者: I isidor

markers: display paths relative to the workspace root

上级 99ba4016
......@@ -98,7 +98,8 @@ export class Renderer implements IRenderer {
constructor(
@IInstantiationService private instantiationService: IInstantiationService,
@IThemeService private themeService: IThemeService,
@IEnvironmentService private environmentService: IEnvironmentService
@IEnvironmentService private environmentService: IEnvironmentService,
@IWorkspaceContextService private contextService: IWorkspaceContextService
) {
}
......@@ -203,7 +204,7 @@ export class Renderer implements IRenderer {
if (templateData.resourceLabel instanceof FileLabel) {
templateData.resourceLabel.setFile(element.uri, { matches: element.uriMatches });
} else {
templateData.resourceLabel.setLabel({ name: element.name, description: getPathLabel(element.uri, this.environmentService), resource: element.uri }, { matches: element.uriMatches });
templateData.resourceLabel.setLabel({ name: element.name, description: getPathLabel(element.uri, this.environmentService, this.contextService), resource: element.uri }, { matches: element.uriMatches });
}
(<IResourceMarkersTemplateData>templateData).count.setCount(element.filteredCount);
}
......@@ -230,7 +231,7 @@ export class Renderer implements IRenderer {
private renderRelatedInfoElement(tree: ITree, element: RelatedInformation, templateData: IRelatedInformationTemplateData) {
templateData.resourceLabel.set(paths.basename(element.raw.resource.fsPath), element.uriMatches);
templateData.resourceLabel.element.title = getPathLabel(element.raw.resource, this.environmentService);
templateData.resourceLabel.element.title = getPathLabel(element.raw.resource, this.environmentService, this.contextService);
templateData.lnCol.textContent = Messages.MARKERS_PANEL_AT_LINE_COL_NUMBER(element.raw.startLineNumber, element.raw.startColumn);
templateData.description.set(element.raw.message, element.messageMatches);
templateData.description.element.title = element.raw.message;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册