Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
03cd68f8
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,发现更多精彩内容 >>
未验证
提交
03cd68f8
编写于
8月 30, 2020
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes #104898
上级
936211bb
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
3 addition
and
17 deletion
+3
-17
src/vs/base/common/arrays.ts
src/vs/base/common/arrays.ts
+0
-11
src/vs/editor/common/modes/tokenizationRegistry.ts
src/vs/editor/common/modes/tokenizationRegistry.ts
+1
-2
src/vs/platform/contextkey/browser/contextKeyService.ts
src/vs/platform/contextkey/browser/contextKeyService.ts
+1
-2
src/vs/workbench/services/extensions/common/extensionsRegistry.ts
...orkbench/services/extensions/common/extensionsRegistry.ts
+1
-2
未找到文件。
src/vs/base/common/arrays.ts
浏览文件 @
03cd68f8
...
@@ -590,17 +590,6 @@ export function asArray<T>(x: T | T[]): T[] {
...
@@ -590,17 +590,6 @@ export function asArray<T>(x: T | T[]): T[] {
return
Array
.
isArray
(
x
)
?
x
:
[
x
];
return
Array
.
isArray
(
x
)
?
x
:
[
x
];
}
}
/**
* @deprecated Use `Array.from` or `[...iter]`
*/
export
function
toArray
<
T
>
(
iterable
:
IterableIterator
<
T
>
):
T
[]
{
const
result
:
T
[]
=
[];
for
(
let
element
of
iterable
)
{
result
.
push
(
element
);
}
return
result
;
}
export
function
getRandomElement
<
T
>
(
arr
:
T
[]):
T
|
undefined
{
export
function
getRandomElement
<
T
>
(
arr
:
T
[]):
T
|
undefined
{
return
arr
[
Math
.
floor
(
Math
.
random
()
*
arr
.
length
)];
return
arr
[
Math
.
floor
(
Math
.
random
()
*
arr
.
length
)];
}
}
src/vs/editor/common/modes/tokenizationRegistry.ts
浏览文件 @
03cd68f8
...
@@ -7,7 +7,6 @@ import { Color } from 'vs/base/common/color';
...
@@ -7,7 +7,6 @@ import { Color } from 'vs/base/common/color';
import
{
Emitter
,
Event
}
from
'
vs/base/common/event
'
;
import
{
Emitter
,
Event
}
from
'
vs/base/common/event
'
;
import
{
IDisposable
,
toDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IDisposable
,
toDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
ColorId
,
ITokenizationRegistry
,
ITokenizationSupport
,
ITokenizationSupportChangedEvent
}
from
'
vs/editor/common/modes
'
;
import
{
ColorId
,
ITokenizationRegistry
,
ITokenizationSupport
,
ITokenizationSupportChangedEvent
}
from
'
vs/editor/common/modes
'
;
import
{
toArray
}
from
'
vs/base/common/arrays
'
;
export
class
TokenizationRegistryImpl
implements
ITokenizationRegistry
{
export
class
TokenizationRegistryImpl
implements
ITokenizationRegistry
{
...
@@ -82,7 +81,7 @@ export class TokenizationRegistryImpl implements ITokenizationRegistry {
...
@@ -82,7 +81,7 @@ export class TokenizationRegistryImpl implements ITokenizationRegistry {
public
setColorMap
(
colorMap
:
Color
[]):
void
{
public
setColorMap
(
colorMap
:
Color
[]):
void
{
this
.
_colorMap
=
colorMap
;
this
.
_colorMap
=
colorMap
;
this
.
_onDidChange
.
fire
({
this
.
_onDidChange
.
fire
({
changedLanguages
:
toArray
(
this
.
_map
.
keys
()),
changedLanguages
:
Array
.
from
(
this
.
_map
.
keys
()),
changedColorMap
:
true
changedColorMap
:
true
});
});
}
}
...
...
src/vs/platform/contextkey/browser/contextKeyService.ts
浏览文件 @
03cd68f8
...
@@ -9,7 +9,6 @@ import { CommandsRegistry } from 'vs/platform/commands/common/commands';
...
@@ -9,7 +9,6 @@ import { CommandsRegistry } from 'vs/platform/commands/common/commands';
import
{
ConfigurationTarget
,
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ConfigurationTarget
,
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IContext
,
IContextKey
,
IContextKeyChangeEvent
,
IContextKeyService
,
IContextKeyServiceTarget
,
IReadableSet
,
SET_CONTEXT_COMMAND_ID
,
ContextKeyExpression
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IContext
,
IContextKey
,
IContextKeyChangeEvent
,
IContextKeyService
,
IContextKeyServiceTarget
,
IReadableSet
,
SET_CONTEXT_COMMAND_ID
,
ContextKeyExpression
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
KeybindingResolver
}
from
'
vs/platform/keybinding/common/keybindingResolver
'
;
import
{
KeybindingResolver
}
from
'
vs/platform/keybinding/common/keybindingResolver
'
;
import
{
toArray
}
from
'
vs/base/common/arrays
'
;
const
KEYBINDING_CONTEXT_ATTR
=
'
data-keybinding-context
'
;
const
KEYBINDING_CONTEXT_ATTR
=
'
data-keybinding-context
'
;
...
@@ -102,7 +101,7 @@ class ConfigAwareContextValuesContainer extends Context {
...
@@ -102,7 +101,7 @@ class ConfigAwareContextValuesContainer extends Context {
this
.
_listener
=
this
.
_configurationService
.
onDidChangeConfiguration
(
event
=>
{
this
.
_listener
=
this
.
_configurationService
.
onDidChangeConfiguration
(
event
=>
{
if
(
event
.
source
===
ConfigurationTarget
.
DEFAULT
)
{
if
(
event
.
source
===
ConfigurationTarget
.
DEFAULT
)
{
// new setting, reset everything
// new setting, reset everything
const
allKeys
=
toArray
(
this
.
_values
.
keys
());
const
allKeys
=
Array
.
from
(
this
.
_values
.
keys
());
this
.
_values
.
clear
();
this
.
_values
.
clear
();
emitter
.
fire
(
new
ArrayContextKeyChangeEvent
(
allKeys
));
emitter
.
fire
(
new
ArrayContextKeyChangeEvent
(
allKeys
));
}
else
{
}
else
{
...
...
src/vs/workbench/services/extensions/common/extensionsRegistry.ts
浏览文件 @
03cd68f8
...
@@ -12,7 +12,6 @@ import { Extensions, IJSONContributionRegistry } from 'vs/platform/jsonschemas/c
...
@@ -12,7 +12,6 @@ import { Extensions, IJSONContributionRegistry } from 'vs/platform/jsonschemas/c
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
IMessage
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
IMessage
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
ExtensionIdentifier
,
IExtensionDescription
,
EXTENSION_CATEGORIES
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
ExtensionIdentifier
,
IExtensionDescription
,
EXTENSION_CATEGORIES
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
toArray
}
from
'
vs/base/common/arrays
'
;
const
schemaRegistry
=
Registry
.
as
<
IJSONContributionRegistry
>
(
Extensions
.
JSONContribution
);
const
schemaRegistry
=
Registry
.
as
<
IJSONContributionRegistry
>
(
Extensions
.
JSONContribution
);
export
type
ExtensionKind
=
'
workspace
'
|
'
ui
'
|
undefined
;
export
type
ExtensionKind
=
'
workspace
'
|
'
ui
'
|
undefined
;
...
@@ -446,7 +445,7 @@ export class ExtensionsRegistryImpl {
...
@@ -446,7 +445,7 @@ export class ExtensionsRegistryImpl {
}
}
public
getExtensionPoints
():
ExtensionPoint
<
any
>
[]
{
public
getExtensionPoints
():
ExtensionPoint
<
any
>
[]
{
return
toArray
(
this
.
_extensionPoints
.
values
());
return
Array
.
from
(
this
.
_extensionPoints
.
values
());
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录