Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
cb1c7be2
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,发现更多精彩内容 >>
提交
cb1c7be2
编写于
3月 20, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
quick access - align more with current solution
上级
7d4cd4a3
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
78 addition
and
58 deletion
+78
-58
src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
+1
-1
src/vs/base/parts/quickinput/browser/quickInput.ts
src/vs/base/parts/quickinput/browser/quickInput.ts
+11
-4
src/vs/base/parts/quickinput/common/quickInput.ts
src/vs/base/parts/quickinput/common/quickInput.ts
+8
-0
src/vs/platform/quickinput/browser/commandsQuickAccess.ts
src/vs/platform/quickinput/browser/commandsQuickAccess.ts
+1
-1
src/vs/platform/quickinput/browser/quickAccess.ts
src/vs/platform/quickinput/browser/quickAccess.ts
+1
-0
src/vs/platform/quickinput/common/quickAccess.ts
src/vs/platform/quickinput/common/quickAccess.ts
+5
-0
src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts
src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts
+1
-1
src/vs/workbench/browser/quickopen.ts
src/vs/workbench/browser/quickopen.ts
+1
-6
src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts
...b/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts
+1
-0
src/vs/workbench/contrib/debug/browser/debug.contribution.ts
src/vs/workbench/contrib/debug/browser/debug.contribution.ts
+1
-0
src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.ts
...h/contrib/quickaccess/browser/quickAccess.contribution.ts
+2
-0
src/vs/workbench/contrib/quickopen/browser/commandsHandler.ts
...vs/workbench/contrib/quickopen/browser/commandsHandler.ts
+32
-30
src/vs/workbench/contrib/quickopen/browser/gotoLineHandler.ts
...vs/workbench/contrib/quickopen/browser/gotoLineHandler.ts
+3
-1
src/vs/workbench/contrib/search/browser/search.contribution.ts
...s/workbench/contrib/search/browser/search.contribution.ts
+7
-8
src/vs/workbench/contrib/terminal/browser/terminalActions.ts
src/vs/workbench/contrib/terminal/browser/terminalActions.ts
+3
-3
src/vs/workbench/workbench.common.main.ts
src/vs/workbench/workbench.common.main.ts
+0
-3
未找到文件。
src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
浏览文件 @
cb1c7be2
...
...
@@ -354,7 +354,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
content
.
push
(
`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color:
${
this
.
styles
.
selectBackground
}
!important; }`
);
}
// Match quick
Open
outline styles - ignore for disabled options
// Match quick
input
outline styles - ignore for disabled options
if
(
this
.
styles
.
listFocusOutline
)
{
content
.
push
(
`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted
${
this
.
styles
.
listFocusOutline
}
!important; outline-offset: -1.6px !important; }`
);
}
...
...
src/vs/base/parts/quickinput/browser/quickInput.ts
浏览文件 @
cb1c7be2
...
...
@@ -391,6 +391,7 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
private
_matchOnLabel
=
true
;
private
_sortByLabel
=
true
;
private
_autoFocusOnList
=
true
;
private
_autoFocusSecondEntry
=
false
;
private
_activeItems
:
T
[]
=
[];
private
activeItemsUpdated
=
false
;
private
activeItemsToConfirm
:
T
[]
|
null
=
[];
...
...
@@ -520,7 +521,6 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
this
.
update
();
}
get
autoFocusOnList
()
{
return
this
.
_autoFocusOnList
;
}
...
...
@@ -530,6 +530,14 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
this
.
update
();
}
get
autoFocusSecondEntry
()
{
return
this
.
_autoFocusSecondEntry
;
}
set
autoFocusSecondEntry
(
autoFocusSecondEntry
:
boolean
)
{
this
.
_autoFocusSecondEntry
=
autoFocusSecondEntry
;
}
get
activeItems
()
{
return
this
.
_activeItems
;
}
...
...
@@ -851,10 +859,9 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
this
.
ui
.
checkAll
.
checked
=
this
.
ui
.
list
.
getAllVisibleChecked
();
this
.
ui
.
visibleCount
.
setCount
(
this
.
ui
.
list
.
getVisibleCount
());
this
.
ui
.
count
.
setCount
(
this
.
ui
.
list
.
getCheckedCount
());
if
(
isQuickNavigating
&&
previousItemCount
===
0
)
{
// quick navigate: automatically focus the second entry
// so that upon release the item is picked directly
if
(
this
.
_autoFocusSecondEntry
&&
previousItemCount
===
0
)
{
this
.
ui
.
list
.
focus
(
QuickInputListFocus
.
Second
);
this
.
_autoFocusSecondEntry
=
false
;
}
else
{
this
.
trySelectFirst
();
}
...
...
src/vs/base/parts/quickinput/common/quickInput.ts
浏览文件 @
cb1c7be2
...
...
@@ -237,6 +237,14 @@ export interface IQuickPick<T extends IQuickPickItem> extends IQuickInput {
autoFocusOnList
:
boolean
;
/**
* If enabled, will try to select the second entry of the picks
* once they appear instead of the first one. This is useful
* e.g. when `quickNavigate` is enabled to be able to select
* a previous entry by just releasing the quick nav keys.
*/
autoFocusSecondEntry
:
boolean
;
quickNavigate
:
IQuickNavigateConfiguration
|
undefined
;
activeItems
:
ReadonlyArray
<
T
>
;
...
...
src/vs/platform/quickinput/browser/commandsQuickAccess.ts
浏览文件 @
cb1c7be2
...
...
@@ -178,7 +178,7 @@ interface ICommandsQuickAccessConfiguration {
};
}
class
CommandsHistory
extends
Disposable
{
export
class
CommandsHistory
extends
Disposable
{
static
readonly
DEFAULT_COMMANDS_HISTORY_LENGTH
=
50
;
...
...
src/vs/platform/quickinput/browser/quickAccess.ts
浏览文件 @
cb1c7be2
...
...
@@ -40,6 +40,7 @@ export class QuickAccessController extends Disposable implements IQuickAccessCon
picker
.
placeholder
=
descriptor
?.
placeholder
;
picker
.
value
=
value
;
picker
.
quickNavigate
=
options
?.
quickNavigateConfiguration
;
picker
.
autoFocusSecondEntry
=
!!
options
?.
quickNavigateConfiguration
||
!!
options
?.
autoFocus
?.
autoFocusSecondEntry
;
picker
.
valueSelection
=
options
?.
inputSelection
?
[
options
.
inputSelection
.
start
,
options
.
inputSelection
.
end
]
:
[
value
.
length
,
value
.
length
];
picker
.
contextKey
=
descriptor
?.
contextKey
;
picker
.
filterValue
=
(
value
:
string
)
=>
value
.
substring
(
descriptor
?
descriptor
.
prefix
.
length
:
0
);
...
...
src/vs/platform/quickinput/common/quickAccess.ts
浏览文件 @
cb1c7be2
...
...
@@ -21,6 +21,11 @@ export interface IQuickAccessOptions {
* Allows to enable quick navigate support in quick input.
*/
quickNavigateConfiguration
?:
IQuickNavigateConfiguration
;
/**
* Wether to select the second pick item by default instead of the first.
*/
autoFocus
?:
{
autoFocusSecondEntry
?:
boolean
}
}
export
interface
IQuickAccessController
{
...
...
src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts
浏览文件 @
cb1c7be2
...
...
@@ -110,7 +110,7 @@ export class NoTabsTitleControl extends TitleControl {
}
}
}
else
{
// @rebornix
//
TODO
@rebornix
// gesture tap should open the quick open
// editorGroupView will focus on the editor again when there are mouse/pointer/touch down events
// we need to wait a bit as `GesureEvent.Tap` is generated from `touchstart` and then `touchend` evnets, which are not an atom event.
...
...
src/vs/workbench/browser/quickopen.ts
浏览文件 @
cb1c7be2
...
...
@@ -330,14 +330,9 @@ export class QuickOpenAction extends Action {
super
(
id
,
label
);
this
.
prefix
=
prefix
;
this
.
enabled
=
!!
this
.
quickOpenService
;
}
run
():
Promise
<
void
>
{
// Show with prefix
async
run
():
Promise
<
void
>
{
this
.
quickOpenService
.
show
(
this
.
prefix
);
return
Promise
.
resolve
(
undefined
);
}
}
src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts
浏览文件 @
cb1c7be2
...
...
@@ -61,6 +61,7 @@ export class GotoSymbolQuickAccessProvider extends AbstractGotoSymbolQuickAccess
Registry
.
as
<
IQuickAccessRegistry
>
(
Extensions
.
Quickaccess
).
registerQuickAccessProvider
({
ctor
:
GotoSymbolQuickAccessProvider
,
prefix
:
AbstractGotoSymbolQuickAccessProvider
.
PREFIX
,
contextKey
:
'
inFileSymbolsPicker
'
,
placeholder
:
localize
(
'
gotoSymbolQuickAccessPlaceholder
'
,
"
Type the name of a symbol to go to.
"
),
helpEntries
:
[
{
description
:
localize
(
'
gotoSymbolQuickAccess
'
,
"
Go to Symbol in Editor
"
),
prefix
:
AbstractGotoSymbolQuickAccessProvider
.
PREFIX
,
needsEditor
:
true
},
...
...
src/vs/workbench/contrib/debug/browser/debug.contribution.ts
浏览文件 @
cb1c7be2
...
...
@@ -180,6 +180,7 @@ registerDebugCommandPaletteItem(TOGGLE_INLINE_BREAKPOINT_ID, nls.localize('inlin
Registry
.
as
<
IQuickAccessRegistry
>
(
QuickAccessExtensions
.
Quickaccess
).
registerQuickAccessProvider
({
ctor
:
StartDebugQuickAccessProvider
,
prefix
:
StartDebugQuickAccessProvider
.
PREFIX
,
contextKey
:
'
inLaunchConfigurationsPicker
'
,
placeholder
:
nls
.
localize
(
'
startDebugPlaceholder
'
,
"
Type the name of a launch configuration to run.
"
),
helpEntries
:
[{
description
:
nls
.
localize
(
'
startDebugHelp
'
,
"
Start Debug Configurations
"
),
needsEditor
:
false
}]
});
...
...
src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.ts
浏览文件 @
cb1c7be2
...
...
@@ -22,6 +22,7 @@ registry.registerQuickAccessProvider({
registry
.
registerQuickAccessProvider
({
ctor
:
ViewQuickAccessProvider
,
prefix
:
ViewQuickAccessProvider
.
PREFIX
,
contextKey
:
'
inViewsPicker
'
,
placeholder
:
localize
(
'
viewQuickAccessPlaceholder
'
,
"
Type the name of a view, output channel or terminal to open.
"
),
helpEntries
:
[{
description
:
localize
(
'
viewQuickAccess
'
,
"
Open View
"
),
needsEditor
:
false
}]
});
...
...
@@ -29,6 +30,7 @@ registry.registerQuickAccessProvider({
registry
.
registerQuickAccessProvider
({
ctor
:
CommandsQuickAccessProvider
,
prefix
:
CommandsQuickAccessProvider
.
PREFIX
,
contextKey
:
'
inCommandsPicker
'
,
placeholder
:
localize
(
'
commandsQuickAccessPlaceholder
'
,
"
Type the name of a command to run.
"
),
helpEntries
:
[{
description
:
localize
(
'
commandsQuickAccess
'
,
"
Show and Run Commands
"
),
needsEditor
:
false
}]
});
src/vs/workbench/contrib/quickopen/browser/commandsHandler.ts
浏览文件 @
cb1c7be2
...
...
@@ -34,6 +34,7 @@ import { Disposable, DisposableStore, IDisposable, toDisposable, dispose } from
import
{
timeout
}
from
'
vs/base/common/async
'
;
import
{
isFirefox
}
from
'
vs/base/browser/browser
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
CommandsHistory
}
from
'
vs/platform/quickinput/browser/commandsQuickAccess
'
;
export
const
ALL_COMMANDS_PREFIX
=
'
>
'
;
...
...
@@ -42,7 +43,7 @@ interface ISerializedCommandHistory {
entries
:
{
key
:
string
;
value
:
number
}[];
}
class
CommandsHistory
extends
Disposable
{
class
Legacy
CommandsHistory
extends
Disposable
{
static
readonly
DEFAULT_COMMANDS_HISTORY_LENGTH
=
50
;
...
...
@@ -71,17 +72,17 @@ class CommandsHistory extends Disposable {
}
private
updateConfiguration
():
void
{
this
.
configuredCommandsHistoryLength
=
CommandsHistory
.
getConfiguredCommandHistoryLength
(
this
.
configurationService
);
this
.
configuredCommandsHistoryLength
=
Legacy
CommandsHistory
.
getConfiguredCommandHistoryLength
(
this
.
configurationService
);
if
(
CommandsHistory
.
cache
&&
CommandsHistory
.
cache
.
limit
!==
this
.
configuredCommandsHistoryLength
)
{
CommandsHistory
.
cache
.
limit
=
this
.
configuredCommandsHistoryLength
;
if
(
LegacyCommandsHistory
.
cache
&&
Legacy
CommandsHistory
.
cache
.
limit
!==
this
.
configuredCommandsHistoryLength
)
{
Legacy
CommandsHistory
.
cache
.
limit
=
this
.
configuredCommandsHistoryLength
;
CommandsHistory
.
saveState
(
this
.
storageService
);
Legacy
CommandsHistory
.
saveState
(
this
.
storageService
);
}
}
private
load
():
void
{
const
raw
=
this
.
storageService
.
get
(
CommandsHistory
.
PREF_KEY_CACHE
,
StorageScope
.
GLOBAL
);
const
raw
=
this
.
storageService
.
get
(
Legacy
CommandsHistory
.
PREF_KEY_CACHE
,
StorageScope
.
GLOBAL
);
let
serializedCache
:
ISerializedCommandHistory
|
undefined
;
if
(
raw
)
{
try
{
...
...
@@ -91,7 +92,7 @@ class CommandsHistory extends Disposable {
}
}
const
cache
=
CommandsHistory
.
cache
=
new
LRUCache
<
string
,
number
>
(
this
.
configuredCommandsHistoryLength
,
1
);
const
cache
=
Legacy
CommandsHistory
.
cache
=
new
LRUCache
<
string
,
number
>
(
this
.
configuredCommandsHistoryLength
,
1
);
if
(
serializedCache
)
{
let
entries
:
{
key
:
string
;
value
:
number
}[];
if
(
serializedCache
.
usesLRU
)
{
...
...
@@ -102,33 +103,33 @@ class CommandsHistory extends Disposable {
entries
.
forEach
(
entry
=>
cache
.
set
(
entry
.
key
,
entry
.
value
));
}
CommandsHistory
.
counter
=
this
.
storageService
.
getNumber
(
CommandsHistory
.
PREF_KEY_COUNTER
,
StorageScope
.
GLOBAL
,
CommandsHistory
.
counter
);
LegacyCommandsHistory
.
counter
=
this
.
storageService
.
getNumber
(
LegacyCommandsHistory
.
PREF_KEY_COUNTER
,
StorageScope
.
GLOBAL
,
Legacy
CommandsHistory
.
counter
);
}
push
(
commandId
:
string
):
void
{
if
(
!
CommandsHistory
.
cache
)
{
if
(
!
Legacy
CommandsHistory
.
cache
)
{
return
;
}
CommandsHistory
.
cache
.
set
(
commandId
,
CommandsHistory
.
counter
++
);
// set counter to command
LegacyCommandsHistory
.
cache
.
set
(
commandId
,
Legacy
CommandsHistory
.
counter
++
);
// set counter to command
CommandsHistory
.
saveState
(
this
.
storageService
);
Legacy
CommandsHistory
.
saveState
(
this
.
storageService
);
}
peek
(
commandId
:
string
):
number
|
undefined
{
return
CommandsHistory
.
cache
?.
peek
(
commandId
);
return
Legacy
CommandsHistory
.
cache
?.
peek
(
commandId
);
}
static
saveState
(
storageService
:
IStorageService
):
void
{
if
(
!
CommandsHistory
.
cache
)
{
if
(
!
Legacy
CommandsHistory
.
cache
)
{
return
;
}
const
serializedCache
:
ISerializedCommandHistory
=
{
usesLRU
:
true
,
entries
:
[]
};
CommandsHistory
.
cache
.
forEach
((
value
,
key
)
=>
serializedCache
.
entries
.
push
({
key
,
value
}));
Legacy
CommandsHistory
.
cache
.
forEach
((
value
,
key
)
=>
serializedCache
.
entries
.
push
({
key
,
value
}));
storageService
.
store
(
CommandsHistory
.
PREF_KEY_CACHE
,
JSON
.
stringify
(
serializedCache
),
StorageScope
.
GLOBAL
);
storageService
.
store
(
CommandsHistory
.
PREF_KEY_COUNTER
,
CommandsHistory
.
counter
,
StorageScope
.
GLOBAL
);
storageService
.
store
(
Legacy
CommandsHistory
.
PREF_KEY_CACHE
,
JSON
.
stringify
(
serializedCache
),
StorageScope
.
GLOBAL
);
storageService
.
store
(
LegacyCommandsHistory
.
PREF_KEY_COUNTER
,
Legacy
CommandsHistory
.
counter
,
StorageScope
.
GLOBAL
);
}
static
getConfiguredCommandHistoryLength
(
configurationService
:
IConfigurationService
):
number
{
...
...
@@ -139,15 +140,15 @@ class CommandsHistory extends Disposable {
return
configuredCommandHistoryLength
;
}
return
CommandsHistory
.
DEFAULT_COMMANDS_HISTORY_LENGTH
;
return
Legacy
CommandsHistory
.
DEFAULT_COMMANDS_HISTORY_LENGTH
;
}
static
clearHistory
(
configurationService
:
IConfigurationService
,
storageService
:
IStorageService
):
void
{
const
commandHistoryLength
=
CommandsHistory
.
getConfiguredCommandHistoryLength
(
configurationService
);
CommandsHistory
.
cache
=
new
LRUCache
<
string
,
number
>
(
commandHistoryLength
);
CommandsHistory
.
counter
=
1
;
const
commandHistoryLength
=
Legacy
CommandsHistory
.
getConfiguredCommandHistoryLength
(
configurationService
);
Legacy
CommandsHistory
.
cache
=
new
LRUCache
<
string
,
number
>
(
commandHistoryLength
);
Legacy
CommandsHistory
.
counter
=
1
;
CommandsHistory
.
saveState
(
storageService
);
Legacy
CommandsHistory
.
saveState
(
storageService
);
}
}
...
...
@@ -197,13 +198,16 @@ export class ClearCommandHistoryAction extends Action {
super
(
id
,
label
);
}
run
():
Promise
<
void
>
{
async
run
():
Promise
<
void
>
{
const
legacyCommandHistoryLength
=
LegacyCommandsHistory
.
getConfiguredCommandHistoryLength
(
this
.
configurationService
);
if
(
legacyCommandHistoryLength
>
0
)
{
LegacyCommandsHistory
.
clearHistory
(
this
.
configurationService
,
this
.
storageService
);
}
const
commandHistoryLength
=
CommandsHistory
.
getConfiguredCommandHistoryLength
(
this
.
configurationService
);
if
(
commandHistoryLength
>
0
)
{
CommandsHistory
.
clearHistory
(
this
.
configurationService
,
this
.
storageService
);
}
return
Promise
.
resolve
(
undefined
);
}
}
...
...
@@ -222,13 +226,11 @@ class CommandPaletteEditorAction extends EditorAction {
});
}
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
Promise
<
void
>
{
async
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
Promise
<
void
>
{
const
quickOpenService
=
accessor
.
get
(
IQuickOpenService
);
// Show with prefix
quickOpenService
.
show
(
ALL_COMMANDS_PREFIX
);
return
Promise
.
resolve
(
undefined
);
}
}
...
...
@@ -406,7 +408,7 @@ export class CommandsHandler extends QuickOpenHandler implements IDisposable {
static
readonly
ID
=
'
workbench.picker.commands
'
;
private
commandHistoryEnabled
:
boolean
|
undefined
;
private
readonly
commandsHistory
:
CommandsHistory
;
private
readonly
commandsHistory
:
Legacy
CommandsHistory
;
private
readonly
disposables
=
new
DisposableStore
();
private
readonly
disposeOnClose
=
new
DisposableStore
();
...
...
@@ -423,7 +425,7 @@ export class CommandsHandler extends QuickOpenHandler implements IDisposable {
)
{
super
();
this
.
commandsHistory
=
this
.
disposables
.
add
(
this
.
instantiationService
.
createInstance
(
CommandsHistory
));
this
.
commandsHistory
=
this
.
disposables
.
add
(
this
.
instantiationService
.
createInstance
(
Legacy
CommandsHistory
));
this
.
extensionService
.
whenInstalledExtensionsRegistered
().
then
(()
=>
this
.
waitedForExtensionsRegistered
=
true
);
...
...
@@ -432,7 +434,7 @@ export class CommandsHandler extends QuickOpenHandler implements IDisposable {
}
private
updateConfiguration
():
void
{
this
.
commandHistoryEnabled
=
CommandsHistory
.
getConfiguredCommandHistoryLength
(
this
.
configurationService
)
>
0
;
this
.
commandHistoryEnabled
=
Legacy
CommandsHistory
.
getConfiguredCommandHistoryLength
(
this
.
configurationService
)
>
0
;
}
async
getResults
(
searchValue
:
string
,
token
:
CancellationToken
):
Promise
<
QuickOpenModel
>
{
...
...
src/vs/workbench/contrib/quickopen/browser/gotoLineHandler.ts
浏览文件 @
cb1c7be2
...
...
@@ -22,6 +22,7 @@ import { isCodeEditor, isDiffEditor } from 'vs/editor/browser/editorBrowser';
import
{
IEditorGroup
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
IQuickInputService
}
from
'
vs/platform/quickinput/common/quickInput
'
;
export
const
GOTO_LINE_PREFIX
=
'
:
'
;
...
...
@@ -32,6 +33,7 @@ export class GotoLineAction extends QuickOpenAction {
constructor
(
actionId
:
string
,
actionLabel
:
string
,
@
IQuickOpenService
quickOpenService
:
IQuickOpenService
,
@
IQuickInputService
private
readonly
quickInputService
:
IQuickInputService
,
@
IEditorService
private
readonly
editorService
:
IEditorService
)
{
super
(
actionId
,
actionLabel
,
GOTO_LINE_PREFIX
,
quickOpenService
);
...
...
@@ -61,7 +63,7 @@ export class GotoLineAction extends QuickOpenAction {
const
result
=
super
.
run
();
if
(
restoreOptions
)
{
Event
.
once
(
this
.
quickOpenService
.
onHide
)(()
=>
{
Event
.
once
(
Event
.
any
(
this
.
quickOpenService
.
onHide
,
this
.
quickInputService
.
onHide
)
)(()
=>
{
activeTextEditorControl
!
.
updateOptions
(
restoreOptions
!
);
});
}
...
...
src/vs/workbench/contrib/search/browser/search.contribution.ts
浏览文件 @
cb1c7be2
...
...
@@ -470,20 +470,21 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
class
ShowAllSymbolsAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.showAllSymbols
'
;
static
readonly
LABEL
=
nls
.
localize
(
'
showTriggerActions
'
,
"
Go to Symbol in Workspace...
"
);
static
readonly
ALL_SYMBOLS_PREFIX
=
'
#
'
;
constructor
(
actionId
:
string
,
actionLabel
:
string
,
actionId
:
string
,
actionLabel
:
string
,
@
IQuickOpenService
private
readonly
quickOpenService
:
IQuickOpenService
,
@
ICodeEditorService
private
readonly
editorService
:
ICodeEditorService
)
{
@
ICodeEditorService
private
readonly
editorService
:
ICodeEditorService
)
{
super
(
actionId
,
actionLabel
);
this
.
enabled
=
!!
this
.
quickOpenService
;
}
run
(
context
?:
any
):
Promise
<
void
>
{
async
run
():
Promise
<
void
>
{
let
prefix
=
ShowAllSymbolsAction
.
ALL_SYMBOLS_PREFIX
;
let
inputSelection
:
{
start
:
number
;
end
:
number
;
}
|
undefined
=
undefined
;
const
editor
=
this
.
editorService
.
getFocusedCodeEditor
();
...
...
@@ -494,8 +495,6 @@ class ShowAllSymbolsAction extends Action {
}
this
.
quickOpenService
.
show
(
prefix
,
{
inputSelection
});
return
Promise
.
resolve
(
undefined
);
}
}
...
...
@@ -661,7 +660,7 @@ quickAccessRegistry.registerQuickAccessProvider({
ctor
:
AnythingQuickAccessProvider
,
prefix
:
AnythingQuickAccessProvider
.
PREFIX
,
placeholder
:
nls
.
localize
(
'
anythingQuickAccessPlaceholder
'
,
"
Type '?' to get help on the actions you can take from here
"
),
contextKey
:
'
inFilesPicker
'
,
contextKey
:
defaultQuickOpenContextKey
,
helpEntries
:
[{
description
:
nls
.
localize
(
'
anythingQuickAccess
'
,
"
Go to File
"
),
needsEditor
:
false
}]
});
...
...
src/vs/workbench/contrib/terminal/browser/terminalActions.ts
浏览文件 @
cb1c7be2
...
...
@@ -137,7 +137,7 @@ export class QuickKillTerminalAction extends Action {
instance
.
dispose
(
true
);
}
await
timeout
(
50
);
return
this
.
quickOpenService
.
show
(
TERMINAL_PICKER_PREFIX
,
undefined
);
return
this
.
quickOpenService
.
show
(
TERMINAL_PICKER_PREFIX
);
}
}
...
...
@@ -1139,7 +1139,7 @@ export class QuickOpenTermAction extends Action {
}
public
run
():
Promise
<
void
>
{
return
this
.
quickOpenService
.
show
(
TERMINAL_PICKER_PREFIX
,
undefined
);
return
this
.
quickOpenService
.
show
(
TERMINAL_PICKER_PREFIX
);
}
}
...
...
@@ -1160,7 +1160,7 @@ export class RenameTerminalQuickOpenAction extends RenameTerminalAction {
await
super
.
run
(
this
.
terminal
);
// This timeout is needed to make sure the previous quickOpen has time to close before we show the next one
await
timeout
(
50
);
await
this
.
quickOpenService
.
show
(
TERMINAL_PICKER_PREFIX
,
undefined
);
await
this
.
quickOpenService
.
show
(
TERMINAL_PICKER_PREFIX
);
}
}
...
...
src/vs/workbench/workbench.common.main.ts
浏览文件 @
cb1c7be2
...
...
@@ -179,7 +179,6 @@ import 'vs/workbench/contrib/scm/browser/scmViewlet';
// Debug
import
'
vs/workbench/contrib/debug/browser/debug.contribution
'
;
import
'
vs/workbench/contrib/debug/browser/debugQuickOpen
'
;
import
'
vs/workbench/contrib/debug/browser/debugEditorContribution
'
;
import
'
vs/workbench/contrib/debug/browser/breakpointEditorContribution
'
;
import
'
vs/workbench/contrib/debug/browser/callStackEditorContribution
'
;
...
...
@@ -201,7 +200,6 @@ import 'vs/workbench/contrib/customEditor/browser/webviewEditor.contribution';
// Extensions Management
import
'
vs/workbench/contrib/extensions/browser/extensions.contribution
'
;
import
'
vs/workbench/contrib/extensions/browser/extensionsQuickOpen
'
;
import
'
vs/workbench/contrib/extensions/browser/extensionsViewlet
'
;
// Output View
...
...
@@ -210,7 +208,6 @@ import 'vs/workbench/contrib/output/browser/outputView';
// Terminal
import
'
vs/workbench/contrib/terminal/browser/terminal.contribution
'
;
import
'
vs/workbench/contrib/terminal/browser/terminalQuickOpen
'
;
import
'
vs/workbench/contrib/terminal/browser/terminalView
'
;
// Relauncher
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录