Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
14fdf301
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
14fdf301
编写于
8月 03, 2021
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support settings openToSide and begin refactor
#123282
上级
6269995f
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
41 addition
and
26 deletion
+41
-26
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
...nch/contrib/extensions/browser/extensions.contribution.ts
+1
-1
src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.ts
...contrib/files/browser/editors/textFileSaveErrorHandler.ts
+1
-1
src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts
...workbench/contrib/notebook/browser/contrib/coreActions.ts
+1
-1
src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts
...h/contrib/preferences/browser/preferences.contribution.ts
+13
-7
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
.../workbench/contrib/preferences/browser/settingsEditor2.ts
+1
-1
src/vs/workbench/contrib/terminal/browser/terminalActions.ts
src/vs/workbench/contrib/terminal/browser/terminalActions.ts
+1
-1
src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
...vs/workbench/contrib/terminal/browser/terminalInstance.ts
+1
-1
src/vs/workbench/services/preferences/browser/preferencesService.ts
...kbench/services/preferences/browser/preferencesService.ts
+15
-11
src/vs/workbench/services/preferences/common/preferences.ts
src/vs/workbench/services/preferences/common/preferences.ts
+6
-1
src/vs/workbench/services/preferences/test/browser/preferencesService.test.ts
...vices/preferences/test/browser/preferencesService.test.ts
+1
-1
未找到文件。
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
浏览文件 @
14fdf301
...
@@ -1192,7 +1192,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
...
@@ -1192,7 +1192,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
group
:
'
2_configure
'
,
group
:
'
2_configure
'
,
when
:
ContextKeyExpr
.
and
(
ContextKeyExpr
.
equals
(
'
extensionStatus
'
,
'
installed
'
),
ContextKeyExpr
.
has
(
'
extensionHasConfiguration
'
))
when
:
ContextKeyExpr
.
and
(
ContextKeyExpr
.
equals
(
'
extensionStatus
'
,
'
installed
'
),
ContextKeyExpr
.
has
(
'
extensionHasConfiguration
'
))
},
},
run
:
async
(
accessor
:
ServicesAccessor
,
id
:
string
)
=>
accessor
.
get
(
IPreferencesService
).
openSettings
(
false
,
`@ext:
${
id
}
`
)
run
:
async
(
accessor
:
ServicesAccessor
,
id
:
string
)
=>
accessor
.
get
(
IPreferencesService
).
openSettings
(
{
jsonEditor
:
false
,
query
:
`@ext:
${
id
}
`
}
)
});
});
this
.
registerExtensionAction
({
this
.
registerExtensionAction
({
...
...
src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.ts
浏览文件 @
14fdf301
...
@@ -394,7 +394,7 @@ class ConfigureSaveConflictAction extends Action {
...
@@ -394,7 +394,7 @@ class ConfigureSaveConflictAction extends Action {
}
}
override
async
run
():
Promise
<
void
>
{
override
async
run
():
Promise
<
void
>
{
this
.
preferencesService
.
openSettings
(
undefined
,
'
files.saveConflictResolution
'
);
this
.
preferencesService
.
openSettings
(
{
query
:
'
files.saveConflictResolution
'
}
);
}
}
}
}
...
...
src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts
浏览文件 @
14fdf301
...
@@ -1955,7 +1955,7 @@ registerAction2(class NotebookConfigureLayoutAction extends Action2 {
...
@@ -1955,7 +1955,7 @@ registerAction2(class NotebookConfigureLayoutAction extends Action2 {
});
});
}
}
run
(
accessor
:
ServicesAccessor
):
void
{
run
(
accessor
:
ServicesAccessor
):
void
{
accessor
.
get
(
IPreferencesService
).
openSettings
(
false
,
'
@tag:notebookLayout
'
);
accessor
.
get
(
IPreferencesService
).
openSettings
(
{
jsonEditor
:
false
,
query
:
'
@tag:notebookLayout
'
}
);
}
}
});
});
...
...
src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts
浏览文件 @
14fdf301
...
@@ -120,6 +120,11 @@ const OPEN_SETTINGS2_ACTION_TITLE = { value: nls.localize('openSettings2', "Open
...
@@ -120,6 +120,11 @@ const OPEN_SETTINGS2_ACTION_TITLE = { value: nls.localize('openSettings2', "Open
const
category
=
{
value
:
nls
.
localize
(
'
preferences
'
,
"
Preferences
"
),
original
:
'
Preferences
'
};
const
category
=
{
value
:
nls
.
localize
(
'
preferences
'
,
"
Preferences
"
),
original
:
'
Preferences
'
};
interface
IOpenSettingsActionOptions
{
openToSide
?:
boolean
;
query
?:
string
;
}
class
PreferencesActionsContribution
extends
Disposable
implements
IWorkbenchContribution
{
class
PreferencesActionsContribution
extends
Disposable
implements
IWorkbenchContribution
{
constructor
(
constructor
(
...
@@ -158,9 +163,10 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
...
@@ -158,9 +163,10 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
}
}
});
});
}
}
run
(
accessor
:
ServicesAccessor
,
args
:
string
|
undefined
)
{
run
(
accessor
:
ServicesAccessor
,
args
:
string
|
IOpenSettingsActionOptions
)
{
const
query
=
typeof
args
===
'
string
'
?
args
:
undefined
;
// args takes a string for backcompat
return
accessor
.
get
(
IPreferencesService
).
openSettings
(
query
?
false
:
undefined
,
query
);
const
opts
=
typeof
args
===
'
string
'
?
{
query
:
args
}
:
args
;
return
accessor
.
get
(
IPreferencesService
).
openSettings
(
opts
);
}
}
});
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarPreferencesMenu
,
{
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarPreferencesMenu
,
{
...
@@ -181,7 +187,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
...
@@ -181,7 +187,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
});
});
}
}
run
(
accessor
:
ServicesAccessor
)
{
run
(
accessor
:
ServicesAccessor
)
{
return
accessor
.
get
(
IPreferencesService
).
openSettings
(
false
,
undefined
);
return
accessor
.
get
(
IPreferencesService
).
openSettings
(
{
jsonEditor
:
false
}
);
}
}
});
});
registerAction2
(
class
extends
Action2
{
registerAction2
(
class
extends
Action2
{
...
@@ -194,7 +200,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
...
@@ -194,7 +200,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
});
});
}
}
run
(
accessor
:
ServicesAccessor
)
{
run
(
accessor
:
ServicesAccessor
)
{
return
accessor
.
get
(
IPreferencesService
).
openSettings
(
true
,
undefined
);
return
accessor
.
get
(
IPreferencesService
).
openSettings
(
{
jsonEditor
:
true
}
);
}
}
});
});
registerAction2
(
class
extends
Action2
{
registerAction2
(
class
extends
Action2
{
...
@@ -406,7 +412,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
...
@@ -406,7 +412,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
if
(
editorPane
instanceof
SettingsEditor2
)
{
if
(
editorPane
instanceof
SettingsEditor2
)
{
editorPane
.
focusSearch
(
`@tag:usesOnlineServices`
);
editorPane
.
focusSearch
(
`@tag:usesOnlineServices`
);
}
else
{
}
else
{
accessor
.
get
(
IPreferencesService
).
openSettings
(
false
,
'
@tag:usesOnlineServices
'
);
accessor
.
get
(
IPreferencesService
).
openSettings
(
{
jsonEditor
:
false
,
query
:
'
@tag:usesOnlineServices
'
}
);
}
}
}
}
});
});
...
@@ -444,7 +450,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
...
@@ -444,7 +450,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
if
(
editorPane
instanceof
SettingsEditor2
)
{
if
(
editorPane
instanceof
SettingsEditor2
)
{
editorPane
.
focusSearch
(
'
@tag:telemetry
'
);
editorPane
.
focusSearch
(
'
@tag:telemetry
'
);
}
else
{
}
else
{
accessor
.
get
(
IPreferencesService
).
openSettings
(
false
,
'
@tag:telemetry
'
);
accessor
.
get
(
IPreferencesService
).
openSettings
(
{
jsonEditor
:
false
,
query
:
'
@tag:telemetry
'
}
);
}
}
}
}
});
});
...
...
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
浏览文件 @
14fdf301
...
@@ -46,7 +46,7 @@ import { settingsTextInputBorder } from 'vs/workbench/contrib/preferences/browse
...
@@ -46,7 +46,7 @@ import { settingsTextInputBorder } from 'vs/workbench/contrib/preferences/browse
import
{
createTOCIterator
,
TOCTree
,
TOCTreeModel
}
from
'
vs/workbench/contrib/preferences/browser/tocTree
'
;
import
{
createTOCIterator
,
TOCTree
,
TOCTreeModel
}
from
'
vs/workbench/contrib/preferences/browser/tocTree
'
;
import
{
CONTEXT_SETTINGS_EDITOR
,
CONTEXT_SETTINGS_ROW_FOCUS
,
CONTEXT_SETTINGS_SEARCH_FOCUS
,
CONTEXT_TOC_ROW_FOCUS
,
EXTENSION_SETTING_TAG
,
FEATURE_SETTING_TAG
,
ID_SETTING_TAG
,
IPreferencesSearchService
,
ISearchProvider
,
MODIFIED_SETTING_TAG
,
REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG
,
SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS
,
WORKSPACE_TRUST_SETTING_TAG
}
from
'
vs/workbench/contrib/preferences/common/preferences
'
;
import
{
CONTEXT_SETTINGS_EDITOR
,
CONTEXT_SETTINGS_ROW_FOCUS
,
CONTEXT_SETTINGS_SEARCH_FOCUS
,
CONTEXT_TOC_ROW_FOCUS
,
EXTENSION_SETTING_TAG
,
FEATURE_SETTING_TAG
,
ID_SETTING_TAG
,
IPreferencesSearchService
,
ISearchProvider
,
MODIFIED_SETTING_TAG
,
REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG
,
SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS
,
WORKSPACE_TRUST_SETTING_TAG
}
from
'
vs/workbench/contrib/preferences/common/preferences
'
;
import
{
IEditorGroup
,
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
IEditorGroup
,
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
validateSettingsEditorOptions
,
IPreferencesService
,
ISearchResult
,
ISettingsEditorModel
,
ISettingsEditorOptions
,
SettingValueType
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
IPreferencesService
,
ISearchResult
,
ISettingsEditorModel
,
ISettingsEditorOptions
,
SettingValueType
,
validateSettingsEditorOptions
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
SettingsEditor2Input
}
from
'
vs/workbench/services/preferences/common/preferencesEditorInput
'
;
import
{
SettingsEditor2Input
}
from
'
vs/workbench/services/preferences/common/preferencesEditorInput
'
;
import
{
Settings2EditorModel
}
from
'
vs/workbench/services/preferences/common/preferencesModels
'
;
import
{
Settings2EditorModel
}
from
'
vs/workbench/services/preferences/common/preferencesModels
'
;
import
{
IUserDataSyncWorkbenchService
}
from
'
vs/workbench/services/userDataSync/common/userDataSync
'
;
import
{
IUserDataSyncWorkbenchService
}
from
'
vs/workbench/services/userDataSync/common/userDataSync
'
;
...
...
src/vs/workbench/contrib/terminal/browser/terminalActions.ts
浏览文件 @
14fdf301
...
@@ -1789,7 +1789,7 @@ export function registerTerminalActions() {
...
@@ -1789,7 +1789,7 @@ export function registerTerminalActions() {
});
});
}
}
async
run
(
accessor
:
ServicesAccessor
)
{
async
run
(
accessor
:
ServicesAccessor
)
{
await
accessor
.
get
(
IPreferencesService
).
openSettings
(
false
,
'
@feature:terminal
'
);
await
accessor
.
get
(
IPreferencesService
).
openSettings
(
{
jsonEditor
:
false
,
query
:
'
@feature:terminal
'
}
);
}
}
});
});
...
...
src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
浏览文件 @
14fdf301
...
@@ -761,7 +761,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
...
@@ -761,7 +761,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
{
{
label
:
nls
.
localize
(
'
configureTerminalSettings
'
,
"
Configure Terminal Settings
"
),
label
:
nls
.
localize
(
'
configureTerminalSettings
'
,
"
Configure Terminal Settings
"
),
run
:
()
=>
{
run
:
()
=>
{
this
.
_preferencesService
.
openSettings
(
false
,
`@id:
${
TerminalSettingId
.
CommandsToSkipShell
}
,
${
TerminalSettingId
.
SendKeybindingsToShell
}
,
${
TerminalSettingId
.
AllowChords
}
`
);
this
.
_preferencesService
.
openSettings
(
{
jsonEditor
:
false
,
query
:
`@id:
${
TerminalSettingId
.
CommandsToSkipShell
}
,
${
TerminalSettingId
.
SendKeybindingsToShell
}
,
${
TerminalSettingId
.
AllowChords
}
`
}
);
}
}
}
as
IPromptChoice
}
as
IPromptChoice
]
]
...
...
src/vs/workbench/services/preferences/browser/preferencesService.ts
浏览文件 @
14fdf301
...
@@ -37,9 +37,9 @@ import { SideBySideEditorInput } from 'vs/workbench/common/editor/sideBySideEdit
...
@@ -37,9 +37,9 @@ import { SideBySideEditorInput } from 'vs/workbench/common/editor/sideBySideEdit
import
{
TextResourceEditorInput
}
from
'
vs/workbench/common/editor/textResourceEditorInput
'
;
import
{
TextResourceEditorInput
}
from
'
vs/workbench/common/editor/textResourceEditorInput
'
;
import
{
IJSONEditingService
}
from
'
vs/workbench/services/configuration/common/jsonEditing
'
;
import
{
IJSONEditingService
}
from
'
vs/workbench/services/configuration/common/jsonEditing
'
;
import
{
GroupDirection
,
IEditorGroup
,
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
GroupDirection
,
IEditorGroup
,
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IEditorService
,
SIDE_GROUP
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
KeybindingsEditorInput
}
from
'
vs/workbench/services/preferences/browser/keybindingsEditorInput
'
;
import
{
KeybindingsEditorInput
}
from
'
vs/workbench/services/preferences/browser/keybindingsEditorInput
'
;
import
{
DEFAULT_SETTINGS_EDITOR_SETTING
,
FOLDER_SETTINGS_PATH
,
IKeybindingsEditorOptions
,
IKeybindingsEditorPane
,
IPreferencesEditorModel
,
IPreferencesService
,
ISetting
,
ISettingsEditorOptions
,
USE_SPLIT_JSON_SETTING
,
validateSettingsEditorOptions
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
DEFAULT_SETTINGS_EDITOR_SETTING
,
FOLDER_SETTINGS_PATH
,
IKeybindingsEditorOptions
,
IKeybindingsEditorPane
,
I
OpenSettingsOptions
,
I
PreferencesEditorModel
,
IPreferencesService
,
ISetting
,
ISettingsEditorOptions
,
USE_SPLIT_JSON_SETTING
,
validateSettingsEditorOptions
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
SettingsEditor2Input
}
from
'
vs/workbench/services/preferences/common/preferencesEditorInput
'
;
import
{
SettingsEditor2Input
}
from
'
vs/workbench/services/preferences/common/preferencesEditorInput
'
;
import
{
defaultKeybindingsContents
,
DefaultKeybindingsEditorModel
,
DefaultRawSettingsEditorModel
,
DefaultSettings
,
DefaultSettingsEditorModel
,
Settings2EditorModel
,
SettingsEditorModel
,
WorkspaceConfigurationEditorModel
}
from
'
vs/workbench/services/preferences/common/preferencesModels
'
;
import
{
defaultKeybindingsContents
,
DefaultKeybindingsEditorModel
,
DefaultRawSettingsEditorModel
,
DefaultSettings
,
DefaultSettingsEditorModel
,
Settings2EditorModel
,
SettingsEditorModel
,
WorkspaceConfigurationEditorModel
}
from
'
vs/workbench/services/preferences/common/preferencesModels
'
;
import
{
IRemoteAgentService
}
from
'
vs/workbench/services/remote/common/remoteAgentService
'
;
import
{
IRemoteAgentService
}
from
'
vs/workbench/services/remote/common/remoteAgentService
'
;
...
@@ -201,25 +201,29 @@ export class PreferencesService extends Disposable implements IPreferencesServic
...
@@ -201,25 +201,29 @@ export class PreferencesService extends Disposable implements IPreferencesServic
return
this
.
editorService
.
openEditor
({
resource
:
this
.
userSettingsResource
});
return
this
.
editorService
.
openEditor
({
resource
:
this
.
userSettingsResource
});
}
}
openSettings
(
jsonEditor
:
boolean
|
undefined
,
query
:
string
|
undefined
):
Promise
<
IEditorPane
|
undefined
>
{
private
shouldOpenJsonByDefault
():
boolean
{
jsonEditor
=
typeof
jsonEditor
===
'
undefined
'
?
return
this
.
configurationService
.
getValue
(
'
workbench.settings.editor
'
)
===
'
json
'
;
this
.
configurationService
.
getValue
(
'
workbench.settings.editor
'
)
===
'
json
'
:
}
jsonEditor
;
openSettings
(
options
:
IOpenSettingsOptions
=
{}):
Promise
<
IEditorPane
|
undefined
>
{
if
(
typeof
options
.
jsonEditor
!==
'
boolean
'
)
{
options
.
jsonEditor
=
this
.
shouldOpenJsonByDefault
();
}
if
(
!
jsonEditor
)
{
if
(
!
options
.
jsonEditor
)
{
return
this
.
openSettings2
(
{
query
:
query
}
);
return
this
.
openSettings2
(
options
);
}
}
return
this
.
openSettingsJson
(
ConfigurationTarget
.
USER_LOCAL
,
this
.
userSettingsResource
,
{
query
:
query
}
);
return
this
.
openSettingsJson
(
ConfigurationTarget
.
USER_LOCAL
,
this
.
userSettingsResource
,
options
);
}
}
private
async
openSettings2
(
options
?:
I
SettingsEditor
Options
):
Promise
<
IEditorPane
>
{
private
async
openSettings2
(
options
?:
I
OpenSettings
Options
):
Promise
<
IEditorPane
>
{
const
input
=
this
.
settingsEditor2Input
;
const
input
=
this
.
settingsEditor2Input
;
options
=
{
options
=
{
...
options
,
...
options
,
focusSearch
:
true
focusSearch
:
true
};
};
await
this
.
editorService
.
openEditor
(
input
,
validateSettingsEditorOptions
(
options
));
await
this
.
editorService
.
openEditor
(
input
,
validateSettingsEditorOptions
(
options
)
,
options
.
openToSide
?
SIDE_GROUP
:
undefined
);
return
this
.
editorGroupService
.
activeGroup
.
activeEditorPane
!
;
return
this
.
editorGroupService
.
activeGroup
.
activeEditorPane
!
;
}
}
...
...
src/vs/workbench/services/preferences/common/preferences.ts
浏览文件 @
14fdf301
...
@@ -176,6 +176,11 @@ export interface ISettingsEditorOptions extends IEditorOptions {
...
@@ -176,6 +176,11 @@ export interface ISettingsEditorOptions extends IEditorOptions {
focusSearch
?:
boolean
;
focusSearch
?:
boolean
;
}
}
export
interface
IOpenSettingsOptions
extends
ISettingsEditorOptions
{
jsonEditor
?:
boolean
;
openToSide
?:
boolean
;
}
export
function
validateSettingsEditorOptions
(
options
:
ISettingsEditorOptions
):
ISettingsEditorOptions
{
export
function
validateSettingsEditorOptions
(
options
:
ISettingsEditorOptions
):
ISettingsEditorOptions
{
return
{
return
{
// Inherit provided options
// Inherit provided options
...
@@ -208,7 +213,7 @@ export interface IPreferencesService {
...
@@ -208,7 +213,7 @@ export interface IPreferencesService {
createSettings2EditorModel
():
Settings2EditorModel
;
// TODO
createSettings2EditorModel
():
Settings2EditorModel
;
// TODO
openRawDefaultSettings
():
Promise
<
IEditorPane
|
undefined
>
;
openRawDefaultSettings
():
Promise
<
IEditorPane
|
undefined
>
;
openSettings
(
jsonEditor
:
boolean
|
undefined
,
query
:
string
|
undefined
):
Promise
<
IEditorPane
|
undefined
>
;
openSettings
(
options
?:
IOpenSettingsOptions
):
Promise
<
IEditorPane
|
undefined
>
;
openGlobalSettings
(
jsonEditor
?:
boolean
,
options
?:
ISettingsEditorOptions
,
group
?:
IEditorGroup
):
Promise
<
IEditorPane
|
undefined
>
;
openGlobalSettings
(
jsonEditor
?:
boolean
,
options
?:
ISettingsEditorOptions
,
group
?:
IEditorGroup
):
Promise
<
IEditorPane
|
undefined
>
;
openRemoteSettings
():
Promise
<
IEditorPane
|
undefined
>
;
openRemoteSettings
():
Promise
<
IEditorPane
|
undefined
>
;
openWorkspaceSettings
(
jsonEditor
?:
boolean
,
options
?:
ISettingsEditorOptions
,
group
?:
IEditorGroup
):
Promise
<
IEditorPane
|
undefined
>
;
openWorkspaceSettings
(
jsonEditor
?:
boolean
,
options
?:
ISettingsEditorOptions
,
group
?:
IEditorGroup
):
Promise
<
IEditorPane
|
undefined
>
;
...
...
src/vs/workbench/services/preferences/test/browser/preferencesService.test.ts
浏览文件 @
14fdf301
...
@@ -41,7 +41,7 @@ suite('PreferencesService', () => {
...
@@ -41,7 +41,7 @@ suite('PreferencesService', () => {
});
});
test
(
'
options are preserved when calling openEditor
'
,
async
()
=>
{
test
(
'
options are preserved when calling openEditor
'
,
async
()
=>
{
testObject
.
openSettings
(
false
,
'
test query
'
);
testObject
.
openSettings
(
{
jsonEditor
:
false
,
query
:
'
test query
'
}
);
const
options
=
editorService
.
lastOpenEditorOptions
as
ISettingsEditorOptions
;
const
options
=
editorService
.
lastOpenEditorOptions
as
ISettingsEditorOptions
;
assert
.
strictEqual
(
options
.
focusSearch
,
true
);
assert
.
strictEqual
(
options
.
focusSearch
,
true
);
assert
.
strictEqual
(
options
.
override
,
EditorResolution
.
DISABLED
);
assert
.
strictEqual
(
options
.
override
,
EditorResolution
.
DISABLED
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录