This commit is contained in:
Johannes Rieken
2020-05-20 16:36:08 +02:00
parent 3a60df0cf3
commit 90b337af5c
2 changed files with 22 additions and 13 deletions

View File

@@ -8,6 +8,7 @@ import { URI, UriComponents } from 'vs/base/common/uri';
import { MainThreadDiagnosticsShape, MainContext, IExtHostContext, ExtHostDiagnosticsShape, ExtHostContext } from '../common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IDisposable } from 'vs/base/common/lifecycle';
import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity';
@extHostNamedCustomer(MainContext.MainThreadDiagnostics)
export class MainThreadDiagnostics implements MainThreadDiagnosticsShape {
@@ -15,15 +16,15 @@ export class MainThreadDiagnostics implements MainThreadDiagnosticsShape {
private readonly _activeOwners = new Set<string>();
private readonly _proxy: ExtHostDiagnosticsShape;
private readonly _markerService: IMarkerService;
private readonly _markerListener: IDisposable;
constructor(
extHostContext: IExtHostContext,
@IMarkerService markerService: IMarkerService
@IMarkerService private readonly _markerService: IMarkerService,
@IUriIdentityService private readonly _uriIdentService: IUriIdentityService,
) {
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDiagnostics);
this._markerService = markerService;
this._markerListener = this._markerService.onMarkerChanged(this._forwardMarkers, this);
}
@@ -59,7 +60,7 @@ export class MainThreadDiagnostics implements MainThreadDiagnosticsShape {
}
}
}
this._markerService.changeOne(owner, URI.revive(uri), markers);
this._markerService.changeOne(owner, this._uriIdentService.asCanonicalUri(URI.revive(uri)), markers);
}
this._activeOwners.add(owner);
}