mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 13:03:42 +01:00
add main-side logging for save participants, #42013
This commit is contained in:
@@ -27,6 +27,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { IProgressService2, ProgressLocation } from 'vs/platform/progress/common/progress';
|
||||
import { localize } from 'vs/nls';
|
||||
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
|
||||
export interface ISaveParticipantParticipant extends ISaveParticipant {
|
||||
// progressMessage: string;
|
||||
@@ -279,8 +280,9 @@ export class SaveParticipant implements ISaveParticipant {
|
||||
|
||||
constructor(
|
||||
extHostContext: IExtHostContext,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IProgressService2 private _progressService: IProgressService2,
|
||||
@IInstantiationService instantiationService: IInstantiationService
|
||||
@ILogService private _logService: ILogService
|
||||
) {
|
||||
this._saveParticipants = [
|
||||
instantiationService.createInstance(TrimWhitespaceParticipant),
|
||||
@@ -303,7 +305,7 @@ export class SaveParticipant implements ISaveParticipant {
|
||||
const promiseFactory = this._saveParticipants.map(p => () => {
|
||||
return Promise.resolve(p.participate(model, env));
|
||||
});
|
||||
return sequence(promiseFactory).then(() => { });
|
||||
return sequence(promiseFactory).then(() => { }, err => this._logService.error(err));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user