提交 994bfe2d 编写于 作者: D Daniel Imms

Remove getDefaultShell

上级 0aab08ed
......@@ -49,9 +49,6 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
this._toDispose.push(_terminalService.onRequestAvailableShells(r => this._proxy.$requestAvailableShells().then(e => r(e))));
// ITerminalInstanceService listeners
if (terminalInstanceService.onRequestDefaultShell) {
this._toDispose.push(terminalInstanceService.onRequestDefaultShell(r => this._proxy.$requestDefaultShell().then(e => r(e))));
}
if (terminalInstanceService.onRequestDefaultShellAndArgs) {
this._toDispose.push(terminalInstanceService.onRequestDefaultShellAndArgs(r => this._proxy.$requestDefaultShellAndArgs().then(e => r(e.shell, e.args))));
}
......
......@@ -1134,7 +1134,6 @@ export interface ExtHostTerminalServiceShape {
$acceptProcessRequestLatency(id: number): number;
$acceptWorkspacePermissionsChanged(isAllowed: boolean): void;
$requestAvailableShells(): Promise<IShellDefinitionDto[]>;
$requestDefaultShell(): Promise<string>;
$requestDefaultShellAndArgs(): Promise<IShellAndArgsDto>;
}
......
......@@ -589,11 +589,6 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
return detectAvailableShells();
}
// TODO: Remove this once requestDefaultShellAndArgs is working
public $requestDefaultShell(): Promise<string> {
return Promise.resolve(getSystemShell(platform.platform));
}
public async $requestDefaultShellAndArgs(): Promise<IShellAndArgsDto> {
const configProvider = await this._extHostConfiguration.getConfigProvider();
return Promise.resolve({
......
......@@ -21,7 +21,6 @@ export const ITerminalInstanceService = createDecorator<ITerminalInstanceService
export interface ITerminalInstanceService {
_serviceBrand: any;
onRequestDefaultShell?: Event<(defaultShell: string) => void>;
onRequestDefaultShellAndArgs?: Event<IDefaultShellAndArgsRequest>;
getXtermConstructor(): Promise<typeof XTermTerminal>;
......@@ -34,7 +33,6 @@ export interface ITerminalInstanceService {
*/
mergeDefaultShellPathAndArgs(shell: IShellLaunchConfig, defaultShell: string, configHelper: ITerminalConfigHelper, platformOverride?: Platform): void;
getDefaultShell(): Promise<string>;
getDefaultShellAndArgs(): Promise<{ shell: string, args: string[] | string | undefined }>;
getMainProcessParentEnv(): Promise<IProcessEnvironment>;
}
......
......@@ -18,8 +18,6 @@ let SearchAddon: typeof XTermSearchAddon;
export class TerminalInstanceService implements ITerminalInstanceService {
public _serviceBrand: any;
private readonly _onRequestDefaultShell = new Emitter<(defaultShell: string) => void>();
public get onRequestDefaultShell(): Event<(defaultShell: string) => void> { return this._onRequestDefaultShell.event; }
private readonly _onRequestDefaultShellAndArgs = new Emitter<IDefaultShellAndArgsRequest>();
public get onRequestDefaultShellAndArgs(): Event<IDefaultShellAndArgsRequest> { return this._onRequestDefaultShellAndArgs.event; }
......@@ -54,10 +52,6 @@ export class TerminalInstanceService implements ITerminalInstanceService {
throw new Error('Not implemented');
}
public getDefaultShell(): Promise<string> {
return new Promise(r => this._onRequestDefaultShell.fire(r));
}
public getDefaultShellAndArgs(): Promise<{ shell: string, args: string[] | string | undefined }> {
return new Promise(r => this._onRequestDefaultShellAndArgs.fire((shell, args) => r({ shell, args })));
}
......
......@@ -8,7 +8,7 @@ import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/co
import { Registry } from 'vs/platform/registry/common/platform';
import { Platform } from 'vs/base/common/platform';
export function registerShellConfiguration(getDefaultShell?: (p: Platform) => string): void {
export function registerShellConfiguration(getSystemShell?: (p: Platform) => string): void {
const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);
configurationRegistry.registerConfiguration({
id: 'terminal',
......@@ -18,24 +18,24 @@ export function registerShellConfiguration(getDefaultShell?: (p: Platform) => st
properties: {
'terminal.integrated.shell.linux': {
markdownDescription:
getDefaultShell
? nls.localize('terminal.integrated.shell.linux', "The path of the shell that the terminal uses on Linux (default: {0}). [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration).", getDefaultShell(Platform.Linux))
getSystemShell
? nls.localize('terminal.integrated.shell.linux', "The path of the shell that the terminal uses on Linux (default: {0}). [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration).", getSystemShell(Platform.Linux))
: nls.localize('terminal.integrated.shell.linux.noDefault', "The path of the shell that the terminal uses on Linux. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration)."),
type: ['string', 'null'],
default: null
},
'terminal.integrated.shell.osx': {
markdownDescription:
getDefaultShell
? nls.localize('terminal.integrated.shell.osx', "The path of the shell that the terminal uses on macOS (default: {0}). [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration).", getDefaultShell(Platform.Mac))
getSystemShell
? nls.localize('terminal.integrated.shell.osx', "The path of the shell that the terminal uses on macOS (default: {0}). [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration).", getSystemShell(Platform.Mac))
: nls.localize('terminal.integrated.shell.osx.noDefault', "The path of the shell that the terminal uses on macOS. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration)."),
type: ['string', 'null'],
default: null
},
'terminal.integrated.shell.windows': {
markdownDescription:
getDefaultShell
? nls.localize('terminal.integrated.shell.windows', "The path of the shell that the terminal uses on Windows (default: {0}). [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration).", getDefaultShell(Platform.Windows))
getSystemShell
? nls.localize('terminal.integrated.shell.windows', "The path of the shell that the terminal uses on Windows (default: {0}). [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration).", getSystemShell(Platform.Windows))
: nls.localize('terminal.integrated.shell.windows.noDefault', "The path of the shell that the terminal uses on Windows. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration)."),
type: ['string', 'null'],
default: null
......
......@@ -75,12 +75,6 @@ export class TerminalInstanceService implements ITerminalInstanceService {
);
}
public getDefaultShell(): Promise<string> {
// Don't go via ext host as that would delay terminal start up until after the extension
// host is ready.
return Promise.resolve(getSystemShell(platform));
}
public getDefaultShellAndArgs(): Promise<{ shell: string, args: string[] | string | undefined }> {
// TODO: Pull the workspace shell permissions setting
const isWorkspaceShellAllowed = false; // configHelper.checkWorkspaceShellPermissions(platform);
......
......@@ -35,10 +35,6 @@ class MockTerminalInstanceService implements ITerminalInstanceService {
getDefaultShellAndArgs(): Promise<{ shell: string; args: string | string[] | undefined; }> {
throw new Error('Method not implemented.');
}
onRequestDefaultShell: any;
getDefaultShell(): Promise<string> {
throw new Error('Method not implemented.');
}
mergeDefaultShellPathAndArgs(): void {
throw new Error('Method not implemented.');
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册