Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8a796190
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,发现更多精彩内容 >>
提交
8a796190
编写于
5月 01, 2020
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - use more native es6, less polyfil utils
上级
f60103dc
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
11 addition
and
17 deletion
+11
-17
src/vs/editor/contrib/snippet/snippetController2.ts
src/vs/editor/contrib/snippet/snippetController2.ts
+1
-2
src/vs/platform/commands/common/commands.ts
src/vs/platform/commands/common/commands.ts
+1
-2
src/vs/workbench/api/common/extHostRequireInterceptor.ts
src/vs/workbench/api/common/extHostRequireInterceptor.ts
+1
-2
src/vs/workbench/api/worker/extHostExtensionService.ts
src/vs/workbench/api/worker/extHostExtensionService.ts
+1
-2
src/vs/workbench/contrib/performance/electron-browser/perfviewEditor.ts
...ch/contrib/performance/electron-browser/perfviewEditor.ts
+4
-5
src/vs/workbench/contrib/snippets/browser/snippetsService.ts
src/vs/workbench/contrib/snippets/browser/snippetsService.ts
+2
-2
src/vs/workbench/contrib/snippets/browser/tabCompletion.ts
src/vs/workbench/contrib/snippets/browser/tabCompletion.ts
+1
-2
未找到文件。
src/vs/editor/contrib/snippet/snippetController2.ts
浏览文件 @
8a796190
...
...
@@ -5,7 +5,6 @@
import
{
KeyCode
,
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
{
dispose
,
DisposableStore
}
from
'
vs/base/common/lifecycle
'
;
import
{
repeat
}
from
'
vs/base/common/strings
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
EditorCommand
,
registerEditorCommand
,
registerEditorContribution
}
from
'
vs/editor/browser/editorExtensions
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
...
...
@@ -191,7 +190,7 @@ export class SnippetController2 implements IEditorContribution {
insertText
:
option
.
value
,
// insertText: `\${1|${after.concat(before).join(',')}|}$0`,
// snippetType: 'textmate',
sortText
:
repeat
(
'
a
'
,
i
+
1
),
sortText
:
'
a
'
.
repeat
(
i
+
1
),
range
:
Range
.
fromPositions
(
this
.
_editor
.
getPosition
()
!
,
this
.
_editor
.
getPosition
()
!
.
delta
(
0
,
first
.
value
.
length
))
};
}));
...
...
src/vs/platform/commands/common/commands.ts
浏览文件 @
8a796190
...
...
@@ -9,7 +9,6 @@ import { ServicesAccessor, createDecorator } from 'vs/platform/instantiation/com
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
LinkedList
}
from
'
vs/base/common/linkedList
'
;
import
{
IJSONSchema
}
from
'
vs/base/common/jsonSchema
'
;
import
{
keys
}
from
'
vs/base/common/map
'
;
import
{
Iterable
}
from
'
vs/base/common/iterator
'
;
export
const
ICommandService
=
createDecorator
<
ICommandService
>
(
'
commandService
'
);
...
...
@@ -130,7 +129,7 @@ export const CommandsRegistry: ICommandRegistry = new class implements ICommandR
getCommands
():
ICommandsMap
{
const
result
=
new
Map
<
string
,
ICommand
>
();
for
(
const
key
of
keys
(
this
.
_commands
))
{
for
(
const
key
of
this
.
_commands
.
keys
(
))
{
const
command
=
this
.
getCommand
(
key
);
if
(
command
)
{
result
.
set
(
key
,
command
);
...
...
src/vs/workbench/api/common/extHostRequireInterceptor.ts
浏览文件 @
8a796190
...
...
@@ -11,7 +11,6 @@ import { nullExtensionDescription } from 'vs/workbench/services/extensions/commo
import
{
ExtensionDescriptionRegistry
}
from
'
vs/workbench/services/extensions/common/extensionDescriptionRegistry
'
;
import
*
as
vscode
from
'
vscode
'
;
import
{
ExtensionIdentifier
,
IExtensionDescription
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
endsWith
}
from
'
vs/base/common/strings
'
;
import
{
IExtensionApiFactory
}
from
'
vs/workbench/api/common/extHost.api.impl
'
;
import
{
IExtHostRpcService
}
from
'
vs/workbench/api/common/extHostRpcService
'
;
import
{
IExtHostInitDataService
}
from
'
vs/workbench/api/common/extHostInitDataService
'
;
...
...
@@ -192,7 +191,7 @@ class KeytarNodeModuleFactory implements INodeModuleFactory {
return
undefined
;
}
const
sep
=
length
-
7
;
if
((
name
.
charAt
(
sep
)
===
'
/
'
||
name
.
charAt
(
sep
)
===
'
\\
'
)
&&
endsWith
(
name
,
'
keytar
'
))
{
if
((
name
.
charAt
(
sep
)
===
'
/
'
||
name
.
charAt
(
sep
)
===
'
\\
'
)
&&
name
.
endsWith
(
'
keytar
'
))
{
name
=
name
.
replace
(
/
\\
/g
,
'
/
'
);
if
(
this
.
alternativeNames
.
has
(
name
))
{
return
'
keytar
'
;
...
...
src/vs/workbench/api/worker/extHostExtensionService.ts
浏览文件 @
8a796190
...
...
@@ -6,7 +6,6 @@
import
{
createApiFactoryAndRegisterActors
}
from
'
vs/workbench/api/common/extHost.api.impl
'
;
import
{
ExtensionActivationTimesBuilder
}
from
'
vs/workbench/api/common/extHostExtensionActivator
'
;
import
{
AbstractExtHostExtensionService
}
from
'
vs/workbench/api/common/extHostExtensionService
'
;
import
{
endsWith
}
from
'
vs/base/common/strings
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
RequireInterceptor
}
from
'
vs/workbench/api/common/extHostRequireInterceptor
'
;
...
...
@@ -79,5 +78,5 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
}
function
ensureSuffix
(
path
:
string
,
suffix
:
string
):
string
{
return
endsWith
(
path
,
suffix
)
?
path
:
path
+
suffix
;
return
path
.
endsWith
(
suffix
)
?
path
:
path
+
suffix
;
}
src/vs/workbench/contrib/performance/electron-browser/perfviewEditor.ts
浏览文件 @
8a796190
...
...
@@ -13,7 +13,6 @@ import { IModeService } from 'vs/editor/common/services/modeService';
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
ITimerService
,
IStartupMetrics
}
from
'
vs/workbench/services/timer/electron-browser/timerService
'
;
import
{
repeat
}
from
'
vs/base/common/strings
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
*
as
perf
from
'
vs/base/common/performance
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
...
...
@@ -377,7 +376,7 @@ class MarkdownBuilder {
value
:
string
=
''
;
heading
(
level
:
number
,
value
:
string
):
this
{
this
.
value
+=
`
${
repeat
(
'
#
'
,
level
)}
${
value
}
\n\n`
;
this
.
value
+=
`
${
'
#
'
.
repeat
(
level
)}
${
value
}
\n\n`
;
return
this
;
}
...
...
@@ -407,16 +406,16 @@ class MarkdownBuilder {
});
// header
header
.
forEach
((
cell
,
ci
)
=>
{
this
.
value
+=
`|
${
cell
+
repeat
(
'
'
,
lengths
[
ci
]
-
cell
.
toString
().
length
)}
`
;
});
header
.
forEach
((
cell
,
ci
)
=>
{
this
.
value
+=
`|
${
cell
+
'
'
.
repeat
(
lengths
[
ci
]
-
cell
.
toString
().
length
)}
`
;
});
this
.
value
+=
'
|
\n
'
;
header
.
forEach
((
_cell
,
ci
)
=>
{
this
.
value
+=
`|
${
repeat
(
'
-
'
,
lengths
[
ci
])}
`
;
});
header
.
forEach
((
_cell
,
ci
)
=>
{
this
.
value
+=
`|
${
'
-
'
.
repeat
(
lengths
[
ci
])}
`
;
});
this
.
value
+=
'
|
\n
'
;
// cells
rows
.
forEach
(
row
=>
{
row
.
forEach
((
cell
,
ci
)
=>
{
if
(
typeof
cell
!==
'
undefined
'
)
{
this
.
value
+=
`|
${
cell
+
repeat
(
'
'
,
lengths
[
ci
]
-
cell
.
toString
().
length
)}
`
;
this
.
value
+=
`|
${
cell
+
'
'
.
repeat
(
lengths
[
ci
]
-
cell
.
toString
().
length
)}
`
;
}
});
this
.
value
+=
'
|
\n
'
;
...
...
src/vs/workbench/contrib/snippets/browser/snippetsService.ts
浏览文件 @
8a796190
...
...
@@ -6,7 +6,7 @@
import
{
IJSONSchema
}
from
'
vs/base/common/jsonSchema
'
;
import
{
combinedDisposable
,
IDisposable
,
DisposableStore
}
from
'
vs/base/common/lifecycle
'
;
import
*
as
resources
from
'
vs/base/common/resources
'
;
import
{
endsWith
,
isFalsyOrWhitespace
}
from
'
vs/base/common/strings
'
;
import
{
isFalsyOrWhitespace
}
from
'
vs/base/common/strings
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
{
LanguageId
}
from
'
vs/editor/common/modes
'
;
...
...
@@ -49,7 +49,7 @@ namespace snippetExt {
return
null
;
}
if
(
isFalsyOrWhitespace
(
snippet
.
language
)
&&
!
endsWith
(
snippet
.
path
,
'
.code-snippets
'
))
{
if
(
isFalsyOrWhitespace
(
snippet
.
language
)
&&
!
snippet
.
path
.
endsWith
(
'
.code-snippets
'
))
{
extension
.
collector
.
error
(
localize
(
'
invalid.language.0
'
,
"
When omitting the language, the value of `contributes.{0}.path` must be a `.code-snippets`-file. Provided value: {1}
"
,
...
...
src/vs/workbench/contrib/snippets/browser/tabCompletion.ts
浏览文件 @
8a796190
...
...
@@ -8,7 +8,6 @@ import { RawContextKey, IContextKeyService, ContextKeyExpr, IContextKey } from '
import
{
KeybindingWeight
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
ISnippetsService
}
from
'
./snippets.contribution
'
;
import
{
getNonWhitespacePrefix
}
from
'
./snippetsService
'
;
import
{
endsWith
}
from
'
vs/base/common/strings
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IEditorContribution
}
from
'
vs/editor/common/editorCommon
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
...
...
@@ -97,7 +96,7 @@ export class TabCompletionController implements IEditorContribution {
const
prefix
=
getNonWhitespacePrefix
(
model
,
selection
.
getPosition
());
if
(
prefix
)
{
for
(
const
snippet
of
snippets
)
{
if
(
endsWith
(
prefix
,
snippet
.
prefix
))
{
if
(
prefix
.
endsWith
(
snippet
.
prefix
))
{
this
.
_activeSnippets
.
push
(
snippet
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录