Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ca7e3a01
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,发现更多精彩内容 >>
提交
ca7e3a01
编写于
1月 24, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - extract developer actions
上级
c21a86e6
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
217 addition
and
206 deletion
+217
-206
src/vs/workbench/electron-browser/actions.ts
src/vs/workbench/electron-browser/actions.ts
+1
-190
src/vs/workbench/electron-browser/actions/developerActions.ts
...vs/workbench/electron-browser/actions/developerActions.ts
+212
-0
src/vs/workbench/electron-browser/actions/windowActions.ts
src/vs/workbench/electron-browser/actions/windowActions.ts
+0
-14
src/vs/workbench/electron-browser/main.contribution.ts
src/vs/workbench/electron-browser/main.contribution.ts
+2
-1
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+2
-1
未找到文件。
src/vs/workbench/electron-browser/actions.ts
浏览文件 @
ca7e3a01
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
IWindow
Service
,
IWindow
sService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IWindowsService
}
from
'
vs/platform/windows/common/windows
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
product
from
'
vs/platform/node/product
'
;
import
{
isMacintosh
,
isLinux
,
language
}
from
'
vs/base/common/platform
'
;
...
...
@@ -12,20 +12,11 @@ import { IEditorGroupsService, GroupDirection, GroupLocation, IFindGroupScope }
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
IPartService
,
Parts
,
Position
as
PartPosition
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
shell
}
from
'
electron
'
;
import
{
IViewlet
}
from
'
vs/workbench/common/viewlet
'
;
import
{
IPanel
}
from
'
vs/workbench/common/panel
'
;
import
{
IssueType
}
from
'
vs/platform/issue/common/issue
'
;
import
{
domEvent
}
from
'
vs/base/browser/event
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
IDisposable
,
toDisposable
,
dispose
,
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
getDomNodePagePosition
,
createStyleSheet
,
createCSSRule
,
append
,
$
}
from
'
vs/base/browser/dom
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
Context
}
from
'
vs/platform/contextkey/browser/contextKeyService
'
;
import
{
IWorkbenchIssueService
}
from
'
vs/workbench/services/issue/common/issue
'
;
import
{
StandardKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
timeout
}
from
'
vs/base/common/async
'
;
// --- actions
...
...
@@ -84,7 +75,6 @@ export class ReportPerformanceIssueUsingReporterAction extends Action {
}
}
export
class
KeybindingsReferenceAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.keybindingsReference
'
;
...
...
@@ -169,20 +159,6 @@ export class OpenTipsAndTricksUrlAction extends Action {
}
}
export
class
ToggleSharedProcessAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.toggleSharedProcess
'
;
static
LABEL
=
nls
.
localize
(
'
toggleSharedProcess
'
,
"
Toggle Shared Process
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IWindowsService
private
readonly
windowsService
:
IWindowsService
)
{
super
(
id
,
label
);
}
run
():
Promise
<
void
>
{
return
this
.
windowsService
.
toggleSharedProcess
();
}
}
export
const
enum
Direction
{
Next
,
Previous
,
...
...
@@ -729,168 +705,3 @@ export class ShowAboutDialogAction extends Action {
return
this
.
windowsService
.
openAboutDialog
();
}
}
export
class
InspectContextKeysAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.inspectContextKeys
'
;
static
LABEL
=
nls
.
localize
(
'
inspect context keys
'
,
"
Inspect Context Keys
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IContextKeyService
private
readonly
contextKeyService
:
IContextKeyService
,
@
IWindowService
private
readonly
windowService
:
IWindowService
,
)
{
super
(
id
,
label
);
}
run
():
Promise
<
void
>
{
const
disposables
:
IDisposable
[]
=
[];
const
stylesheet
=
createStyleSheet
();
disposables
.
push
(
toDisposable
(()
=>
{
if
(
stylesheet
.
parentNode
)
{
stylesheet
.
parentNode
.
removeChild
(
stylesheet
);
}
}));
createCSSRule
(
'
*
'
,
'
cursor: crosshair !important;
'
,
stylesheet
);
const
hoverFeedback
=
document
.
createElement
(
'
div
'
);
document
.
body
.
appendChild
(
hoverFeedback
);
disposables
.
push
(
toDisposable
(()
=>
document
.
body
.
removeChild
(
hoverFeedback
)));
hoverFeedback
.
style
.
position
=
'
absolute
'
;
hoverFeedback
.
style
.
pointerEvents
=
'
none
'
;
hoverFeedback
.
style
.
backgroundColor
=
'
rgba(255, 0, 0, 0.5)
'
;
hoverFeedback
.
style
.
zIndex
=
'
1000
'
;
const
onMouseMove
=
domEvent
(
document
.
body
,
'
mousemove
'
,
true
);
disposables
.
push
(
onMouseMove
(
e
=>
{
const
target
=
e
.
target
as
HTMLElement
;
const
position
=
getDomNodePagePosition
(
target
);
hoverFeedback
.
style
.
top
=
`
${
position
.
top
}
px`
;
hoverFeedback
.
style
.
left
=
`
${
position
.
left
}
px`
;
hoverFeedback
.
style
.
width
=
`
${
position
.
width
}
px`
;
hoverFeedback
.
style
.
height
=
`
${
position
.
height
}
px`
;
}));
const
onMouseDown
=
Event
.
once
(
domEvent
(
document
.
body
,
'
mousedown
'
,
true
));
onMouseDown
(
e
=>
{
e
.
preventDefault
();
e
.
stopPropagation
();
},
null
,
disposables
);
const
onMouseUp
=
Event
.
once
(
domEvent
(
document
.
body
,
'
mouseup
'
,
true
));
onMouseUp
(
e
=>
{
e
.
preventDefault
();
e
.
stopPropagation
();
const
context
=
this
.
contextKeyService
.
getContext
(
e
.
target
as
HTMLElement
)
as
Context
;
console
.
log
(
context
.
collectAllValues
());
this
.
windowService
.
openDevTools
();
dispose
(
disposables
);
},
null
,
disposables
);
return
Promise
.
resolve
();
}
}
export
class
ToggleScreencastModeAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.toggleScreencastMode
'
;
static
LABEL
=
nls
.
localize
(
'
toggle mouse clicks
'
,
"
Toggle Screencast Mode
"
);
static
disposable
:
IDisposable
|
undefined
;
constructor
(
id
:
string
,
label
:
string
,
@
IKeybindingService
private
readonly
keybindingService
:
IKeybindingService
)
{
super
(
id
,
label
);
}
async
run
():
Promise
<
void
>
{
if
(
ToggleScreencastModeAction
.
disposable
)
{
ToggleScreencastModeAction
.
disposable
.
dispose
();
ToggleScreencastModeAction
.
disposable
=
undefined
;
return
;
}
const
mouseMarker
=
append
(
document
.
body
,
$
(
'
div
'
));
mouseMarker
.
style
.
position
=
'
absolute
'
;
mouseMarker
.
style
.
border
=
'
2px solid red
'
;
mouseMarker
.
style
.
borderRadius
=
'
20px
'
;
mouseMarker
.
style
.
width
=
'
20px
'
;
mouseMarker
.
style
.
height
=
'
20px
'
;
mouseMarker
.
style
.
top
=
'
0
'
;
mouseMarker
.
style
.
left
=
'
0
'
;
mouseMarker
.
style
.
zIndex
=
'
100000
'
;
mouseMarker
.
style
.
content
=
'
'
;
mouseMarker
.
style
.
pointerEvents
=
'
none
'
;
mouseMarker
.
style
.
display
=
'
none
'
;
const
onMouseDown
=
domEvent
(
document
.
body
,
'
mousedown
'
,
true
);
const
onMouseUp
=
domEvent
(
document
.
body
,
'
mouseup
'
,
true
);
const
onMouseMove
=
domEvent
(
document
.
body
,
'
mousemove
'
,
true
);
const
mouseListener
=
onMouseDown
(
e
=>
{
mouseMarker
.
style
.
top
=
`
${
e
.
clientY
-
10
}
px`
;
mouseMarker
.
style
.
left
=
`
${
e
.
clientX
-
10
}
px`
;
mouseMarker
.
style
.
display
=
'
block
'
;
const
mouseMoveListener
=
onMouseMove
(
e
=>
{
mouseMarker
.
style
.
top
=
`
${
e
.
clientY
-
10
}
px`
;
mouseMarker
.
style
.
left
=
`
${
e
.
clientX
-
10
}
px`
;
});
Event
.
once
(
onMouseUp
)(()
=>
{
mouseMarker
.
style
.
display
=
'
none
'
;
mouseMoveListener
.
dispose
();
});
});
const
keyboardMarker
=
append
(
document
.
body
,
$
(
'
div
'
));
keyboardMarker
.
style
.
position
=
'
absolute
'
;
keyboardMarker
.
style
.
backgroundColor
=
'
rgba(0, 0, 0 ,0.5)
'
;
keyboardMarker
.
style
.
width
=
'
100%
'
;
keyboardMarker
.
style
.
height
=
'
100px
'
;
keyboardMarker
.
style
.
bottom
=
'
20%
'
;
keyboardMarker
.
style
.
left
=
'
0
'
;
keyboardMarker
.
style
.
zIndex
=
'
100000
'
;
keyboardMarker
.
style
.
pointerEvents
=
'
none
'
;
keyboardMarker
.
style
.
color
=
'
white
'
;
keyboardMarker
.
style
.
lineHeight
=
'
100px
'
;
keyboardMarker
.
style
.
textAlign
=
'
center
'
;
keyboardMarker
.
style
.
fontSize
=
'
56px
'
;
keyboardMarker
.
style
.
display
=
'
none
'
;
const
onKeyDown
=
domEvent
(
document
.
body
,
'
keydown
'
,
true
);
let
keyboardTimeout
:
IDisposable
=
Disposable
.
None
;
const
keyboardListener
=
onKeyDown
(
e
=>
{
keyboardTimeout
.
dispose
();
const
event
=
new
StandardKeyboardEvent
(
e
);
const
keybinding
=
this
.
keybindingService
.
resolveKeyboardEvent
(
event
);
const
label
=
keybinding
.
getLabel
();
if
(
!
event
.
ctrlKey
&&
!
event
.
altKey
&&
!
event
.
metaKey
&&
!
event
.
shiftKey
&&
this
.
keybindingService
.
mightProducePrintableCharacter
(
event
)
&&
label
)
{
keyboardMarker
.
textContent
+=
'
'
+
label
;
}
else
{
keyboardMarker
.
textContent
=
label
;
}
keyboardMarker
.
style
.
display
=
'
block
'
;
const
promise
=
timeout
(
800
);
keyboardTimeout
=
toDisposable
(()
=>
promise
.
cancel
());
promise
.
then
(()
=>
{
keyboardMarker
.
textContent
=
''
;
keyboardMarker
.
style
.
display
=
'
none
'
;
});
});
ToggleScreencastModeAction
.
disposable
=
toDisposable
(()
=>
{
mouseListener
.
dispose
();
keyboardListener
.
dispose
();
document
.
body
.
removeChild
(
mouseMarker
);
});
}
}
src/vs/workbench/electron-browser/actions/developerActions.ts
0 → 100644
浏览文件 @
ca7e3a01
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
IWindowService
,
IWindowsService
}
from
'
vs/platform/windows/common/windows
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
domEvent
}
from
'
vs/base/browser/event
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
IDisposable
,
toDisposable
,
dispose
,
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
getDomNodePagePosition
,
createStyleSheet
,
createCSSRule
,
append
,
$
}
from
'
vs/base/browser/dom
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
Context
}
from
'
vs/platform/contextkey/browser/contextKeyService
'
;
import
{
StandardKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
timeout
}
from
'
vs/base/common/async
'
;
// --- actions
export
class
ToggleDevToolsAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.toggleDevTools
'
;
static
LABEL
=
nls
.
localize
(
'
toggleDevTools
'
,
"
Toggle Developer Tools
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IWindowService
private
readonly
windowsService
:
IWindowService
)
{
super
(
id
,
label
);
}
run
():
Promise
<
void
>
{
return
this
.
windowsService
.
toggleDevTools
();
}
}
export
class
ToggleSharedProcessAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.toggleSharedProcess
'
;
static
LABEL
=
nls
.
localize
(
'
toggleSharedProcess
'
,
"
Toggle Shared Process
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IWindowsService
private
readonly
windowsService
:
IWindowsService
)
{
super
(
id
,
label
);
}
run
():
Promise
<
void
>
{
return
this
.
windowsService
.
toggleSharedProcess
();
}
}
export
class
InspectContextKeysAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.inspectContextKeys
'
;
static
LABEL
=
nls
.
localize
(
'
inspect context keys
'
,
"
Inspect Context Keys
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IContextKeyService
private
readonly
contextKeyService
:
IContextKeyService
,
@
IWindowService
private
readonly
windowService
:
IWindowService
,
)
{
super
(
id
,
label
);
}
run
():
Promise
<
void
>
{
const
disposables
:
IDisposable
[]
=
[];
const
stylesheet
=
createStyleSheet
();
disposables
.
push
(
toDisposable
(()
=>
{
if
(
stylesheet
.
parentNode
)
{
stylesheet
.
parentNode
.
removeChild
(
stylesheet
);
}
}));
createCSSRule
(
'
*
'
,
'
cursor: crosshair !important;
'
,
stylesheet
);
const
hoverFeedback
=
document
.
createElement
(
'
div
'
);
document
.
body
.
appendChild
(
hoverFeedback
);
disposables
.
push
(
toDisposable
(()
=>
document
.
body
.
removeChild
(
hoverFeedback
)));
hoverFeedback
.
style
.
position
=
'
absolute
'
;
hoverFeedback
.
style
.
pointerEvents
=
'
none
'
;
hoverFeedback
.
style
.
backgroundColor
=
'
rgba(255, 0, 0, 0.5)
'
;
hoverFeedback
.
style
.
zIndex
=
'
1000
'
;
const
onMouseMove
=
domEvent
(
document
.
body
,
'
mousemove
'
,
true
);
disposables
.
push
(
onMouseMove
(
e
=>
{
const
target
=
e
.
target
as
HTMLElement
;
const
position
=
getDomNodePagePosition
(
target
);
hoverFeedback
.
style
.
top
=
`
${
position
.
top
}
px`
;
hoverFeedback
.
style
.
left
=
`
${
position
.
left
}
px`
;
hoverFeedback
.
style
.
width
=
`
${
position
.
width
}
px`
;
hoverFeedback
.
style
.
height
=
`
${
position
.
height
}
px`
;
}));
const
onMouseDown
=
Event
.
once
(
domEvent
(
document
.
body
,
'
mousedown
'
,
true
));
onMouseDown
(
e
=>
{
e
.
preventDefault
();
e
.
stopPropagation
();
},
null
,
disposables
);
const
onMouseUp
=
Event
.
once
(
domEvent
(
document
.
body
,
'
mouseup
'
,
true
));
onMouseUp
(
e
=>
{
e
.
preventDefault
();
e
.
stopPropagation
();
const
context
=
this
.
contextKeyService
.
getContext
(
e
.
target
as
HTMLElement
)
as
Context
;
console
.
log
(
context
.
collectAllValues
());
this
.
windowService
.
openDevTools
();
dispose
(
disposables
);
},
null
,
disposables
);
return
Promise
.
resolve
();
}
}
export
class
ToggleScreencastModeAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.toggleScreencastMode
'
;
static
LABEL
=
nls
.
localize
(
'
toggle mouse clicks
'
,
"
Toggle Screencast Mode
"
);
static
disposable
:
IDisposable
|
undefined
;
constructor
(
id
:
string
,
label
:
string
,
@
IKeybindingService
private
readonly
keybindingService
:
IKeybindingService
)
{
super
(
id
,
label
);
}
async
run
():
Promise
<
void
>
{
if
(
ToggleScreencastModeAction
.
disposable
)
{
ToggleScreencastModeAction
.
disposable
.
dispose
();
ToggleScreencastModeAction
.
disposable
=
undefined
;
return
;
}
const
mouseMarker
=
append
(
document
.
body
,
$
(
'
div
'
));
mouseMarker
.
style
.
position
=
'
absolute
'
;
mouseMarker
.
style
.
border
=
'
2px solid red
'
;
mouseMarker
.
style
.
borderRadius
=
'
20px
'
;
mouseMarker
.
style
.
width
=
'
20px
'
;
mouseMarker
.
style
.
height
=
'
20px
'
;
mouseMarker
.
style
.
top
=
'
0
'
;
mouseMarker
.
style
.
left
=
'
0
'
;
mouseMarker
.
style
.
zIndex
=
'
100000
'
;
mouseMarker
.
style
.
content
=
'
'
;
mouseMarker
.
style
.
pointerEvents
=
'
none
'
;
mouseMarker
.
style
.
display
=
'
none
'
;
const
onMouseDown
=
domEvent
(
document
.
body
,
'
mousedown
'
,
true
);
const
onMouseUp
=
domEvent
(
document
.
body
,
'
mouseup
'
,
true
);
const
onMouseMove
=
domEvent
(
document
.
body
,
'
mousemove
'
,
true
);
const
mouseListener
=
onMouseDown
(
e
=>
{
mouseMarker
.
style
.
top
=
`
${
e
.
clientY
-
10
}
px`
;
mouseMarker
.
style
.
left
=
`
${
e
.
clientX
-
10
}
px`
;
mouseMarker
.
style
.
display
=
'
block
'
;
const
mouseMoveListener
=
onMouseMove
(
e
=>
{
mouseMarker
.
style
.
top
=
`
${
e
.
clientY
-
10
}
px`
;
mouseMarker
.
style
.
left
=
`
${
e
.
clientX
-
10
}
px`
;
});
Event
.
once
(
onMouseUp
)(()
=>
{
mouseMarker
.
style
.
display
=
'
none
'
;
mouseMoveListener
.
dispose
();
});
});
const
keyboardMarker
=
append
(
document
.
body
,
$
(
'
div
'
));
keyboardMarker
.
style
.
position
=
'
absolute
'
;
keyboardMarker
.
style
.
backgroundColor
=
'
rgba(0, 0, 0 ,0.5)
'
;
keyboardMarker
.
style
.
width
=
'
100%
'
;
keyboardMarker
.
style
.
height
=
'
100px
'
;
keyboardMarker
.
style
.
bottom
=
'
20%
'
;
keyboardMarker
.
style
.
left
=
'
0
'
;
keyboardMarker
.
style
.
zIndex
=
'
100000
'
;
keyboardMarker
.
style
.
pointerEvents
=
'
none
'
;
keyboardMarker
.
style
.
color
=
'
white
'
;
keyboardMarker
.
style
.
lineHeight
=
'
100px
'
;
keyboardMarker
.
style
.
textAlign
=
'
center
'
;
keyboardMarker
.
style
.
fontSize
=
'
56px
'
;
keyboardMarker
.
style
.
display
=
'
none
'
;
const
onKeyDown
=
domEvent
(
document
.
body
,
'
keydown
'
,
true
);
let
keyboardTimeout
:
IDisposable
=
Disposable
.
None
;
const
keyboardListener
=
onKeyDown
(
e
=>
{
keyboardTimeout
.
dispose
();
const
event
=
new
StandardKeyboardEvent
(
e
);
const
keybinding
=
this
.
keybindingService
.
resolveKeyboardEvent
(
event
);
const
label
=
keybinding
.
getLabel
();
if
(
!
event
.
ctrlKey
&&
!
event
.
altKey
&&
!
event
.
metaKey
&&
!
event
.
shiftKey
&&
this
.
keybindingService
.
mightProducePrintableCharacter
(
event
)
&&
label
)
{
keyboardMarker
.
textContent
+=
'
'
+
label
;
}
else
{
keyboardMarker
.
textContent
=
label
;
}
keyboardMarker
.
style
.
display
=
'
block
'
;
const
promise
=
timeout
(
800
);
keyboardTimeout
=
toDisposable
(()
=>
promise
.
cancel
());
promise
.
then
(()
=>
{
keyboardMarker
.
textContent
=
''
;
keyboardMarker
.
style
.
display
=
'
none
'
;
});
});
ToggleScreencastModeAction
.
disposable
=
toDisposable
(()
=>
{
mouseListener
.
dispose
();
keyboardListener
.
dispose
();
document
.
body
.
removeChild
(
mouseMarker
);
});
}
}
src/vs/workbench/electron-browser/actions/windowActions.ts
浏览文件 @
ca7e3a01
...
...
@@ -75,20 +75,6 @@ export class ToggleFullScreenAction extends Action {
}
}
export
class
ToggleDevToolsAction
extends
Action
{
static
readonly
ID
=
'
workbench.action.toggleDevTools
'
;
static
LABEL
=
nls
.
localize
(
'
toggleDevTools
'
,
"
Toggle Developer Tools
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IWindowService
private
readonly
windowsService
:
IWindowService
)
{
super
(
id
,
label
);
}
run
():
Promise
<
void
>
{
return
this
.
windowsService
.
toggleDevTools
();
}
}
export
abstract
class
BaseZoomAction
extends
Action
{
private
static
readonly
SETTING_KEY
=
'
window.zoomLevel
'
;
...
...
src/vs/workbench/electron-browser/main.contribution.ts
浏览文件 @
ca7e3a01
...
...
@@ -12,7 +12,8 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions, Configur
import
{
IWorkbenchActionRegistry
,
Extensions
}
from
'
vs/workbench/common/actions
'
;
import
{
KeyMod
,
KeyChord
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
isWindows
,
isLinux
,
isMacintosh
}
from
'
vs/base/common/platform
'
;
import
{
KeybindingsReferenceAction
,
OpenDocumentationUrlAction
,
OpenIntroductoryVideosUrlAction
,
OpenTipsAndTricksUrlAction
,
OpenIssueReporterAction
,
ReportPerformanceIssueUsingReporterAction
,
NavigateUpAction
,
NavigateDownAction
,
NavigateLeftAction
,
NavigateRightAction
,
IncreaseViewSizeAction
,
DecreaseViewSizeAction
,
ToggleSharedProcessAction
,
ShowAboutDialogAction
,
InspectContextKeysAction
,
OpenProcessExplorer
,
OpenTwitterUrlAction
,
OpenRequestFeatureUrlAction
,
OpenPrivacyStatementUrlAction
,
OpenLicenseUrlAction
,
ToggleScreencastModeAction
}
from
'
vs/workbench/electron-browser/actions
'
;
import
{
KeybindingsReferenceAction
,
OpenDocumentationUrlAction
,
OpenIntroductoryVideosUrlAction
,
OpenTipsAndTricksUrlAction
,
OpenIssueReporterAction
,
ReportPerformanceIssueUsingReporterAction
,
NavigateUpAction
,
NavigateDownAction
,
NavigateLeftAction
,
NavigateRightAction
,
IncreaseViewSizeAction
,
DecreaseViewSizeAction
,
ShowAboutDialogAction
,
OpenProcessExplorer
,
OpenTwitterUrlAction
,
OpenRequestFeatureUrlAction
,
OpenPrivacyStatementUrlAction
,
OpenLicenseUrlAction
}
from
'
vs/workbench/electron-browser/actions
'
;
import
{
ToggleSharedProcessAction
,
InspectContextKeysAction
,
ToggleScreencastModeAction
}
from
'
vs/workbench/electron-browser/actions/developerActions
'
;
import
{
ZoomResetAction
,
ZoomOutAction
,
ZoomInAction
,
ToggleFullScreenAction
,
CloseCurrentWindowAction
,
SwitchWindow
,
NewWindowAction
,
QuickSwitchWindow
,
QuickOpenRecentAction
,
inRecentFilesPickerContextKey
,
OpenRecentAction
}
from
'
vs/workbench/electron-browser/actions/windowActions
'
;
import
{
AddRootFolderAction
,
GlobalRemoveRootFolderAction
,
OpenWorkspaceAction
,
SaveWorkspaceAsAction
,
OpenWorkspaceConfigFileAction
,
DuplicateWorkspaceInNewWindowAction
,
OpenFileFolderAction
,
OpenFileAction
,
OpenFolderAction
,
CloseWorkspaceAction
}
from
'
vs/workbench/browser/actions/workspaceActions
'
;
import
{
ContextKeyExpr
,
RawContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
ca7e3a01
...
...
@@ -80,7 +80,8 @@ import { IContextMenuService, IContextViewService } from 'vs/platform/contextvie
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IWorkbenchActionRegistry
,
Extensions
}
from
'
vs/workbench/common/actions
'
;
import
{
ShowPreviousWindowTab
,
MoveWindowTabToNewWindow
,
MergeAllWindowTabs
,
ShowNextWindowTab
,
ToggleWindowTabsBar
,
NewWindowTab
}
from
'
vs/workbench/electron-browser/actions
'
;
import
{
OpenRecentAction
,
ToggleDevToolsAction
,
ReloadWindowAction
,
ReloadWindowWithExtensionsDisabledAction
}
from
'
vs/workbench/electron-browser/actions/windowActions
'
;
import
{
OpenRecentAction
,
ReloadWindowAction
,
ReloadWindowWithExtensionsDisabledAction
}
from
'
vs/workbench/electron-browser/actions/windowActions
'
;
import
{
ToggleDevToolsAction
}
from
'
vs/workbench/electron-browser/actions/developerActions
'
;
import
{
KeyMod
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
IWorkspaceEditingService
}
from
'
vs/workbench/services/workspace/common/workspaceEditing
'
;
import
{
WorkspaceEditingService
}
from
'
vs/workbench/services/workspace/node/workspaceEditingService
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录