mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
register uri display service early in workbench since other services can depend on it
This commit is contained in:
parent
c99654e046
commit
2de99c112e
|
@ -7,7 +7,6 @@ import URI from 'vs/base/common/uri';
|
|||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { isEqual, basenameOrAuthority } from 'vs/base/common/resources';
|
||||
import { isLinux, isWindows } from 'vs/base/common/platform';
|
||||
|
@ -109,6 +108,4 @@ export class UriDisplayService implements IUriDisplayService {
|
|||
}
|
||||
}
|
||||
|
||||
// register service
|
||||
export const IUriDisplayService = createDecorator<IUriDisplayService>(URI_DISPLAY_SERVICE_ID);
|
||||
registerSingleton(IUriDisplayService, UriDisplayService);
|
||||
|
|
|
@ -118,6 +118,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
|||
import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService';
|
||||
import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IUriDisplayService, UriDisplayService } from 'vs/platform/uriDisplay/common/uriDisplay';
|
||||
|
||||
interface WorkbenchParams {
|
||||
configuration: IWindowConfiguration;
|
||||
|
@ -334,6 +335,9 @@ export class Workbench extends Disposable implements IPartService {
|
|||
// Clipboard
|
||||
serviceCollection.set(IClipboardService, new ClipboardService());
|
||||
|
||||
// Uri Display
|
||||
serviceCollection.set(IUriDisplayService, new UriDisplayService(this.environmentService, this.contextService));
|
||||
|
||||
// Status bar
|
||||
this.statusbarPart = this.instantiationService.createInstance(StatusbarPart, Identifiers.STATUSBAR_PART);
|
||||
this._register(toDisposable(() => this.statusbarPart.shutdown()));
|
||||
|
|
Loading…
Reference in a new issue