Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b3787fb1
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,发现更多精彩内容 >>
提交
b3787fb1
编写于
3月 16, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
quick access - some cleanup
上级
89906c07
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
185 addition
and
183 deletion
+185
-183
src/vs/editor/contrib/quickAccess/commandsQuickAccess.ts
src/vs/editor/contrib/quickAccess/commandsQuickAccess.ts
+1
-1
src/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.ts
...lone/browser/quickAccess/standaloneCommandsQuickAccess.ts
+1
-1
src/vs/platform/quickinput/browser/commandsQuickAccess.ts
src/vs/platform/quickinput/browser/commandsQuickAccess.ts
+5
-8
src/vs/platform/quickinput/browser/pickerQuickAccess.ts
src/vs/platform/quickinput/browser/pickerQuickAccess.ts
+167
-0
src/vs/platform/quickinput/common/quickAccess.ts
src/vs/platform/quickinput/common/quickAccess.ts
+2
-164
src/vs/workbench/browser/parts/editor/editorQuickAccess.ts
src/vs/workbench/browser/parts/editor/editorQuickAccess.ts
+1
-1
src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts
src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts
+1
-1
src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.ts
...bench/contrib/extensions/browser/extensionsQuickAccess.ts
+1
-1
src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.ts
...kbench/contrib/quickaccess/browser/commandsQuickAccess.ts
+1
-1
src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.ts
.../workbench/contrib/quickaccess/browser/viewQuickAccess.ts
+1
-1
src/vs/workbench/contrib/search/browser/symbolsQuickAccess.ts
...vs/workbench/contrib/search/browser/symbolsQuickAccess.ts
+2
-2
src/vs/workbench/contrib/tasks/browser/tasksQuickAccess.ts
src/vs/workbench/contrib/tasks/browser/tasksQuickAccess.ts
+1
-1
src/vs/workbench/contrib/terminal/browser/terminaQuickAccess.ts
.../workbench/contrib/terminal/browser/terminaQuickAccess.ts
+1
-1
未找到文件。
src/vs/editor/contrib/quickAccess/commandsQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -27,7 +27,7 @@ export abstract class AbstractEditorCommandsQuickAccessProvider extends Abstract
/**
* Subclasses to provide the current active editor control.
*/
abstract
activeTextEditorControl
:
IEditor
|
undefined
;
protected
abstract
activeTextEditorControl
:
IEditor
|
undefined
;
protected
getCodeEditorCommandPicks
():
ICommandQuickPick
[]
{
const
activeTextEditorControl
=
this
.
activeTextEditorControl
;
...
...
src/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -19,7 +19,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
export
class
StandaloneCommandsQuickAccessProvider
extends
AbstractEditorCommandsQuickAccessProvider
{
get
activeTextEditorControl
():
IEditor
|
undefined
{
return
withNullAsUndefined
(
this
.
codeEditorService
.
getFocusedCodeEditor
());
}
protected
get
activeTextEditorControl
():
IEditor
|
undefined
{
return
withNullAsUndefined
(
this
.
codeEditorService
.
getFocusedCodeEditor
());
}
constructor
(
@
IInstantiationService
instantiationService
:
IInstantiationService
,
...
...
src/vs/platform/quickinput/browser/commandsQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -5,7 +5,7 @@
import
{
localize
}
from
'
vs/nls
'
;
import
{
IQuickPickSeparator
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
PickerQuickAccessProvider
,
IPickerQuickAccessItem
}
from
'
vs/platform/quickinput/
common/q
uickAccess
'
;
import
{
PickerQuickAccessProvider
,
IPickerQuickAccessItem
}
from
'
vs/platform/quickinput/
browser/pickerQ
uickAccess
'
;
import
{
distinct
}
from
'
vs/base/common/arrays
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
DisposableStore
,
Disposable
,
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
...
...
@@ -40,9 +40,7 @@ export abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAcc
private
static
WORD_FILTER
=
or
(
matchesPrefix
,
matchesWords
,
matchesContiguousSubString
);
private
readonly
disposables
=
new
DisposableStore
();
private
readonly
commandsHistory
=
this
.
disposables
.
add
(
this
.
instantiationService
.
createInstance
(
CommandsHistory
));
private
readonly
commandsHistory
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
CommandsHistory
));
constructor
(
private
options
:
ICommandsQuickAccessOptions
,
...
...
@@ -173,11 +171,10 @@ export abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAcc
return
commandPicks
;
}
/**
* Subclasses to provide the actual command entries.
*/
protected
abstract
getCommandPicks
(
disposables
:
DisposableStore
,
token
:
CancellationToken
):
Promise
<
Array
<
ICommandQuickPick
>>
;
dispose
():
void
{
this
.
disposables
.
dispose
();
}
}
interface
ISerializedCommandHistory
{
...
...
src/vs/platform/quickinput/browser/pickerQuickAccess.ts
0 → 100644
浏览文件 @
b3787fb1
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
IQuickPick
,
IQuickPickItem
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
CancellationToken
,
CancellationTokenSource
}
from
'
vs/base/common/cancellation
'
;
import
{
IQuickPickSeparator
,
IKeyMods
,
IQuickPickAcceptEvent
}
from
'
vs/base/parts/quickinput/common/quickInput
'
;
import
{
IQuickAccessProvider
}
from
'
vs/platform/quickinput/common/quickAccess
'
;
import
{
IDisposable
,
DisposableStore
,
Disposable
}
from
'
vs/base/common/lifecycle
'
;
export
enum
TriggerAction
{
/**
* Do nothing after the button was clicked.
*/
NO_ACTION
,
/**
* Close the picker.
*/
CLOSE_PICKER
,
/**
* Update the results of the picker.
*/
REFRESH_PICKER
}
export
interface
IPickerQuickAccessItem
extends
IQuickPickItem
{
/**
* A method that will be executed when the pick item is accepted from
* the picker. The picker will close automatically before running this.
*
* @param keyMods the state of modifier keys when the item was accepted.
* @param event the underlying event that caused the accept to trigger.
*/
accept
?(
keyMods
:
IKeyMods
,
event
:
IQuickPickAcceptEvent
):
void
;
/**
* A method that will be executed when a button of the pick item was
* clicked on.
*
* @param buttonIndex index of the button of the item that
* was clicked.
*
* @param the state of modifier keys when the button was triggered.
*
* @returns a value that indicates what should happen after the trigger
* which can be a `Promise` for long running operations.
*/
trigger
?(
buttonIndex
:
number
,
keyMods
:
IKeyMods
):
TriggerAction
|
Promise
<
TriggerAction
>
;
}
export
abstract
class
PickerQuickAccessProvider
<
T
extends
IPickerQuickAccessItem
>
extends
Disposable
implements
IQuickAccessProvider
{
constructor
(
private
prefix
:
string
)
{
super
();
}
provide
(
picker
:
IQuickPick
<
T
>
,
token
:
CancellationToken
):
IDisposable
{
const
disposables
=
new
DisposableStore
();
// Allow subclasses to configure picker
this
.
configure
(
picker
);
// Disable filtering & sorting, we control the results
picker
.
matchOnLabel
=
picker
.
matchOnDescription
=
picker
.
matchOnDetail
=
picker
.
sortByLabel
=
false
;
// Set initial picks and update on type
let
picksCts
:
CancellationTokenSource
|
undefined
=
undefined
;
const
updatePickerItems
=
async
()
=>
{
// Cancel any previous ask for picks and busy
picksCts
?.
dispose
(
true
);
picker
.
busy
=
false
;
// Create new cancellation source for this run
picksCts
=
new
CancellationTokenSource
(
token
);
// Collect picks and support both long running and short
const
res
=
this
.
getPicks
(
picker
.
value
.
substr
(
this
.
prefix
.
length
).
trim
(),
disposables
.
add
(
new
DisposableStore
()),
picksCts
.
token
);
if
(
Array
.
isArray
(
res
))
{
picker
.
items
=
res
;
}
else
{
picker
.
busy
=
true
;
try
{
const
items
=
await
res
;
if
(
token
.
isCancellationRequested
)
{
return
;
}
picker
.
items
=
items
;
}
finally
{
if
(
!
token
.
isCancellationRequested
)
{
picker
.
busy
=
false
;
}
}
}
};
disposables
.
add
(
picker
.
onDidChangeValue
(()
=>
updatePickerItems
()));
updatePickerItems
();
// Accept the pick on accept and hide picker
disposables
.
add
(
picker
.
onDidAccept
(
event
=>
{
const
[
item
]
=
picker
.
selectedItems
;
if
(
typeof
item
?.
accept
===
'
function
'
)
{
if
(
!
event
.
inBackground
)
{
picker
.
hide
();
// hide picker unless we accept in background
}
item
.
accept
(
picker
.
keyMods
,
event
);
}
}));
// Trigger the pick with button index if button triggered
disposables
.
add
(
picker
.
onDidTriggerItemButton
(
async
({
button
,
item
})
=>
{
if
(
typeof
item
.
trigger
===
'
function
'
)
{
const
buttonIndex
=
item
.
buttons
?.
indexOf
(
button
)
??
-
1
;
if
(
buttonIndex
>=
0
)
{
const
result
=
item
.
trigger
(
buttonIndex
,
picker
.
keyMods
);
const
action
=
(
typeof
result
===
'
number
'
)
?
result
:
await
result
;
if
(
token
.
isCancellationRequested
)
{
return
;
}
switch
(
action
)
{
case
TriggerAction
.
NO_ACTION
:
break
;
case
TriggerAction
.
CLOSE_PICKER
:
picker
.
hide
();
break
;
case
TriggerAction
.
REFRESH_PICKER
:
updatePickerItems
();
break
;
}
}
}
}));
return
disposables
;
}
/**
* Subclasses can override this method to configure the picker before showing it.
*
* @param picker the picker instance used for the quick access before it opens.
*/
protected
configure
(
picker
:
IQuickPick
<
T
>
):
void
{
}
/**
* Returns an array of picks and separators as needed. If the picks are resolved
* long running, the provided cancellation token should be used to cancel the
* operation when the token signals this.
*
* The implementor is responsible for filtering and sorting the picks given the
* provided `filter`.
*
* @param filter a filter to apply to the picks.
* @param disposables can be used to register disposables that should be cleaned
* up when the picker closes.
* @param token for long running tasks, implementors need to check on cancellation
* through this token.
*/
protected
abstract
getPicks
(
filter
:
string
,
disposables
:
DisposableStore
,
token
:
CancellationToken
):
Array
<
T
|
IQuickPickSeparator
>
|
Promise
<
Array
<
T
|
IQuickPickSeparator
>>
;
}
src/vs/platform/quickinput/common/quickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -4,13 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import
{
IQuickPick
,
IQuickPickItem
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
CancellationToken
,
CancellationTokenSource
}
from
'
vs/base/common/cancellation
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
first
}
from
'
vs/base/common/arrays
'
;
import
{
startsWith
}
from
'
vs/base/common/strings
'
;
import
{
assertIsDefined
}
from
'
vs/base/common/types
'
;
import
{
IDisposable
,
toDisposable
,
DisposableStore
,
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IQuickPickSeparator
,
IKeyMods
,
IQuickPickAcceptEvent
}
from
'
vs/base/parts/quickinput/common/quickInput
'
;
import
{
IDisposable
,
toDisposable
}
from
'
vs/base/common/lifecycle
'
;
export
interface
IQuickAccessController
{
...
...
@@ -141,164 +140,3 @@ class QuickAccessRegistry implements IQuickAccessRegistry {
}
Registry
.
add
(
Extensions
.
Quickaccess
,
new
QuickAccessRegistry
());
//#region Helper class for simple picker based providers
export
enum
TriggerAction
{
/**
* Do nothing after the button was clicked.
*/
NO_ACTION
,
/**
* Close the picker.
*/
CLOSE_PICKER
,
/**
* Update the results of the picker.
*/
REFRESH_PICKER
}
export
interface
IPickerQuickAccessItem
extends
IQuickPickItem
{
/**
* A method that will be executed when the pick item is accepted from
* the picker. The picker will close automatically before running this.
*
* @param keyMods the state of modifier keys when the item was accepted.
* @param event the underlying event that caused the accept to trigger.
*/
accept
?(
keyMods
:
IKeyMods
,
event
:
IQuickPickAcceptEvent
):
void
;
/**
* A method that will be executed when a button of the pick item was
* clicked on.
*
* @param buttonIndex index of the button of the item that
* was clicked.
*
* @param the state of modifier keys when the button was triggered.
*
* @returns a value that indicates what should happen after the trigger
* which can be a `Promise` for long running operations.
*/
trigger
?(
buttonIndex
:
number
,
keyMods
:
IKeyMods
):
TriggerAction
|
Promise
<
TriggerAction
>
;
}
export
abstract
class
PickerQuickAccessProvider
<
T
extends
IPickerQuickAccessItem
>
extends
Disposable
implements
IQuickAccessProvider
{
constructor
(
private
prefix
:
string
)
{
super
();
}
provide
(
picker
:
IQuickPick
<
T
>
,
token
:
CancellationToken
):
IDisposable
{
const
disposables
=
new
DisposableStore
();
// Allow subclasses to configure picker
this
.
configure
(
picker
);
// Disable filtering & sorting, we control the results
picker
.
matchOnLabel
=
picker
.
matchOnDescription
=
picker
.
matchOnDetail
=
picker
.
sortByLabel
=
false
;
// Set initial picks and update on type
let
picksCts
:
CancellationTokenSource
|
undefined
=
undefined
;
const
updatePickerItems
=
async
()
=>
{
// Cancel any previous ask for picks and busy
picksCts
?.
dispose
(
true
);
picker
.
busy
=
false
;
// Create new cancellation source for this run
picksCts
=
new
CancellationTokenSource
(
token
);
// Collect picks and support both long running and short
const
res
=
this
.
getPicks
(
picker
.
value
.
substr
(
this
.
prefix
.
length
).
trim
(),
disposables
.
add
(
new
DisposableStore
()),
picksCts
.
token
);
if
(
Array
.
isArray
(
res
))
{
picker
.
items
=
res
;
}
else
{
picker
.
busy
=
true
;
try
{
const
items
=
await
res
;
if
(
token
.
isCancellationRequested
)
{
return
;
}
picker
.
items
=
items
;
}
finally
{
if
(
!
token
.
isCancellationRequested
)
{
picker
.
busy
=
false
;
}
}
}
};
disposables
.
add
(
picker
.
onDidChangeValue
(()
=>
updatePickerItems
()));
updatePickerItems
();
// Accept the pick on accept and hide picker
disposables
.
add
(
picker
.
onDidAccept
(
event
=>
{
const
[
item
]
=
picker
.
selectedItems
;
if
(
typeof
item
?.
accept
===
'
function
'
)
{
if
(
!
event
.
inBackground
)
{
picker
.
hide
();
// hide picker unless we accept in background
}
item
.
accept
(
picker
.
keyMods
,
event
);
}
}));
// Trigger the pick with button index if button triggered
disposables
.
add
(
picker
.
onDidTriggerItemButton
(
async
({
button
,
item
})
=>
{
if
(
typeof
item
.
trigger
===
'
function
'
)
{
const
buttonIndex
=
item
.
buttons
?.
indexOf
(
button
)
??
-
1
;
if
(
buttonIndex
>=
0
)
{
const
result
=
item
.
trigger
(
buttonIndex
,
picker
.
keyMods
);
const
action
=
(
typeof
result
===
'
number
'
)
?
result
:
await
result
;
if
(
token
.
isCancellationRequested
)
{
return
;
}
switch
(
action
)
{
case
TriggerAction
.
NO_ACTION
:
break
;
case
TriggerAction
.
CLOSE_PICKER
:
picker
.
hide
();
break
;
case
TriggerAction
.
REFRESH_PICKER
:
updatePickerItems
();
break
;
}
}
}
}));
return
disposables
;
}
/**
* Subclasses can override this method to configure the picker before showing it.
*
* @param picker the picker instance used for the quick access before it opens.
*/
protected
configure
(
picker
:
IQuickPick
<
T
>
):
void
{
}
/**
* Returns an array of picks and separators as needed. If the picks are resolved
* long running, the provided cancellation token should be used to cancel the
* operation when the token signals this.
*
* The implementor is responsible for filtering and sorting the picks given the
* provided `filter`.
*
* @param filter a filter to apply to the picks.
* @param disposables can be used to register disposables that should be cleaned
* up when the picker closes.
* @param token for long running tasks, implementors need to check on cancellation
* through this token.
*/
protected
abstract
getPicks
(
filter
:
string
,
disposables
:
DisposableStore
,
token
:
CancellationToken
):
Array
<
T
|
IQuickPickSeparator
>
|
Promise
<
Array
<
T
|
IQuickPickSeparator
>>
;
}
//#endregion
src/vs/workbench/browser/parts/editor/editorQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -5,7 +5,7 @@
import
{
localize
}
from
'
vs/nls
'
;
import
{
IQuickPickSeparator
,
quickPickItemScorerAccessor
,
IQuickPickItemWithResource
,
IQuickPick
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
PickerQuickAccessProvider
,
IPickerQuickAccessItem
,
TriggerAction
}
from
'
vs/platform/quickinput/
common/q
uickAccess
'
;
import
{
PickerQuickAccessProvider
,
IPickerQuickAccessItem
,
TriggerAction
}
from
'
vs/platform/quickinput/
browser/pickerQ
uickAccess
'
;
import
{
IEditorGroupsService
,
GroupsOrder
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
EditorsOrder
,
IEditorIdentifier
,
toResource
,
SideBySideEditor
}
from
'
vs/workbench/common/editor
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
...
...
src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
IQuickPickSeparator
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
PickerQuickAccessProvider
,
IPickerQuickAccessItem
,
TriggerAction
}
from
'
vs/platform/quickinput/
common/q
uickAccess
'
;
import
{
PickerQuickAccessProvider
,
IPickerQuickAccessItem
,
TriggerAction
}
from
'
vs/platform/quickinput/
browser/pickerQ
uickAccess
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IDebugService
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
...
...
src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
IQuickPickSeparator
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
}
from
'
vs/platform/quickinput/
common/q
uickAccess
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
}
from
'
vs/platform/quickinput/
browser/pickerQ
uickAccess
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
...
...
src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -32,7 +32,7 @@ export class CommandsQuickAccessProvider extends AbstractEditorCommandsQuickAcce
this
.
extensionService
.
whenInstalledExtensionsRegistered
()
]);
get
activeTextEditorControl
():
IEditor
|
undefined
{
return
this
.
editorService
.
activeTextEditorControl
;
}
protected
get
activeTextEditorControl
():
IEditor
|
undefined
{
return
this
.
editorService
.
activeTextEditorControl
;
}
constructor
(
@
IEditorService
private
readonly
editorService
:
IEditorService
,
...
...
src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -6,7 +6,7 @@
import
{
localize
}
from
'
vs/nls
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
IQuickPickSeparator
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
}
from
'
vs/platform/quickinput/
common/q
uickAccess
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
}
from
'
vs/platform/quickinput/
browser/pickerQ
uickAccess
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
IViewDescriptorService
,
IViewsService
,
ViewContainer
,
IViewsRegistry
,
Extensions
as
ViewExtensions
,
IViewContainersRegistry
}
from
'
vs/workbench/common/views
'
;
import
{
IOutputService
}
from
'
vs/workbench/contrib/output/common/output
'
;
...
...
src/vs/workbench/contrib/search/browser/symbolsQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
localize
}
from
'
vs/nls
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
,
TriggerAction
}
from
'
vs/platform/quickinput/
common/q
uickAccess
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
,
TriggerAction
}
from
'
vs/platform/quickinput/
browser/pickerQ
uickAccess
'
;
import
{
fuzzyScore
,
createMatches
,
FuzzyScore
}
from
'
vs/base/common/filters
'
;
import
{
stripWildcards
}
from
'
vs/base/common/strings
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
...
...
@@ -195,7 +195,7 @@ export class SymbolsQuickAccessProvider extends PickerQuickAccessProvider<ISymbo
resource
:
symbolToOpen
.
location
.
uri
,
options
:
{
preserveFocus
:
options
?.
preserveFocus
,
pinned
:
keyMods
.
alt
||
options
?.
preserveFocus
||
options
?.
forceOpenSideBySide
||
this
.
configuration
.
openEditorPinned
,
pinned
:
keyMods
.
alt
||
this
.
configuration
.
openEditorPinned
,
selection
:
symbolToOpen
.
location
.
range
?
Range
.
collapseToStart
(
symbolToOpen
.
location
.
range
)
:
undefined
}
},
keyMods
.
ctrlCmd
||
options
?.
forceOpenSideBySide
?
SIDE_GROUP
:
ACTIVE_GROUP
);
...
...
src/vs/workbench/contrib/tasks/browser/tasksQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -5,7 +5,7 @@
import
{
localize
}
from
'
vs/nls
'
;
import
{
IQuickPickSeparator
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
,
TriggerAction
}
from
'
vs/platform/quickinput/
common/q
uickAccess
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
,
TriggerAction
}
from
'
vs/platform/quickinput/
browser/pickerQ
uickAccess
'
;
import
{
matchesFuzzy
}
from
'
vs/base/common/filters
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
ITaskService
}
from
'
vs/workbench/contrib/tasks/common/taskService
'
;
...
...
src/vs/workbench/contrib/terminal/browser/terminaQuickAccess.ts
浏览文件 @
b3787fb1
...
...
@@ -5,7 +5,7 @@
import
{
localize
}
from
'
vs/nls
'
;
import
{
IQuickPickSeparator
,
IQuickPick
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
,
TriggerAction
}
from
'
vs/platform/quickinput/
common/q
uickAccess
'
;
import
{
IPickerQuickAccessItem
,
PickerQuickAccessProvider
,
TriggerAction
}
from
'
vs/platform/quickinput/
browser/pickerQ
uickAccess
'
;
import
{
matchesFuzzy
}
from
'
vs/base/common/filters
'
;
import
{
ITerminalService
}
from
'
vs/workbench/contrib/terminal/browser/terminal
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录