Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
463f104b
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,发现更多精彩内容 >>
提交
463f104b
编写于
4月 20, 2019
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix up settings "modified in" label
上级
50c9a782
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
10 deletion
+23
-10
src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts
...rkbench/contrib/preferences/browser/settingsTreeModels.ts
+18
-5
src/vs/workbench/contrib/preferences/electron-browser/settingsEditor2.ts
...h/contrib/preferences/electron-browser/settingsEditor2.ts
+5
-5
未找到文件。
src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts
浏览文件 @
463f104b
...
...
@@ -12,8 +12,8 @@ import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configur
import
{
ConfigurationScope
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
SettingsTarget
}
from
'
vs/workbench/contrib/preferences/browser/preferencesWidgets
'
;
import
{
ITOCEntry
,
knownAcronyms
}
from
'
vs/workbench/contrib/preferences/browser/settingsLayout
'
;
import
{
IExtensionSetting
,
ISearchResult
,
ISetting
,
SettingValueType
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
MODIFIED_SETTING_TAG
}
from
'
vs/workbench/contrib/preferences/common/preferences
'
;
import
{
IExtensionSetting
,
ISearchResult
,
ISetting
,
SettingValueType
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
export
const
ONLINE_SERVICES_SETTING_TAG
=
'
usesOnlineServices
'
;
...
...
@@ -142,11 +142,15 @@ export class SettingsTreeSettingElement extends SettingsTreeElement {
const
displayValue
=
isConfigured
?
inspected
[
targetSelector
]
:
inspected
.
default
;
const
overriddenScopeList
:
string
[]
=
[];
if
(
targetSelector
===
'
user
'
&&
typeof
inspected
.
workspace
!==
'
undefined
'
)
{
if
(
targetSelector
!==
'
workspace
'
&&
typeof
inspected
.
workspace
!==
'
undefined
'
)
{
overriddenScopeList
.
push
(
localize
(
'
workspace
'
,
"
Workspace
"
));
}
if
(
targetSelector
===
'
workspace
'
&&
typeof
inspected
.
user
!==
'
undefined
'
)
{
if
(
targetSelector
!==
'
userRemote
'
&&
typeof
inspected
.
userRemote
!==
'
undefined
'
)
{
overriddenScopeList
.
push
(
localize
(
'
remote
'
,
"
Remote
"
));
}
if
(
targetSelector
!==
'
userLocal
'
&&
typeof
inspected
.
userLocal
!==
'
undefined
'
)
{
overriddenScopeList
.
push
(
localize
(
'
user
'
,
"
User
"
));
}
...
...
@@ -354,8 +358,17 @@ export class SettingsTreeModel {
interface
IInspectResult
{
isConfigured
:
boolean
;
inspected
:
any
;
targetSelector
:
string
;
inspected
:
{
default
:
any
,
user
:
any
,
userLocal
?:
any
,
userRemote
?:
any
,
workspace
?:
any
,
workspaceFolder
?:
any
,
memory
?:
any
,
value
:
any
,
};
targetSelector
:
'
userLocal
'
|
'
userRemote
'
|
'
workspace
'
|
'
workspaceFolder
'
;
}
function
inspectSetting
(
key
:
string
,
target
:
SettingsTarget
,
configurationService
:
IConfigurationService
):
IInspectResult
{
...
...
src/vs/workbench/contrib/preferences/electron-browser/settingsEditor2.ts
浏览文件 @
463f104b
...
...
@@ -16,7 +16,7 @@ import { isArray, withNullAsUndefined } from 'vs/base/common/types';
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
'
vs/css!./media/settingsEditor2
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
ConfigurationTarget
,
ConfigurationTargetToString
,
IConfigurationOverrides
,
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ConfigurationTarget
,
IConfigurationOverrides
,
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IContextKey
,
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
...
...
@@ -36,7 +36,7 @@ import { AbstractSettingRenderer, ISettingLinkClickEvent, ISettingOverrideClickE
import
{
ISettingsEditorViewState
,
parseQuery
,
SearchResultIdx
,
SearchResultModel
,
SettingsTreeElement
,
SettingsTreeGroupChild
,
SettingsTreeGroupElement
,
SettingsTreeModel
,
SettingsTreeSettingElement
}
from
'
vs/workbench/contrib/preferences/browser/settingsTreeModels
'
;
import
{
settingsTextInputBorder
}
from
'
vs/workbench/contrib/preferences/browser/settingsWidgets
'
;
import
{
createTOCIterator
,
TOCTree
,
TOCTreeModel
}
from
'
vs/workbench/contrib/preferences/browser/tocTree
'
;
import
{
CONTEXT_SETTINGS_EDITOR
,
CONTEXT_SETTINGS_SEARCH_FOCUS
,
CONTEXT_TOC_ROW_FOCUS
,
IPreferencesSearchService
,
ISearchProvider
,
MODIFIED_SETTING_TAG
,
EXTENSION
_SETTING_TAG
,
SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU
}
from
'
vs/workbench/contrib/preferences/common/preferences
'
;
import
{
CONTEXT_SETTINGS_EDITOR
,
CONTEXT_SETTINGS_SEARCH_FOCUS
,
CONTEXT_TOC_ROW_FOCUS
,
EXTENSION_SETTING_TAG
,
IPreferencesSearchService
,
ISearchProvider
,
MODIFIED
_SETTING_TAG
,
SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU
}
from
'
vs/workbench/contrib/preferences/common/preferences
'
;
import
{
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
IPreferencesService
,
ISearchResult
,
ISettingsEditorModel
,
ISettingsEditorOptions
,
SettingsEditorOptions
,
SettingValueType
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
SettingsEditor2Input
}
from
'
vs/workbench/services/preferences/common/preferencesEditorInput
'
;
...
...
@@ -616,11 +616,11 @@ export class SettingsEditor2 extends BaseEditor {
this
.
settingsTree
.
reveal
(
element
);
}));
this
.
_register
(
this
.
settingRenderers
.
onDidClickOverrideElement
((
element
:
ISettingOverrideClickEvent
)
=>
{
if
(
ConfigurationTargetToString
(
ConfigurationTarget
.
WORKSPACE
)
===
element
.
scope
.
toUpperCase
()
)
{
if
(
element
.
scope
.
toLowerCase
()
===
'
workspace
'
)
{
this
.
settingsTargetsWidget
.
updateTarget
(
ConfigurationTarget
.
WORKSPACE
);
}
else
if
(
ConfigurationTargetToString
(
ConfigurationTarget
.
USER_LOCAL
)
===
element
.
scope
.
toUpperCase
()
)
{
}
else
if
(
element
.
scope
.
toLowerCase
()
===
'
user
'
)
{
this
.
settingsTargetsWidget
.
updateTarget
(
ConfigurationTarget
.
USER_LOCAL
);
}
else
if
(
ConfigurationTargetToString
(
ConfigurationTarget
.
USER_REMOTE
)
===
element
.
scope
.
toUpperCase
()
)
{
}
else
if
(
element
.
scope
.
toLowerCase
()
===
'
remote
'
)
{
this
.
settingsTargetsWidget
.
updateTarget
(
ConfigurationTarget
.
USER_REMOTE
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录