Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
ef11e2d0
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ef11e2d0
编写于
11月 23, 2017
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove more unused code, #38414
上级
3dd8f493
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
4 addition
and
123 deletion
+4
-123
src/vs/base/browser/builder.ts
src/vs/base/browser/builder.ts
+1
-34
src/vs/base/common/events.ts
src/vs/base/common/events.ts
+0
-78
src/vs/base/test/browser/builder.test.ts
src/vs/base/test/browser/builder.test.ts
+1
-7
src/vs/platform/files/common/files.ts
src/vs/platform/files/common/files.ts
+2
-4
未找到文件。
src/vs/base/browser/builder.ts
浏览文件 @
ef11e2d0
...
...
@@ -436,21 +436,6 @@ export class Builder implements IDisposable {
return
this
;
}
/**
* Calls select() on the current HTML element;
*/
public
domSelect
(
range
:
IRange
=
null
):
Builder
{
let
input
=
<
HTMLInputElement
>
this
.
currentElement
;
input
.
select
();
if
(
range
)
{
input
.
setSelectionRange
(
range
.
start
,
range
.
end
);
}
return
this
;
}
/**
* Calls blur() on the current HTML element;
*/
...
...
@@ -660,15 +645,6 @@ export class Builder implements IDisposable {
return
this
;
}
/**
* Sets the name attribute to the value provided for the current HTML element of the builder.
*/
public
name
(
name
:
string
):
Builder
{
this
.
currentElement
.
setAttribute
(
'
name
'
,
name
);
return
this
;
}
/**
* Sets the type attribute to the value provided for the current HTML element of the builder.
*/
...
...
@@ -1284,15 +1260,6 @@ export class Builder implements IDisposable {
return
this
;
}
/**
* Returns a new builder with the parent element of the current element of the builder.
*/
public
parent
(
offdom
?:
boolean
):
Builder
{
assert
.
ok
(
!
this
.
offdom
,
'
Builder was created with offdom = true and thus has no parent set
'
);
return
withElement
(
<
HTMLElement
>
this
.
currentElement
.
parentNode
,
offdom
);
}
/**
* Returns a new builder with the child at the given index.
*/
...
...
@@ -1750,4 +1717,4 @@ export const $: QuickBuilder = function (arg?: any): Builder {
(
<
any
>
$
).
Builder
=
Builder
;
(
<
any
>
$
).
MultiBuilder
=
MultiBuilder
;
(
<
any
>
$
).
Build
=
Build
;
(
<
any
>
$
).
Binding
=
Binding
;
\ No newline at end of file
(
<
any
>
$
).
Binding
=
Binding
;
src/vs/base/common/events.ts
已删除
100644 → 0
浏览文件 @
3dd8f493
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
export
class
Event
{
public
time
:
number
;
public
originalEvent
:
Event
;
public
source
:
any
;
constructor
(
originalEvent
?:
Event
)
{
this
.
time
=
(
new
Date
()).
getTime
();
this
.
originalEvent
=
originalEvent
;
this
.
source
=
null
;
}
}
export
class
PropertyChangeEvent
extends
Event
{
public
key
:
string
;
public
oldValue
:
any
;
public
newValue
:
any
;
constructor
(
key
?:
string
,
oldValue
?:
any
,
newValue
?:
any
,
originalEvent
?:
Event
)
{
super
(
originalEvent
);
this
.
key
=
key
;
this
.
oldValue
=
oldValue
;
this
.
newValue
=
newValue
;
}
}
export
class
ViewerEvent
extends
Event
{
public
element
:
any
;
constructor
(
element
:
any
,
originalEvent
?:
Event
)
{
super
(
originalEvent
);
this
.
element
=
element
;
}
}
export
interface
ISelectionEvent
{
selection
:
any
[];
payload
?:
any
;
source
:
any
;
}
export
interface
IFocusEvent
{
focus
:
any
;
payload
?:
any
;
source
:
any
;
}
export
interface
IHighlightEvent
{
highlight
:
any
;
payload
?:
any
;
source
:
any
;
}
export
const
EventType
=
{
PROPERTY_CHANGED
:
'
propertyChanged
'
,
SELECTION
:
'
selection
'
,
FOCUS
:
'
focus
'
,
BLUR
:
'
blur
'
,
HIGHLIGHT
:
'
highlight
'
,
EXPAND
:
'
expand
'
,
COLLAPSE
:
'
collapse
'
,
TOGGLE
:
'
toggle
'
,
BEFORE_RUN
:
'
beforeRun
'
,
RUN
:
'
run
'
,
EDIT
:
'
edit
'
,
SAVE
:
'
save
'
,
CANCEL
:
'
cancel
'
,
CHANGE
:
'
change
'
,
DISPOSE
:
'
dispose
'
,
};
src/vs/base/test/browser/builder.test.ts
浏览文件 @
ef11e2d0
...
...
@@ -306,8 +306,6 @@ suite('Builder', () => {
divBuilder
.
span
({
innerHtml
:
'
see man
'
});
assert
.
strictEqual
(
divBuilder
.
parent
().
attr
(
'
id
'
),
'
foobar
'
);
});
test
(
'
Builder.clone()
'
,
function
()
{
...
...
@@ -390,7 +388,6 @@ suite('Builder', () => {
// Assert HTML through DOM
let
root
=
document
.
getElementById
(
fixtureId
);
assert
.
strictEqual
(
b
.
parent
().
getHTMLElement
(),
root
);
assert
.
strictEqual
(
root
.
childNodes
.
length
,
1
);
let
div
=
root
.
childNodes
[
0
];
...
...
@@ -551,21 +548,18 @@ suite('Builder', () => {
b
.
id
(
'
foobar
'
);
b
.
title
(
'
foobar
'
);
b
.
name
(
'
foobar
'
);
b
.
type
(
'
foobar
'
);
b
.
value
(
'
foobar
'
);
b
.
tabindex
(
0
);
assert
.
strictEqual
(
b
.
attr
(
'
id
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
attr
(
'
title
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
attr
(
'
name
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
attr
(
'
type
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
attr
(
'
value
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
attr
(
'
tabindex
'
),
'
0
'
);
assert
.
strictEqual
(
b
.
getHTMLElement
().
getAttribute
(
'
id
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
getHTMLElement
().
getAttribute
(
'
title
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
getHTMLElement
().
getAttribute
(
'
name
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
getHTMLElement
().
getAttribute
(
'
type
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
getHTMLElement
().
getAttribute
(
'
value
'
),
'
foobar
'
);
assert
.
strictEqual
(
b
.
getHTMLElement
().
getAttribute
(
'
tabindex
'
),
'
0
'
);
...
...
@@ -1382,4 +1376,4 @@ suite('Builder', () => {
assert
.
equal
((
<
HTMLElement
>
obj
.
firstChild
).
tagName
.
toLowerCase
(),
'
span
'
);
assert
.
equal
((
<
HTMLElement
>
obj
.
firstChild
).
className
,
'
core
'
);
});
});
\ No newline at end of file
});
src/vs/platform/files/common/files.ts
浏览文件 @
ef11e2d0
...
...
@@ -8,7 +8,6 @@ import { TPromise } from 'vs/base/common/winjs.base';
import
paths
=
require
(
'
vs/base/common/paths
'
);
import
URI
from
'
vs/base/common/uri
'
;
import
glob
=
require
(
'
vs/base/common/glob
'
);
import
events
=
require
(
'
vs/base/common/events
'
);
import
{
isLinux
}
from
'
vs/base/common/platform
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
Event
from
'
vs/base/common/event
'
;
...
...
@@ -245,12 +244,11 @@ export interface IFileChange {
resource
:
URI
;
}
export
class
FileChangesEvent
extends
events
.
Event
{
export
class
FileChangesEvent
{
private
_changes
:
IFileChange
[];
constructor
(
changes
:
IFileChange
[])
{
super
();
this
.
_changes
=
changes
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录