Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3892edb3
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 搜索 >>
提交
3892edb3
编写于
7月 12, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move userSettings down to base
fixes #7453
上级
7ae43bd9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
13 deletion
+12
-13
src/vs/base/node/userSettings.ts
src/vs/base/node/userSettings.ts
+10
-11
src/vs/code/electron-main/settings.ts
src/vs/code/electron-main/settings.ts
+1
-1
src/vs/platform/extensionManagement/node/extensionManagementService.ts
...rm/extensionManagement/node/extensionManagementService.ts
+1
-1
未找到文件。
src/vs/
workbench
/node/userSettings.ts
→
src/vs/
base
/node/userSettings.ts
浏览文件 @
3892edb3
...
...
@@ -6,11 +6,10 @@
'
use strict
'
;
import
fs
=
require
(
'
fs
'
);
import
path
=
require
(
'
path
'
);
import
json
=
require
(
'
vs/base/common/json
'
);
import
objects
=
require
(
'
vs/base/common/objects
'
);
import
*
as
fs
from
'
fs
'
;
import
*
as
path
from
'
path
'
;
import
*
as
json
from
'
vs/base/common/json
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
...
...
@@ -24,7 +23,7 @@ export class UserSettings {
private
static
CHANGE_BUFFER_DELAY
=
300
;
public
globalSettings
:
ISettings
;
globalSettings
:
ISettings
;
private
timeoutHandle
:
number
;
private
watcher
:
fs
.
FSWatcher
;
...
...
@@ -41,7 +40,7 @@ export class UserSettings {
this
.
registerWatchers
();
}
public
static
getValue
(
userDataPath
:
string
,
key
:
string
,
fallback
?:
any
):
TPromise
<
any
>
{
static
getValue
(
userDataPath
:
string
,
key
:
string
,
fallback
?:
any
):
TPromise
<
any
>
{
// TODO@joao cleanup!
const
appSettingsPath
=
path
.
join
(
userDataPath
,
'
User
'
,
'
settings.json
'
);
...
...
@@ -66,11 +65,11 @@ export class UserSettings {
});
}
public
get
onChange
():
Event
<
ISettings
>
{
get
onChange
():
Event
<
ISettings
>
{
return
this
.
_onChange
.
event
;
}
public
getValue
(
key
:
string
,
fallback
?:
any
):
any
{
getValue
(
key
:
string
,
fallback
?:
any
):
any
{
return
UserSettings
.
doGetValue
(
this
.
globalSettings
.
settings
,
key
,
fallback
);
}
...
...
@@ -116,7 +115,7 @@ export class UserSettings {
},
UserSettings
.
CHANGE_BUFFER_DELAY
);
}
public
loadSync
():
boolean
{
loadSync
():
boolean
{
let
loadedSettings
=
this
.
doLoadSync
();
if
(
!
objects
.
equals
(
loadedSettings
,
this
.
globalSettings
))
{
...
...
@@ -199,7 +198,7 @@ export class UserSettings {
return
[];
}
public
dispose
():
void
{
dispose
():
void
{
if
(
this
.
watcher
)
{
this
.
watcher
.
close
();
this
.
watcher
=
null
;
...
...
src/vs/code/electron-main/settings.ts
浏览文件 @
3892edb3
...
...
@@ -7,7 +7,7 @@
import
{
app
}
from
'
electron
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
UserSettings
,
ISettings
}
from
'
vs/
workbench
/node/userSettings
'
;
import
{
UserSettings
,
ISettings
}
from
'
vs/
base
/node/userSettings
'
;
import
{
IEnvironmentService
}
from
'
vs/code/electron-main/env
'
;
import
Event
from
'
vs/base/common/event
'
;
...
...
src/vs/platform/extensionManagement/node/extensionManagementService.ts
浏览文件 @
3892edb3
...
...
@@ -21,7 +21,7 @@ import { getProxyAgent } from 'vs/base/node/proxy';
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
Limiter
}
from
'
vs/base/common/async
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
UserSettings
}
from
'
vs/
workbench
/node/userSettings
'
;
import
{
UserSettings
}
from
'
vs/
base
/node/userSettings
'
;
import
*
as
semver
from
'
semver
'
;
import
{
groupBy
,
values
}
from
'
vs/base/common/collections
'
;
import
{
isValidExtensionVersion
}
from
'
vs/platform/extensions/node/extensionValidator
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录