Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
49c4f8f1
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,发现更多精彩内容 >>
提交
49c4f8f1
编写于
7月 28, 2017
作者:
T
t-amqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Address comments
上级
229dd92b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
14 deletion
+12
-14
src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts
...kbench/parts/terminal/electron-browser/terminalActions.ts
+12
-14
未找到文件。
src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts
浏览文件 @
49c4f8f1
...
...
@@ -613,8 +613,8 @@ export class RenameTerminalAction extends Action {
constructor
(
id
:
string
,
label
:
string
,
@
IQuickOpenService
pr
ivate
quickOpenService
:
IQuickOpenService
,
@
ITerminalService
pr
ivate
terminalService
:
ITerminalService
@
IQuickOpenService
pr
otected
quickOpenService
:
IQuickOpenService
,
@
ITerminalService
pr
otected
terminalService
:
ITerminalService
)
{
super
(
id
,
label
);
}
...
...
@@ -682,7 +682,7 @@ export class QuickOpenActionTermContributor extends ActionBarContributor {
public
getActions
(
context
:
any
):
IAction
[]
{
let
actions
:
Action
[]
=
[];
if
(
context
.
element
instanceof
TerminalEntry
)
{
actions
.
push
(
new
RenameTerminalQuickOpenAction
(
RenameTerminalAction
.
ID
,
RenameTerminalAction
.
LABEL
,
this
.
quickOpenService
,
this
.
terminalService
,
this
.
instantiationService
,
context
.
element
));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
RenameTerminalQuickOpenAction
,
RenameTerminalQuickOpenAction
.
ID
,
RenameTerminalQuickOpenAction
.
LABEL
,
context
.
element
));
}
return
actions
;
}
...
...
@@ -706,14 +706,12 @@ export class QuickOpenTermAction extends Action {
super
(
id
,
label
);
}
public
run
():
TPromise
<
boolean
>
{
this
.
quickOpenService
.
show
(
TERMINAL_PICKER_PREFIX
,
null
);
return
TPromise
.
as
(
true
);
public
run
():
TPromise
<
void
>
{
return
this
.
quickOpenService
.
show
(
TERMINAL_PICKER_PREFIX
,
null
);
}
}
export
class
RenameTerminalQuickOpenAction
extends
Action
{
export
class
RenameTerminalQuickOpenAction
extends
RenameTerminal
Action
{
public
static
ID
=
'
workbench.action.terminal.renameQuickPick
'
;
public
static
LABEL
=
nls
.
localize
(
'
workbench.action.terminal.renameQuickPick
'
,
"
Rename Quick Pick
"
);
...
...
@@ -721,12 +719,12 @@ export class RenameTerminalQuickOpenAction extends Action {
constructor
(
id
:
string
,
label
:
string
,
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
,
@
I
TerminalService
private
terminalService
:
ITerminal
Service
,
@
I
InstantiationService
private
instantiationService
:
IInstantiation
Service
,
private
terminal
:
TerminalEntry
private
terminal
:
TerminalEntry
,
@
I
QuickOpenService
quickOpenService
:
IQuickOpen
Service
,
@
I
TerminalService
terminalService
:
ITerminal
Service
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
(
id
,
label
);
super
(
id
,
label
,
quickOpenService
,
terminalService
);
this
.
_terminal
=
terminal
;
this
.
class
=
'
quick-open-terminal-configure
'
;
}
...
...
@@ -734,7 +732,7 @@ export class RenameTerminalQuickOpenAction extends Action {
public
run
():
TPromise
<
any
>
{
const
currentTerminal
=
this
.
terminalService
.
getActiveInstance
();
this
.
terminalService
.
setActiveInstanceByIndex
(
parseInt
(
this
.
_terminal
.
getLabel
().
split
(
'
:
'
)[
0
],
10
)
-
1
);
this
.
instantiationService
.
createInstance
(
RenameTerminalAction
,
RenameTerminalAction
.
ID
,
RenameTerminalAction
.
LABEL
)
.
run
()
super
.
run
()
.
then
(()
=>
TPromise
.
timeout
(
50
))
.
then
(
result
=>
this
.
quickOpenService
.
show
(
TERMINAL_PICKER_PREFIX
,
null
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录