Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
7900866a
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,发现更多精彩内容 >>
提交
7900866a
编写于
8月 12, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - remove unused stuff, modernize code
上级
fcdc90c7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
21 deletion
+7
-21
src/vs/base/browser/ui/actionbar/actionbar.ts
src/vs/base/browser/ui/actionbar/actionbar.ts
+7
-20
src/vs/base/common/events.ts
src/vs/base/common/events.ts
+0
-1
未找到文件。
src/vs/base/browser/ui/actionbar/actionbar.ts
浏览文件 @
7900866a
...
@@ -355,9 +355,7 @@ export class ActionBar extends EventEmitter implements IActionRunner {
...
@@ -355,9 +355,7 @@ export class ActionBar extends EventEmitter implements IActionRunner {
private
toDispose
:
lifecycle
.
IDisposable
[];
private
toDispose
:
lifecycle
.
IDisposable
[];
constructor
(
container
:
HTMLElement
,
options
?:
IActionBarOptions
);
constructor
(
container
:
HTMLElement
|
Builder
,
options
:
IActionBarOptions
=
defaultOptions
)
{
constructor
(
container
:
Builder
,
options
?:
IActionBarOptions
);
constructor
(
container
:
any
,
options
:
IActionBarOptions
=
defaultOptions
)
{
super
();
super
();
this
.
options
=
options
;
this
.
options
=
options
;
this
.
_context
=
options
.
context
;
this
.
_context
=
options
.
context
;
...
@@ -449,8 +447,7 @@ export class ActionBar extends EventEmitter implements IActionRunner {
...
@@ -449,8 +447,7 @@ export class ActionBar extends EventEmitter implements IActionRunner {
this
.
domNode
.
appendChild
(
this
.
actionsList
);
this
.
domNode
.
appendChild
(
this
.
actionsList
);
container
=
(
container
instanceof
Builder
)
?
container
.
getHTMLElement
()
:
container
;
((
container
instanceof
Builder
)
?
container
.
getHTMLElement
()
:
container
).
appendChild
(
this
.
domNode
);
container
.
appendChild
(
this
.
domNode
);
}
}
public
setAriaLabel
(
label
:
string
):
void
{
public
setAriaLabel
(
label
:
string
):
void
{
...
@@ -495,17 +492,14 @@ export class ActionBar extends EventEmitter implements IActionRunner {
...
@@ -495,17 +492,14 @@ export class ActionBar extends EventEmitter implements IActionRunner {
return
$
(
this
.
domNode
);
return
$
(
this
.
domNode
);
}
}
public
push
(
actions
:
IAction
,
options
?:
IActionOptions
):
void
;
public
push
(
arg
:
IAction
|
IAction
[],
options
:
IActionOptions
=
{}):
void
{
public
push
(
actions
:
IAction
[],
options
?:
IActionOptions
):
void
;
public
push
(
actions
:
any
,
options
:
IActionOptions
=
{}):
void
{
const
actions
:
IAction
[]
=
!
Array
.
isArray
(
arg
)
?
[
arg
]
:
arg
;
if
(
!
Array
.
isArray
(
actions
))
{
actions
=
[
actions
];
}
let
index
=
types
.
isNumber
(
options
.
index
)
?
options
.
index
:
null
;
let
index
=
types
.
isNumber
(
options
.
index
)
?
options
.
index
:
null
;
actions
.
forEach
((
action
:
IAction
)
=>
{
actions
.
forEach
((
action
:
IAction
)
=>
{
le
t
actionItemElement
=
document
.
createElement
(
'
li
'
);
cons
t
actionItemElement
=
document
.
createElement
(
'
li
'
);
actionItemElement
.
className
=
'
action-item
'
;
actionItemElement
.
className
=
'
action-item
'
;
actionItemElement
.
setAttribute
(
'
role
'
,
'
presentation
'
);
actionItemElement
.
setAttribute
(
'
role
'
,
'
presentation
'
);
...
@@ -535,10 +529,7 @@ export class ActionBar extends EventEmitter implements IActionRunner {
...
@@ -535,10 +529,7 @@ export class ActionBar extends EventEmitter implements IActionRunner {
}
}
public
clear
():
void
{
public
clear
():
void
{
let
item
:
IActionItem
;
this
.
items
=
lifecycle
.
dispose
(
this
.
items
);
while
(
item
=
this
.
items
.
pop
())
{
item
.
dispose
();
}
$
(
this
.
actionsList
).
empty
();
$
(
this
.
actionsList
).
empty
();
}
}
...
@@ -550,10 +541,6 @@ export class ActionBar extends EventEmitter implements IActionRunner {
...
@@ -550,10 +541,6 @@ export class ActionBar extends EventEmitter implements IActionRunner {
return
this
.
items
.
length
===
0
;
return
this
.
items
.
length
===
0
;
}
}
public
onContentsChange
():
void
{
this
.
emit
(
CommonEventType
.
CONTENTS_CHANGED
);
}
public
focus
(
selectFirst
?:
boolean
):
void
{
public
focus
(
selectFirst
?:
boolean
):
void
{
if
(
selectFirst
&&
typeof
this
.
focusedItem
===
'
undefined
'
)
{
if
(
selectFirst
&&
typeof
this
.
focusedItem
===
'
undefined
'
)
{
this
.
focusedItem
=
0
;
this
.
focusedItem
=
0
;
...
...
src/vs/base/common/events.ts
浏览文件 @
7900866a
...
@@ -67,7 +67,6 @@ export const EventType = {
...
@@ -67,7 +67,6 @@ export const EventType = {
EXPAND
:
'
expand
'
,
EXPAND
:
'
expand
'
,
COLLAPSE
:
'
collapse
'
,
COLLAPSE
:
'
collapse
'
,
TOGGLE
:
'
toggle
'
,
TOGGLE
:
'
toggle
'
,
CONTENTS_CHANGED
:
'
contentsChanged
'
,
BEFORE_RUN
:
'
beforeRun
'
,
BEFORE_RUN
:
'
beforeRun
'
,
RUN
:
'
run
'
,
RUN
:
'
run
'
,
EDIT
:
'
edit
'
,
EDIT
:
'
edit
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录