mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 02:58:31 -05:00
Merge from vscode 31e03b8ffbb218a87e3941f2b63a249f061fe0e4 (#4986)
This commit is contained in:
@@ -112,7 +112,7 @@ export class InspectContextKeysAction extends Action {
|
||||
export class ToggleScreencastModeAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.toggleScreencastMode';
|
||||
static LABEL = nls.localize('toggle mouse clicks', "Toggle Screencast Mode");
|
||||
static LABEL = nls.localize('toggle screencast mode', "Toggle Screencast Mode");
|
||||
|
||||
static disposable: IDisposable | undefined;
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ export abstract class BaseSwitchWindow extends Action {
|
||||
protected abstract isQuickNavigate(): boolean;
|
||||
|
||||
run(): Promise<void> {
|
||||
const currentWindowId = this.windowService.getCurrentWindowId();
|
||||
const currentWindowId = this.windowService.windowId;
|
||||
|
||||
return this.windowsService.getWindows().then(windows => {
|
||||
const placeHolder = nls.localize('switchWindowPlaceHolder', "Select a window to switch to");
|
||||
|
||||
@@ -165,7 +165,7 @@ import { InstallVSIXAction } from 'vs/workbench/contrib/extensions/electron-brow
|
||||
const developerCategory = nls.localize('developer', "Developer");
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSharedProcessAction, ToggleSharedProcessAction.ID, ToggleSharedProcessAction.LABEL), 'Developer: Toggle Shared Process', developerCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(InspectContextKeysAction, InspectContextKeysAction.ID, InspectContextKeysAction.LABEL), 'Developer: Inspect Context Keys', developerCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleScreencastModeAction, ToggleScreencastModeAction.ID, ToggleScreencastModeAction.LABEL), 'Developer: Toggle Mouse Clicks', developerCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleScreencastModeAction, ToggleScreencastModeAction.ID, ToggleScreencastModeAction.LABEL), 'Developer: Toggle Screencast Mode', developerCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowWithExtensionsDisabledAction, ReloadWindowWithExtensionsDisabledAction.ID, ReloadWindowWithExtensionsDisabledAction.LABEL), 'Developer: Reload Window Without Extensions', developerCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(LogStorageAction, LogStorageAction.ID, LogStorageAction.LABEL), 'Developer: Log Storage', developerCategory);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL), 'Developer: Reload Window', developerCategory);
|
||||
|
||||
@@ -15,14 +15,12 @@ import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { WorkspaceService } from 'vs/workbench/services/configuration/browser/configurationService';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { WorkbenchEnvironmentService } from 'vs/workbench/services/environment/node/environmentService';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { stat } from 'vs/base/node/pfs';
|
||||
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
|
||||
import { KeyboardMapperFactory } from 'vs/workbench/services/keybinding/electron-browser/keybindingService';
|
||||
import { IWindowConfiguration, IWindowService } from 'vs/platform/windows/common/windows';
|
||||
import { WindowService } from 'vs/platform/windows/electron-browser/windowService';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IWindowConfiguration } from 'vs/platform/windows/common/windows';
|
||||
import { webFrame } from 'electron';
|
||||
import { ISingleFolderWorkspaceIdentifier, IWorkspaceInitializationPayload, ISingleFolderWorkspaceInitializationPayload, reviveWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { createSpdLogService } from 'vs/platform/log/node/spdlogService';
|
||||
@@ -48,7 +46,6 @@ import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { DiskFileSystemProvider } from 'vs/workbench/services/files2/electron-browser/diskFileSystemProvider';
|
||||
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { REMOTE_FILE_SYSTEM_CHANNEL_NAME, RemoteExtensionsFileSystemProvider } from 'vs/platform/remote/common/remoteAgentFileSystemChannel';
|
||||
import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts';
|
||||
import { DefaultConfigurationExportHelper } from 'vs/workbench/services/configuration/node/configurationExportHelper';
|
||||
import { ConfigurationCache } from 'vs/workbench/services/configuration/node/configurationCache';
|
||||
import { ConfigurationFileService } from 'vs/workbench/services/configuration/node/configurationFileService';
|
||||
@@ -177,12 +174,9 @@ class CodeRendererMain extends Disposable {
|
||||
const mainProcessService = this._register(new MainProcessService(this.configuration.windowId));
|
||||
serviceCollection.set(IMainProcessService, mainProcessService);
|
||||
|
||||
// Window
|
||||
serviceCollection.set(IWindowService, new SyncDescriptor(WindowService, [this.configuration]));
|
||||
|
||||
// Environment
|
||||
const environmentService = new EnvironmentService(this.configuration, this.configuration.execPath);
|
||||
serviceCollection.set(IEnvironmentService, environmentService);
|
||||
const environmentService = new WorkbenchEnvironmentService(this.configuration, this.configuration.execPath);
|
||||
serviceCollection.set(IWorkbenchEnvironmentService, environmentService);
|
||||
|
||||
// Log
|
||||
const logService = this._register(this.createLogService(mainProcessService, environmentService));
|
||||
@@ -206,7 +200,7 @@ class CodeRendererMain extends Disposable {
|
||||
if (connection) {
|
||||
const channel = connection.getChannel<IChannel>(REMOTE_FILE_SYSTEM_CHANNEL_NAME);
|
||||
const remoteFileSystemProvider = this._register(new RemoteExtensionsFileSystemProvider(channel, remoteAgentService.getEnvironment()));
|
||||
fileService.registerProvider(REMOTE_HOST_SCHEME, remoteFileSystemProvider);
|
||||
fileService.registerProvider(Schemas.vscodeRemote, remoteFileSystemProvider);
|
||||
}
|
||||
|
||||
return this.resolveWorkspaceInitializationPayload(environmentService).then(payload => Promise.all([
|
||||
@@ -231,7 +225,7 @@ class CodeRendererMain extends Disposable {
|
||||
]).then(services => ({ serviceCollection, logService, storageService: services[1] })));
|
||||
}
|
||||
|
||||
private resolveWorkspaceInitializationPayload(environmentService: EnvironmentService): Promise<IWorkspaceInitializationPayload> {
|
||||
private resolveWorkspaceInitializationPayload(environmentService: IWorkbenchEnvironmentService): Promise<IWorkspaceInitializationPayload> {
|
||||
|
||||
// Multi-root workspace
|
||||
if (this.configuration.workspace) {
|
||||
@@ -301,7 +295,7 @@ class CodeRendererMain extends Disposable {
|
||||
}, error => onUnexpectedError(error));
|
||||
}
|
||||
|
||||
private createWorkspaceService(payload: IWorkspaceInitializationPayload, environmentService: IEnvironmentService, fileService: FileService2, remoteAgentService: IRemoteAgentService, logService: ILogService): Promise<WorkspaceService> {
|
||||
private createWorkspaceService(payload: IWorkspaceInitializationPayload, environmentService: IWorkbenchEnvironmentService, fileService: FileService2, remoteAgentService: IRemoteAgentService, logService: ILogService): Promise<WorkspaceService> {
|
||||
const configurationFileService = new ConfigurationFileService();
|
||||
fileService.whenReady.then(() => configurationFileService.fileService = fileService);
|
||||
|
||||
@@ -315,7 +309,7 @@ class CodeRendererMain extends Disposable {
|
||||
});
|
||||
}
|
||||
|
||||
private createStorageService(payload: IWorkspaceInitializationPayload, environmentService: IEnvironmentService, logService: ILogService, mainProcessService: IMainProcessService): Promise<StorageService> {
|
||||
private createStorageService(payload: IWorkspaceInitializationPayload, environmentService: IWorkbenchEnvironmentService, logService: ILogService, mainProcessService: IMainProcessService): Promise<StorageService> {
|
||||
const globalStorageDatabase = new GlobalStorageDatabaseChannelClient(mainProcessService.getChannel('storage'));
|
||||
const storageService = new StorageService(globalStorageDatabase, logService, environmentService);
|
||||
|
||||
@@ -327,7 +321,7 @@ class CodeRendererMain extends Disposable {
|
||||
});
|
||||
}
|
||||
|
||||
private createLogService(mainProcessService: IMainProcessService, environmentService: IEnvironmentService): ILogService {
|
||||
private createLogService(mainProcessService: IMainProcessService, environmentService: IWorkbenchEnvironmentService): ILogService {
|
||||
const spdlogService = createSpdLogService(`renderer${this.configuration.windowId}`, this.configuration.logLevel, environmentService.logsPath);
|
||||
const consoleLogService = new ConsoleLogService(this.configuration.logLevel);
|
||||
const logService = new MultiplexLogService([consoleLogService, spdlogService]);
|
||||
|
||||
@@ -38,7 +38,7 @@ import pkg from 'vs/platform/product/node/package';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { EditorServiceImpl } from 'vs/workbench/browser/parts/editor/editor';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { IAccessibilityService, AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility';
|
||||
import { WorkbenchState, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { coalesce } from 'vs/base/common/arrays';
|
||||
@@ -86,7 +86,7 @@ export class ElectronWindow extends Disposable {
|
||||
@IMenuService private readonly menuService: IMenuService,
|
||||
@ILifecycleService private readonly lifecycleService: ILifecycleService,
|
||||
@IIntegrityService private readonly integrityService: IIntegrityService,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
|
||||
@IAccessibilityService private readonly accessibilityService: IAccessibilityService,
|
||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService
|
||||
) {
|
||||
@@ -226,7 +226,7 @@ export class ElectronWindow extends Disposable {
|
||||
this._register(this.editorService.onDidVisibleEditorsChange(() => this.onDidVisibleEditorsChange()));
|
||||
|
||||
// Listen to editor closing (if we run with --wait)
|
||||
const filesToWait = this.windowService.getConfiguration().filesToWait;
|
||||
const filesToWait = this.environmentService.configuration.filesToWait;
|
||||
if (filesToWait) {
|
||||
const resourcesToWaitFor = coalesce(filesToWait.paths.map(p => p.fileUri));
|
||||
const waitMarkerFile = filesToWait.waitMarkerFileUri;
|
||||
@@ -320,7 +320,7 @@ export class ElectronWindow extends Disposable {
|
||||
|
||||
// Emit event when vscode is ready
|
||||
this.lifecycleService.when(LifecyclePhase.Ready).then(() => {
|
||||
ipc.send('vscode:workbenchReady', this.windowService.getCurrentWindowId());
|
||||
ipc.send('vscode:workbenchReady', this.windowService.windowId);
|
||||
});
|
||||
|
||||
// Integrity warning
|
||||
|
||||
Reference in New Issue
Block a user