Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
bb3c3f0b
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,发现更多精彩内容 >>
提交
bb3c3f0b
编写于
3月 17, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Extract USLayoutResolvedKeybinding to its own file
上级
47ee1eff
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
172 addition
and
162 deletion
+172
-162
src/vs/editor/browser/standalone/simpleServices.ts
src/vs/editor/browser/standalone/simpleServices.ts
+2
-1
src/vs/platform/keybinding/common/abstractKeybindingService.ts
...s/platform/keybinding/common/abstractKeybindingService.ts
+1
-152
src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts
.../platform/keybinding/common/usLayoutResolvedKeybinding.ts
+158
-0
src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts
.../keybinding/test/common/abstractKeybindingService.test.ts
+2
-1
src/vs/platform/keybinding/test/common/keybindingLabels.test.ts
.../platform/keybinding/test/common/keybindingLabels.test.ts
+1
-1
src/vs/platform/keybinding/test/common/keybindingResolver.test.ts
...latform/keybinding/test/common/keybindingResolver.test.ts
+1
-1
src/vs/platform/keybinding/test/common/mockKeybindingService.ts
.../platform/keybinding/test/common/mockKeybindingService.ts
+1
-1
src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts
...arts/preferences/browser/keybindingsEditorContribution.ts
+1
-1
src/vs/workbench/parts/search/test/browser/searchActions.test.ts
...workbench/parts/search/test/browser/searchActions.test.ts
+1
-1
src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
...services/keybinding/electron-browser/keybindingService.ts
+2
-1
src/vs/workbench/services/keybinding/test/keybindingIO.test.ts
...s/workbench/services/keybinding/test/keybindingIO.test.ts
+1
-1
src/vs/workbench/services/keybinding/test/keyboardMapper.test.ts
...workbench/services/keybinding/test/keyboardMapper.test.ts
+1
-1
未找到文件。
src/vs/editor/browser/standalone/simpleServices.ts
浏览文件 @
bb3c3f0b
...
...
@@ -11,7 +11,8 @@ import { TPromise } from 'vs/base/common/winjs.base';
import
{
IConfigurationService
,
IConfigurationServiceEvent
,
IConfigurationValue
,
getConfigurationValue
,
IConfigurationKeys
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IEditor
,
IEditorInput
,
IEditorOptions
,
IEditorService
,
IResourceInput
,
Position
}
from
'
vs/platform/editor/common/editor
'
;
import
{
ICommandService
,
ICommand
,
ICommandEvent
,
ICommandHandler
,
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
USLayoutResolvedKeybinding
,
AbstractKeybindingService
}
from
'
vs/platform/keybinding/common/abstractKeybindingService
'
;
import
{
AbstractKeybindingService
}
from
'
vs/platform/keybinding/common/abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/usLayoutResolvedKeybinding
'
;
import
{
KeybindingResolver
}
from
'
vs/platform/keybinding/common/keybindingResolver
'
;
import
{
IKeybindingEvent
,
IKeybindingItem
,
KeybindingSource
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
ContextKeyExpr
,
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
...
...
src/vs/platform/keybinding/common/abstractKeybindingService.ts
浏览文件 @
bb3c3f0b
...
...
@@ -5,9 +5,7 @@
'
use strict
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
IHTMLContentElement
}
from
'
vs/base/common/htmlContent
'
;
import
{
ResolvedKeybinding
,
SimpleKeybinding
,
Keybinding
,
KeyCode
,
KeyCodeUtils
,
USER_SETTINGS
}
from
'
vs/base/common/keyCodes
'
;
import
{
PrintableKeypress
,
UILabelProvider
,
AriaLabelProvider
,
ElectronAcceleratorLabelProvider
,
UserSettingsLabelProvider
}
from
'
vs/platform/keybinding/common/keybindingLabels
'
;
import
{
ResolvedKeybinding
,
SimpleKeybinding
,
Keybinding
}
from
'
vs/base/common/keyCodes
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
...
...
@@ -17,155 +15,6 @@ import { IContextKeyService, IContextKeyServiceTarget } from 'vs/platform/contex
import
{
IStatusbarService
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
OperatingSystem
}
from
'
vs/base/common/platform
'
;
/**
* Do not instantiate. Use KeybindingService to get a ResolvedKeybinding seeded with information about the current kb layout.
*/
export
class
USLayoutResolvedKeybinding
extends
ResolvedKeybinding
{
private
readonly
_actual
:
Keybinding
;
private
readonly
_os
:
OperatingSystem
;
constructor
(
actual
:
Keybinding
,
os
:
OperatingSystem
)
{
super
();
this
.
_actual
=
actual
;
this
.
_os
=
os
;
}
private
static
_usKeyCodeToUILabel
(
keyCode
:
KeyCode
,
OS
:
OperatingSystem
):
string
{
if
(
OS
===
OperatingSystem
.
Macintosh
)
{
switch
(
keyCode
)
{
case
KeyCode
.
LeftArrow
:
return
'
←
'
;
case
KeyCode
.
UpArrow
:
return
'
↑
'
;
case
KeyCode
.
RightArrow
:
return
'
→
'
;
case
KeyCode
.
DownArrow
:
return
'
↓
'
;
}
}
return
KeyCodeUtils
.
toString
(
keyCode
);
}
private
static
_usKeyCodeToAriaLabel
(
keyCode
:
KeyCode
,
OS
:
OperatingSystem
):
string
{
return
KeyCodeUtils
.
toString
(
keyCode
);
}
public
getLabel
():
string
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUILabel
,
this
.
_os
);
return
UILabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
public
getAriaLabel
():
string
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToAriaLabel
,
this
.
_os
);
return
AriaLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
public
getHTMLLabel
():
IHTMLContentElement
[]
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUILabel
,
this
.
_os
);
return
UILabelProvider
.
toHTMLLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
private
static
_usKeyCodeToElectronAccelerator
(
keyCode
:
KeyCode
,
OS
:
OperatingSystem
):
string
{
switch
(
keyCode
)
{
case
KeyCode
.
UpArrow
:
return
'
Up
'
;
case
KeyCode
.
DownArrow
:
return
'
Down
'
;
case
KeyCode
.
LeftArrow
:
return
'
Left
'
;
case
KeyCode
.
RightArrow
:
return
'
Right
'
;
}
return
KeyCodeUtils
.
toString
(
keyCode
);
}
public
getElectronAccelerator
():
string
{
if
(
this
.
_actual
.
isChord
())
{
// Electron cannot handle chords
return
null
;
}
let
keyCode
=
this
.
_actual
.
getKeyCode
();
if
(
keyCode
>=
KeyCode
.
NUMPAD_0
&&
keyCode
<=
KeyCode
.
NUMPAD_DIVIDE
)
{
// Electron cannot handle numpad keys
return
null
;
}
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToElectronAccelerator
,
this
.
_os
);
return
ElectronAcceleratorLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
private
static
_usKeyCodeToUserSettings
(
keyCode
:
KeyCode
,
OS
:
OperatingSystem
):
string
{
return
USER_SETTINGS
.
fromKeyCode
(
keyCode
);
}
public
getUserSettingsLabel
():
string
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUserSettings
,
this
.
_os
);
let
result
=
UserSettingsLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
return
result
.
toLowerCase
();
}
public
isChord
():
boolean
{
return
this
.
_actual
.
isChord
();
}
public
hasCtrlModifier
():
boolean
{
if
(
this
.
_actual
.
isChord
())
{
return
false
;
}
if
(
this
.
_os
===
OperatingSystem
.
Macintosh
)
{
return
this
.
_actual
.
hasWinCtrl
();
}
else
{
return
this
.
_actual
.
hasCtrlCmd
();
}
}
public
hasShiftModifier
():
boolean
{
if
(
this
.
_actual
.
isChord
())
{
return
false
;
}
return
this
.
_actual
.
hasShift
();
}
public
hasAltModifier
():
boolean
{
if
(
this
.
_actual
.
isChord
())
{
return
false
;
}
return
this
.
_actual
.
hasAlt
();
}
public
hasMetaModifier
():
boolean
{
if
(
this
.
_actual
.
isChord
())
{
return
false
;
}
if
(
this
.
_os
===
OperatingSystem
.
Macintosh
)
{
return
this
.
_actual
.
hasCtrlCmd
();
}
else
{
return
this
.
_actual
.
hasWinCtrl
();
}
}
public
getDispatchParts
():
[
string
,
string
]
{
let
keypressFirstPart
:
string
;
let
keypressChordPart
:
string
;
if
(
this
.
_actual
===
null
)
{
keypressFirstPart
=
null
;
keypressChordPart
=
null
;
}
else
if
(
this
.
_actual
.
isChord
())
{
keypressFirstPart
=
this
.
_actual
.
extractFirstPart
().
value
.
toString
();
keypressChordPart
=
this
.
_actual
.
extractChordPart
().
value
.
toString
();
}
else
{
keypressFirstPart
=
this
.
_actual
.
value
.
toString
();
keypressChordPart
=
null
;
}
return
[
keypressFirstPart
,
keypressChordPart
];
}
}
interface
CurrentChord
{
keypress
:
string
;
...
...
src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts
0 → 100644
浏览文件 @
bb3c3f0b
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
IHTMLContentElement
}
from
'
vs/base/common/htmlContent
'
;
import
{
ResolvedKeybinding
,
Keybinding
,
KeyCode
,
KeyCodeUtils
,
USER_SETTINGS
}
from
'
vs/base/common/keyCodes
'
;
import
{
PrintableKeypress
,
UILabelProvider
,
AriaLabelProvider
,
ElectronAcceleratorLabelProvider
,
UserSettingsLabelProvider
}
from
'
vs/platform/keybinding/common/keybindingLabels
'
;
import
{
OperatingSystem
}
from
'
vs/base/common/platform
'
;
/**
* Do not instantiate. Use KeybindingService to get a ResolvedKeybinding seeded with information about the current kb layout.
*/
export
class
USLayoutResolvedKeybinding
extends
ResolvedKeybinding
{
private
readonly
_actual
:
Keybinding
;
private
readonly
_os
:
OperatingSystem
;
constructor
(
actual
:
Keybinding
,
os
:
OperatingSystem
)
{
super
();
this
.
_actual
=
actual
;
this
.
_os
=
os
;
}
private
static
_usKeyCodeToUILabel
(
keyCode
:
KeyCode
,
OS
:
OperatingSystem
):
string
{
if
(
OS
===
OperatingSystem
.
Macintosh
)
{
switch
(
keyCode
)
{
case
KeyCode
.
LeftArrow
:
return
'
←
'
;
case
KeyCode
.
UpArrow
:
return
'
↑
'
;
case
KeyCode
.
RightArrow
:
return
'
→
'
;
case
KeyCode
.
DownArrow
:
return
'
↓
'
;
}
}
return
KeyCodeUtils
.
toString
(
keyCode
);
}
private
static
_usKeyCodeToAriaLabel
(
keyCode
:
KeyCode
,
OS
:
OperatingSystem
):
string
{
return
KeyCodeUtils
.
toString
(
keyCode
);
}
public
getLabel
():
string
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUILabel
,
this
.
_os
);
return
UILabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
public
getAriaLabel
():
string
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToAriaLabel
,
this
.
_os
);
return
AriaLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
public
getHTMLLabel
():
IHTMLContentElement
[]
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUILabel
,
this
.
_os
);
return
UILabelProvider
.
toHTMLLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
private
static
_usKeyCodeToElectronAccelerator
(
keyCode
:
KeyCode
,
OS
:
OperatingSystem
):
string
{
switch
(
keyCode
)
{
case
KeyCode
.
UpArrow
:
return
'
Up
'
;
case
KeyCode
.
DownArrow
:
return
'
Down
'
;
case
KeyCode
.
LeftArrow
:
return
'
Left
'
;
case
KeyCode
.
RightArrow
:
return
'
Right
'
;
}
return
KeyCodeUtils
.
toString
(
keyCode
);
}
public
getElectronAccelerator
():
string
{
if
(
this
.
_actual
.
isChord
())
{
// Electron cannot handle chords
return
null
;
}
let
keyCode
=
this
.
_actual
.
getKeyCode
();
if
(
keyCode
>=
KeyCode
.
NUMPAD_0
&&
keyCode
<=
KeyCode
.
NUMPAD_DIVIDE
)
{
// Electron cannot handle numpad keys
return
null
;
}
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToElectronAccelerator
,
this
.
_os
);
return
ElectronAcceleratorLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
}
private
static
_usKeyCodeToUserSettings
(
keyCode
:
KeyCode
,
OS
:
OperatingSystem
):
string
{
return
USER_SETTINGS
.
fromKeyCode
(
keyCode
);
}
public
getUserSettingsLabel
():
string
{
const
[
firstPart
,
chordPart
]
=
PrintableKeypress
.
fromKeybinding
(
this
.
_actual
,
USLayoutResolvedKeybinding
.
_usKeyCodeToUserSettings
,
this
.
_os
);
let
result
=
UserSettingsLabelProvider
.
toLabel2
(
firstPart
,
chordPart
,
this
.
_os
);
return
result
.
toLowerCase
();
}
public
isChord
():
boolean
{
return
this
.
_actual
.
isChord
();
}
public
hasCtrlModifier
():
boolean
{
if
(
this
.
_actual
.
isChord
())
{
return
false
;
}
if
(
this
.
_os
===
OperatingSystem
.
Macintosh
)
{
return
this
.
_actual
.
hasWinCtrl
();
}
else
{
return
this
.
_actual
.
hasCtrlCmd
();
}
}
public
hasShiftModifier
():
boolean
{
if
(
this
.
_actual
.
isChord
())
{
return
false
;
}
return
this
.
_actual
.
hasShift
();
}
public
hasAltModifier
():
boolean
{
if
(
this
.
_actual
.
isChord
())
{
return
false
;
}
return
this
.
_actual
.
hasAlt
();
}
public
hasMetaModifier
():
boolean
{
if
(
this
.
_actual
.
isChord
())
{
return
false
;
}
if
(
this
.
_os
===
OperatingSystem
.
Macintosh
)
{
return
this
.
_actual
.
hasCtrlCmd
();
}
else
{
return
this
.
_actual
.
hasWinCtrl
();
}
}
public
getDispatchParts
():
[
string
,
string
]
{
let
keypressFirstPart
:
string
;
let
keypressChordPart
:
string
;
if
(
this
.
_actual
===
null
)
{
keypressFirstPart
=
null
;
keypressChordPart
=
null
;
}
else
if
(
this
.
_actual
.
isChord
())
{
keypressFirstPart
=
this
.
_actual
.
extractFirstPart
().
value
.
toString
();
keypressChordPart
=
this
.
_actual
.
extractChordPart
().
value
.
toString
();
}
else
{
keypressFirstPart
=
this
.
_actual
.
value
.
toString
();
keypressChordPart
=
null
;
}
return
[
keypressFirstPart
,
keypressChordPart
];
}
}
src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts
浏览文件 @
bb3c3f0b
...
...
@@ -6,7 +6,8 @@
import
*
as
assert
from
'
assert
'
;
import
{
ResolvedKeybinding
,
Keybinding
,
SimpleKeybinding
,
createKeybinding
,
KeyCode
,
KeyMod
,
KeyChord
}
from
'
vs/base/common/keyCodes
'
;
import
{
USLayoutResolvedKeybinding
,
AbstractKeybindingService
}
from
'
vs/platform/keybinding/common/abstractKeybindingService
'
;
import
{
AbstractKeybindingService
}
from
'
vs/platform/keybinding/common/abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/usLayoutResolvedKeybinding
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
...
...
src/vs/platform/keybinding/test/common/keybindingLabels.test.ts
浏览文件 @
bb3c3f0b
...
...
@@ -7,7 +7,7 @@
import
*
as
assert
from
'
assert
'
;
import
{
createKeybinding
,
KeyCode
,
KeyMod
,
KeyChord
}
from
'
vs/base/common/keyCodes
'
;
import
{
IHTMLContentElement
}
from
'
vs/base/common/htmlContent
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
usLayoutResolvedKeybinding
'
;
import
{
OperatingSystem
}
from
'
vs/base/common/platform
'
;
suite
(
'
KeybindingLabels
'
,
()
=>
{
...
...
src/vs/platform/keybinding/test/common/keybindingResolver.test.ts
浏览文件 @
bb3c3f0b
...
...
@@ -9,7 +9,7 @@ import { createKeybinding, SimpleKeybinding, KeyCode, KeyMod, KeyChord } from 'v
import
{
KeybindingResolver
}
from
'
vs/platform/keybinding/common/keybindingResolver
'
;
import
{
ContextKeyAndExpr
,
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ResolvedKeybindingItem
}
from
'
vs/platform/keybinding/common/resolvedKeybindingItem
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
usLayoutResolvedKeybinding
'
;
import
{
OS
}
from
'
vs/base/common/platform
'
;
suite
(
'
KeybindingResolver
'
,
()
=>
{
...
...
src/vs/platform/keybinding/test/common/mockKeybindingService.ts
浏览文件 @
bb3c3f0b
...
...
@@ -9,7 +9,7 @@ import Event from 'vs/base/common/event';
import
{
IKeybindingService
,
IKeybindingEvent
,
IKeybindingItem2
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IContextKey
,
IContextKeyService
,
IContextKeyServiceTarget
,
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IResolveResult
}
from
'
vs/platform/keybinding/common/keybindingResolver
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
usLayoutResolvedKeybinding
'
;
import
{
OS
}
from
'
vs/base/common/platform
'
;
class
MockKeybindingContextKey
<
T
>
implements
IContextKey
<
T
>
{
...
...
src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts
浏览文件 @
bb3c3f0b
...
...
@@ -24,7 +24,7 @@ import { CodeSnippet } from 'vs/editor/contrib/snippet/common/snippet';
import
{
SnippetController
}
from
'
vs/editor/contrib/snippet/common/snippetController
'
;
import
{
SmartSnippetInserter
}
from
'
vs/workbench/parts/preferences/common/smartSnippetInserter
'
;
import
{
DefineKeybindingOverlayWidget
}
from
'
vs/workbench/parts/preferences/browser/keybindingWidgets
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
usLayoutResolvedKeybinding
'
;
import
{
OS
}
from
'
vs/base/common/platform
'
;
import
EditorContextKeys
=
editorCommon
.
EditorContextKeys
;
...
...
src/vs/workbench/parts/search/test/browser/searchActions.test.ts
浏览文件 @
bb3c3f0b
...
...
@@ -17,7 +17,7 @@ import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
Tree
}
from
'
vs/base/parts/tree/browser/treeImpl
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
usLayoutResolvedKeybinding
'
;
import
{
OS
}
from
'
vs/base/common/platform
'
;
suite
(
'
Search Actions
'
,
()
=>
{
...
...
src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
浏览文件 @
bb3c3f0b
...
...
@@ -13,7 +13,8 @@ import { OS, OperatingSystem } from 'vs/base/common/platform';
import
{
toDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
ExtensionMessageCollector
,
ExtensionsRegistry
}
from
'
vs/platform/extensions/common/extensionsRegistry
'
;
import
{
Extensions
,
IJSONContributionRegistry
}
from
'
vs/platform/jsonschemas/common/jsonContributionRegistry
'
;
import
{
AbstractKeybindingService
,
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/abstractKeybindingService
'
;
import
{
AbstractKeybindingService
}
from
'
vs/platform/keybinding/common/abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/usLayoutResolvedKeybinding
'
;
import
{
IStatusbarService
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
KeybindingResolver
}
from
'
vs/platform/keybinding/common/keybindingResolver
'
;
import
{
isFalsyOrEmpty
}
from
'
vs/base/common/arrays
'
;
...
...
src/vs/workbench/services/keybinding/test/keybindingIO.test.ts
浏览文件 @
bb3c3f0b
...
...
@@ -9,7 +9,7 @@ import { createKeybinding, KeyCode, KeyMod, KeyChord, KeyCodeUtils } from 'vs/ba
import
{
KeybindingIO
}
from
'
vs/workbench/services/keybinding/common/keybindingIO
'
;
import
{
OS
,
OperatingSystem
}
from
'
vs/base/common/platform
'
;
import
{
IUserFriendlyKeybinding
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
usLayoutResolvedKeybinding
'
;
suite
(
'
keybindingIO
'
,
()
=>
{
test
(
'
getUserSettingsKeybindingRegex
'
,
()
=>
{
...
...
src/vs/workbench/services/keybinding/test/keyboardMapper.test.ts
浏览文件 @
bb3c3f0b
...
...
@@ -10,7 +10,7 @@ import { KeyMod, KeyCode, SimpleKeybinding, createKeybinding, Keybinding } from
import
{
KeyboardMapper
,
IKeyboardMapping
}
from
'
vs/workbench/services/keybinding/common/keyboardMapper
'
;
import
{
OperatingSystem
}
from
'
vs/base/common/platform
'
;
import
{
UserSettingsLabelProvider
,
PrintableKeypress
}
from
'
vs/platform/keybinding/common/keybindingLabels
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
abstractKeybindingService
'
;
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/
usLayoutResolvedKeybinding
'
;
import
{
KeyboardEventCodeUtils
}
from
'
vs/workbench/services/keybinding/common/keyboardEventCode
'
;
import
{
IHTMLContentElement
}
from
'
vs/base/common/htmlContent
'
;
import
{
readFile
,
writeFile
}
from
'
vs/base/node/pfs
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录