Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f3e89cad
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f3e89cad
编写于
6月 26, 2018
作者:
D
Daniel Imms
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename terminal ext APIS to match convention
Fixes 52882
上级
8adcb8b4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
8 deletion
+8
-8
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+6
-6
src/vs/workbench/api/node/extHostTerminalService.ts
src/vs/workbench/api/node/extHostTerminalService.ts
+2
-2
未找到文件。
src/vs/vscode.proposed.d.ts
浏览文件 @
f3e89cad
...
@@ -341,7 +341,7 @@ declare module 'vscode' {
...
@@ -341,7 +341,7 @@ declare module 'vscode' {
* provides access to the raw data stream from the process running within the terminal,
* provides access to the raw data stream from the process running within the terminal,
* including VT sequences.
* including VT sequences.
*/
*/
onData
:
Event
<
string
>
;
onD
idWriteD
ata
:
Event
<
string
>
;
}
}
/**
/**
...
@@ -368,10 +368,10 @@ declare module 'vscode' {
...
@@ -368,10 +368,10 @@ declare module 'vscode' {
* created with all its APIs available for use by extensions. When using the Terminal object
* created with all its APIs available for use by extensions. When using the Terminal object
* of a TerminalRenderer it acts just like normal only the extension that created the
* of a TerminalRenderer it acts just like normal only the extension that created the
* TerminalRenderer essentially acts as a process. For example when an
* TerminalRenderer essentially acts as a process. For example when an
* [Terminal.onD
ata](#Terminal.onData) listener is registered, that will fire when
* [Terminal.onD
idWriteData](#Terminal.onDidWriteData) listener is registered, that will fire
* [TerminalRenderer.write](#TerminalRenderer.write) is called. Similarly when
*
when
[TerminalRenderer.write](#TerminalRenderer.write) is called. Similarly when
* [Terminal.sendText](#Terminal.sendText) is triggered that will fire the
* [Terminal.sendText](#Terminal.sendText) is triggered that will fire the
* [TerminalRenderer.on
Input](#TerminalRenderer.on
Input) event.
* [TerminalRenderer.on
DidAcceptInput](#TerminalRenderer.onDidAccept
Input) event.
*
*
* **Example:** Create a terminal renderer, show it and write hello world in red
* **Example:** Create a terminal renderer, show it and write hello world in red
* ```typescript
* ```typescript
...
@@ -441,13 +441,13 @@ declare module 'vscode' {
...
@@ -441,13 +441,13 @@ declare module 'vscode' {
* workbench command such as `workbench.action.terminal.runSelectedText`
* workbench command such as `workbench.action.terminal.runSelectedText`
* ```typescript
* ```typescript
* const terminalRenderer = window.createTerminalRenderer('test');
* const terminalRenderer = window.createTerminalRenderer('test');
* terminalRenderer.onInput(data => {
* terminalRenderer.on
DidAccept
Input(data => {
* cosole.log(data); // 'Hello world'
* cosole.log(data); // 'Hello world'
* });
* });
* terminalRenderer.terminal.then(t => t.sendText('Hello world'));
* terminalRenderer.terminal.then(t => t.sendText('Hello world'));
* ```
* ```
*/
*/
onInput
:
Event
<
string
>
;
on
DidAccept
Input
:
Event
<
string
>
;
/**
/**
* An event which fires when the [maximum dimensions](#TerminalRenderer.maimumDimensions) of
* An event which fires when the [maximum dimensions](#TerminalRenderer.maimumDimensions) of
...
...
src/vs/workbench/api/node/extHostTerminalService.ts
浏览文件 @
f3e89cad
...
@@ -77,7 +77,7 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi
...
@@ -77,7 +77,7 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi
private
_pidPromiseComplete
:
(
value
:
number
)
=>
any
;
private
_pidPromiseComplete
:
(
value
:
number
)
=>
any
;
private
readonly
_onData
:
Emitter
<
string
>
=
new
Emitter
<
string
>
();
private
readonly
_onData
:
Emitter
<
string
>
=
new
Emitter
<
string
>
();
public
get
onData
():
Event
<
string
>
{
public
get
onD
idWriteD
ata
():
Event
<
string
>
{
// Tell the main side to start sending data if it's not already
// Tell the main side to start sending data if it's not already
this
.
_proxy
.
$registerOnDataListener
(
this
.
_id
);
this
.
_proxy
.
$registerOnDataListener
(
this
.
_id
);
return
this
.
_onData
&&
this
.
_onData
.
event
;
return
this
.
_onData
&&
this
.
_onData
.
event
;
...
@@ -156,7 +156,7 @@ export class ExtHostTerminalRenderer extends BaseExtHostTerminal implements vsco
...
@@ -156,7 +156,7 @@ export class ExtHostTerminalRenderer extends BaseExtHostTerminal implements vsco
}
}
private
readonly
_onInput
:
Emitter
<
string
>
=
new
Emitter
<
string
>
();
private
readonly
_onInput
:
Emitter
<
string
>
=
new
Emitter
<
string
>
();
public
get
onInput
():
Event
<
string
>
{
public
get
on
DidAccept
Input
():
Event
<
string
>
{
this
.
_checkDisposed
();
this
.
_checkDisposed
();
this
.
_queueApiRequest
(
this
.
_proxy
.
$terminalRendererRegisterOnInputListener
,
[
this
.
_id
]);
this
.
_queueApiRequest
(
this
.
_proxy
.
$terminalRendererRegisterOnInputListener
,
[
this
.
_id
]);
// Tell the main side to start sending data if it's not already
// Tell the main side to start sending data if it's not already
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录