Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
202c2b69
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,体验更适合开发者的 AI 搜索 >>
提交
202c2b69
编写于
10月 17, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
let -> const
上级
f6397266
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
src/vs/workbench/api/node/extHostTypeConverters.ts
src/vs/workbench/api/node/extHostTypeConverters.ts
+13
-13
未找到文件。
src/vs/workbench/api/node/extHostTypeConverters.ts
浏览文件 @
202c2b69
...
...
@@ -42,14 +42,14 @@ export interface SelectionLike extends RangeLike {
export
namespace
Selection
{
export
function
to
(
selection
:
ISelection
):
types
.
Selection
{
le
t
{
selectionStartLineNumber
,
selectionStartColumn
,
positionLineNumber
,
positionColumn
}
=
selection
;
le
t
start
=
new
types
.
Position
(
selectionStartLineNumber
-
1
,
selectionStartColumn
-
1
);
le
t
end
=
new
types
.
Position
(
positionLineNumber
-
1
,
positionColumn
-
1
);
cons
t
{
selectionStartLineNumber
,
selectionStartColumn
,
positionLineNumber
,
positionColumn
}
=
selection
;
cons
t
start
=
new
types
.
Position
(
selectionStartLineNumber
-
1
,
selectionStartColumn
-
1
);
cons
t
end
=
new
types
.
Position
(
positionLineNumber
-
1
,
positionColumn
-
1
);
return
new
types
.
Selection
(
start
,
end
);
}
export
function
from
(
selection
:
SelectionLike
):
ISelection
{
le
t
{
anchor
,
active
}
=
selection
;
cons
t
{
anchor
,
active
}
=
selection
;
return
{
selectionStartLineNumber
:
anchor
.
line
+
1
,
selectionStartColumn
:
anchor
.
character
+
1
,
...
...
@@ -64,7 +64,7 @@ export namespace Range {
if
(
!
range
)
{
return
undefined
;
}
le
t
{
start
,
end
}
=
range
;
cons
t
{
start
,
end
}
=
range
;
return
{
startLineNumber
:
start
.
line
+
1
,
startColumn
:
start
.
character
+
1
,
...
...
@@ -77,7 +77,7 @@ export namespace Range {
if
(
!
range
)
{
return
undefined
;
}
le
t
{
startLineNumber
,
startColumn
,
endLineNumber
,
endColumn
}
=
range
;
cons
t
{
startLineNumber
,
startColumn
,
endLineNumber
,
endColumn
}
=
range
;
return
new
types
.
Range
(
startLineNumber
-
1
,
startColumn
-
1
,
endLineNumber
-
1
,
endColumn
-
1
);
}
}
...
...
@@ -263,7 +263,7 @@ export namespace TextEdit {
}
export
function
to
(
edit
:
modes
.
TextEdit
):
types
.
TextEdit
{
le
t
result
=
new
types
.
TextEdit
(
Range
.
to
(
edit
.
range
),
edit
.
text
);
cons
t
result
=
new
types
.
TextEdit
(
Range
.
to
(
edit
.
range
),
edit
.
text
);
result
.
newEol
=
EndOfLine
.
to
(
edit
.
eol
);
return
result
;
}
...
...
@@ -278,7 +278,7 @@ export namespace WorkspaceEdit {
const
[
uri
,
uriOrEdits
]
=
entry
;
if
(
Array
.
isArray
(
uriOrEdits
))
{
// text edits
le
t
doc
=
documents
?
documents
.
getDocument
(
uri
.
toString
())
:
undefined
;
cons
t
doc
=
documents
?
documents
.
getDocument
(
uri
.
toString
())
:
undefined
;
result
.
edits
.
push
(
<
ResourceTextEditDto
>
{
resource
:
uri
,
modelVersionId
:
doc
&&
doc
.
version
,
edits
:
uriOrEdits
.
map
(
TextEdit
.
from
)
});
}
else
{
// resource edits
...
...
@@ -344,7 +344,7 @@ export namespace SymbolKind {
}
export
function
to
(
kind
:
modes
.
SymbolKind
):
vscode
.
SymbolKind
{
for
(
le
t
k
in
_fromMapping
)
{
for
(
cons
t
k
in
_fromMapping
)
{
if
(
_fromMapping
[
k
]
===
kind
)
{
return
Number
(
k
);
}
...
...
@@ -374,7 +374,7 @@ export namespace WorkspaceSymbol {
export
namespace
DocumentSymbol
{
export
function
from
(
info
:
vscode
.
DocumentSymbol
):
modes
.
DocumentSymbol
{
le
t
result
:
modes
.
DocumentSymbol
=
{
cons
t
result
:
modes
.
DocumentSymbol
=
{
name
:
info
.
name
,
detail
:
info
.
detail
,
range
:
Range
.
from
(
info
.
range
),
...
...
@@ -387,7 +387,7 @@ export namespace DocumentSymbol {
return
result
;
}
export
function
to
(
info
:
modes
.
DocumentSymbol
):
vscode
.
DocumentSymbol
{
le
t
result
=
new
types
.
DocumentSymbol
(
cons
t
result
=
new
types
.
DocumentSymbol
(
info
.
name
,
info
.
detail
,
SymbolKind
.
to
(
info
.
kind
),
...
...
@@ -658,7 +658,7 @@ export namespace DocumentLink {
export
namespace
ColorPresentation
{
export
function
to
(
colorPresentation
:
modes
.
IColorPresentation
):
types
.
ColorPresentation
{
le
t
cp
=
new
types
.
ColorPresentation
(
colorPresentation
.
label
);
cons
t
cp
=
new
types
.
ColorPresentation
(
colorPresentation
.
label
);
if
(
colorPresentation
.
textEdit
)
{
cp
.
textEdit
=
TextEdit
.
to
(
colorPresentation
.
textEdit
);
}
...
...
@@ -736,7 +736,7 @@ export namespace ProgressLocation {
export
namespace
FoldingRange
{
export
function
from
(
r
:
vscode
.
FoldingRange
):
modes
.
FoldingRange
{
le
t
range
:
modes
.
FoldingRange
=
{
start
:
r
.
start
+
1
,
end
:
r
.
end
+
1
};
cons
t
range
:
modes
.
FoldingRange
=
{
start
:
r
.
start
+
1
,
end
:
r
.
end
+
1
};
if
(
r
.
kind
)
{
range
.
kind
=
FoldingRangeKind
.
from
(
r
.
kind
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录