Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(terminal): use launchConfig #1528

Merged
merged 17 commits into from
Aug 29, 2022
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { TerminalTaskSystem } from '@opensumi/ide-task/lib/browser/terminal-task
import { ITaskService, ITaskSystem } from '@opensumi/ide-task/lib/common';
import {
ITerminalApiService,
ITerminalClientFactory,
ITerminalController,
ITerminalGroupViewService,
ITerminalInternalService,
Expand Down Expand Up @@ -148,13 +147,6 @@ describe('ExtHostTask API', () => {
token: ITaskSystem,
useClass: TerminalTaskSystem,
},
{
token: ITerminalClientFactory,
useFactory:
(injector) =>
(widget, options = {}) =>
TerminalClientFactory.createClient(injector, widget, options),
},
{
token: IVariableResolverService,
useClass: VariableResolverService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ export const extensionHostManagerTester = (options: IExtensionHostManagerTesterO
});
it('tree kill', async () => {
expect.assertions(2);
const defered = new Deferred();
const deferred = new Deferred();

const pid = await extensionHostManager.fork(extHostPath);
extensionHostManager.onExit(pid, async (code, signal) => {
expect(signal).toBe('SIGTERM');
// tree-kill 使用 process.kill 不能使用 killed 判断
expect(await extensionHostManager.isRunning(pid)).toBeFalsy();
defered.resolve();
deferred.resolve();
});
await extensionHostManager.treeKill(pid);
await defered.promise;
await deferred.promise;
});

it('findDebugPort', async () => {
Expand All @@ -104,14 +104,14 @@ export const extensionHostManagerTester = (options: IExtensionHostManagerTesterO

it('on output', async () => {
expect.assertions(1);
const defered = new Deferred();
const deferred = new Deferred();

const pid = await extensionHostManager.fork(extHostPath, [], { silent: true });
extensionHostManager.onOutput(pid, (output) => {
expect(output.data).toContain('send ready');
defered.resolve();
deferred.resolve();
});
await defered.promise;
await deferred.promise;
});
it('dispose process', async () => {
const pid = await extensionHostManager.fork(extHostPath);
Expand Down
16 changes: 13 additions & 3 deletions packages/i18n/src/common/en-US.lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ export const localizationBundle = {
'terminal.new': 'Create Terminal',
'terminal.split': 'Split Terminal',
'terminal.clear': 'Remove All Terminals',
'terminal.clear.content': 'Clear All Terminals',
'terminal.clear.content': 'Clear All Contents',
'terminal.independ': 'Independent Terminal',
'terminal.maximum': 'Maximum Terminal Panel',
'terminal.or': 'Or',
Expand All @@ -648,7 +648,7 @@ export const localizationBundle = {
'terminal.menu.clearGroups': 'Clear All Terminals',
'terminal.menu.selectType': 'Default Terminal Type',
'terminal.menu.moreSettings': 'More Settings',
'terminal.menu.clearCurrentContent': 'Clear All',
'terminal.menu.clearCurrentContent': 'Clear',
'terminal.menu.selectCurrentContent': 'Select All',
'terminal.menu.clearAllContents': 'Clear All Terminals Content',
'terminal.menu.selectAllContent': 'Select All Terminals Content',
Expand Down Expand Up @@ -873,6 +873,7 @@ export const localizationBundle = {
'TaskService.pickRunTask': 'Select the task to run',
'TerminalTaskSystem.terminalName': 'Task - {0}',
'terminal.integrated.exitedWithCode': 'The terminal process terminated with exit code: {0}',
// reuseTerminal: "Terminal will be reused by tasks, press 'r' to rerun task. press any other key to close it.",
reuseTerminal: 'Terminal will be reused by tasks, press any key to close it.',

'toolbar-customize.buttonDisplay.description': 'Button Style',
Expand Down Expand Up @@ -973,7 +974,16 @@ export const localizationBundle = {
'debug.terminal.label': 'Javascript Debug Terminal',

'output.channel.clear': 'Clear Output Panel',
'command.runTask': 'Run Task',

'workbench.action.tasks.runTask': 'Run Task',
'workbench.action.tasks.reRunTask': 'Rerun Last Task',
'workbench.action.tasks.restartTask': 'Restart Running Task',
'workbench.action.tasks.terminate': 'Terminate Task',
'workbench.action.tasks.showTasks': 'Show Running Tasks',
'workbench.action.tasks.showLog': 'Show Task Log',
'task.contribute': 'Contribute',
'task.cannotFindTask': 'Cannot find task for {0}. Press Enter key to return.',

// extension contribute
...browserViews,
},
Expand Down
12 changes: 10 additions & 2 deletions packages/i18n/src/common/zh-CN.lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@ export const localizationBundle = {
'TaskService.pickRunTask': '选择要运行的任务',
'TerminalTaskSystem.terminalName': '任务 - {0}',
'terminal.integrated.exitedWithCode': '终端进程已终止,退出代码: {0}',
// reuseTerminal: '终端将被任务重用,按 r 键重新执行该任务,按其他任意键关闭。',
reuseTerminal: '终端将被任务重用,按任意键关闭。',

'toolbar-customize.buttonDisplay.description': '按钮展示形式',
Expand Down Expand Up @@ -1019,8 +1020,15 @@ export const localizationBundle = {
'connection.stop.rtt': '关闭通信延迟检查',

'debug.terminal.label': '创建 Javascript Debug Terminal',
'command.runTask': '运行任务',

'workbench.action.tasks.runTask': '运行任务',
'workbench.action.tasks.reRunTask': '执行上次运行的任务',
'workbench.action.tasks.restartTask': '重新开始运行中的任务',
'workbench.action.tasks.terminate': '终止任务',
'workbench.action.tasks.showTasks': '展示任务',
'workbench.action.tasks.showLog': '展示任务日志',

'task.contribute': '贡献',
'task.cannotFindTask': '未找到 {0} 的任务,按回车键返回',
// extension contribute
...browserViews,
},
Expand Down
Loading