Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
78783be3
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,发现更多精彩内容 >>
提交
78783be3
编写于
5月 17, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
grid - more service adoption
上级
14aea850
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
115 addition
and
169 deletion
+115
-169
src/vs/workbench/api/browser/viewsContainersExtensionPoint.ts
...vs/workbench/api/browser/viewsContainersExtensionPoint.ts
+3
-3
src/vs/workbench/browser/parts/editor/editorActions.ts
src/vs/workbench/browser/parts/editor/editorActions.ts
+29
-37
src/vs/workbench/browser/parts/notifications/notificationsCenter.ts
...kbench/browser/parts/notifications/notificationsCenter.ts
+11
-17
src/vs/workbench/browser/parts/notifications/notificationsToasts.ts
...kbench/browser/parts/notifications/notificationsToasts.ts
+10
-17
src/vs/workbench/browser/parts/quickinput/quickInput.ts
src/vs/workbench/browser/parts/quickinput/quickInput.ts
+4
-11
src/vs/workbench/browser/parts/quickopen/quickOpenController.ts
.../workbench/browser/parts/quickopen/quickOpenController.ts
+3
-10
src/vs/workbench/browser/viewlet.ts
src/vs/workbench/browser/viewlet.ts
+5
-8
src/vs/workbench/electron-browser/commands.ts
src/vs/workbench/electron-browser/commands.ts
+3
-3
src/vs/workbench/electron-browser/window.ts
src/vs/workbench/electron-browser/window.ts
+16
-25
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+19
-28
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
...kbench/parts/debug/electron-browser/debug.contribution.ts
+3
-3
src/vs/workbench/parts/extensions/browser/extensionsActions.ts
...s/workbench/parts/extensions/browser/extensionsActions.ts
+3
-2
src/vs/workbench/parts/files/electron-browser/files.contribution.ts
...kbench/parts/files/electron-browser/files.contribution.ts
+3
-2
src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts
.../workbench/parts/scm/electron-browser/scm.contribution.ts
+3
-3
未找到文件。
src/vs/workbench/api/browser/viewsContainersExtensionPoint.ts
浏览文件 @
78783be3
...
...
@@ -29,7 +29,7 @@ import { forEach } from 'vs/base/common/collections';
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
,
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
INextEditorService
}
from
'
vs/workbench/services/editor/common/nextEditorService
'
;
import
{
INextEditorGroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroupsService
'
;
export
interface
IUserFriendlyViewsContainerDescriptor
{
id
:
string
;
...
...
@@ -184,9 +184,9 @@ class ViewsContainersExtensionHandler implements IWorkbenchContribution {
constructor
(
id
:
string
,
label
:
string
,
@
IViewletService
viewletService
:
IViewletService
,
@
INextEditor
Service
editorService
:
INextEditor
Service
@
INextEditor
GroupsService
editorGroupService
:
INextEditorGroups
Service
)
{
super
(
id
,
label
,
id
,
viewletService
,
editorService
);
super
(
id
,
label
,
id
,
viewletService
,
editor
Group
Service
);
}
}
const
registry
=
Registry
.
as
<
IWorkbenchActionRegistry
>
(
ActionExtensions
.
WorkbenchActions
);
...
...
src/vs/workbench/browser/parts/editor/editorActions.ts
浏览文件 @
78783be3
...
...
@@ -315,16 +315,13 @@ export class FocusActiveGroupAction extends Action {
constructor
(
id
:
string
,
label
:
string
,
@
I
WorkbenchEditorService
private
editorService
:
IWorkbenchEditor
Service
@
I
NextEditorGroupsService
private
editorGroupService
:
INextEditorGroups
Service
)
{
super
(
id
,
label
);
}
public
run
():
TPromise
<
any
>
{
const
activeEditor
=
this
.
editorService
.
getActiveEditor
();
if
(
activeEditor
)
{
activeEditor
.
focus
();
}
this
.
editorGroupService
.
activeGroup
.
focus
();
return
TPromise
.
as
(
true
);
}
...
...
@@ -699,24 +696,25 @@ export class RevertAndCloseEditorAction extends Action {
constructor
(
id
:
string
,
label
:
string
,
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
INextEditorService
private
editorService
:
INextEditorService
,
@
INextEditorGroupsService
private
editorGroupService
:
INextEditorGroupsService
)
{
super
(
id
,
label
);
}
public
run
():
TPromise
<
any
>
{
const
active
Editor
=
this
.
editorService
.
getActiveEditor
()
;
if
(
active
Editor
&&
activeEditor
.
input
)
{
const
input
=
activeEditor
.
input
;
const
position
=
activeEditor
.
group
;
const
active
Control
=
this
.
editorService
.
activeControl
;
if
(
active
Control
&&
activeControl
.
input
)
{
const
editor
=
activeControl
.
input
;
const
group
=
this
.
editorGroupService
.
getGroup
(
activeControl
.
group
)
;
// first try a normal revert where the contents of the editor are restored
return
activeEditor
.
input
.
revert
().
then
(()
=>
this
.
editorService
.
closeEditor
(
position
,
input
),
error
=>
{
return
editor
.
revert
().
then
(()
=>
group
.
closeEditor
(
editor
),
error
=>
{
// if that fails, since we are about to close the editor, we accept that
// the editor cannot be reverted and instead do a soft revert that just
// enables us to close the editor. With this, a user can always close a
// dirty editor even when reverting fails.
return
activeEditor
.
input
.
revert
({
soft
:
true
}).
then
(()
=>
this
.
editorService
.
closeEditor
(
position
,
input
));
return
editor
.
revert
({
soft
:
true
}).
then
(()
=>
group
.
closeEditor
(
editor
));
});
}
...
...
@@ -732,22 +730,31 @@ export class CloseLeftEditorsInGroupAction extends Action {
constructor
(
id
:
string
,
label
:
string
,
@
I
WorkbenchEditorService
private
editorService
:
IWorkbench
EditorService
,
@
I
EditorGroupService
private
groupService
:
IEditorGroup
Service
@
I
NextEditorService
private
editorService
:
INext
EditorService
,
@
I
NextEditorGroupsService
private
groupService
:
INextEditorGroups
Service
)
{
super
(
id
,
label
);
}
public
run
(
context
?:
IEditorIdentifier
):
TPromise
<
any
>
{
const
editor
=
getTarget
(
this
.
editorService
,
this
.
groupService
,
context
);
if
(
editor
)
{
return
this
.
editorService
.
closeEditors
(
editor
.
position
,
{
except
:
editor
.
input
,
direction
:
CloseDirection
.
LEFT
});
const
{
group
,
editor
}
=
getTarget
(
this
.
editorService
,
this
.
groupService
,
context
);
if
(
group
&&
editor
)
{
return
group
.
closeEditors
({
direction
:
CloseDirection
.
LEFT
,
except
:
editor
});
}
return
TPromise
.
as
(
false
);
}
}
function
getTarget
(
editorService
:
INextEditorService
,
editorGroupService
:
INextEditorGroupsService
,
context
?:
IEditorIdentifier
):
{
editor
:
IEditorInput
,
group
:
INextEditorGroup
}
{
if
(
context
)
{
return
{
editor
:
context
.
editor
,
group
:
editorGroupService
.
getGroup
(
context
.
groupId
)
};
}
// Fallback to active group
return
{
group
:
editorGroupService
.
activeGroup
,
editor
:
editorGroupService
.
activeGroup
.
activeEditor
};
}
export
class
CloseAllEditorsAction
extends
Action
{
public
static
readonly
ID
=
'
workbench.action.closeAllEditors
'
;
...
...
@@ -952,19 +959,6 @@ export class MaximizeGroupAction extends Action {
}
}
function
getTarget
(
editorService
:
IWorkbenchEditorService
,
editorGroupService
:
IEditorGroupService
,
context
?:
IEditorIdentifier
):
{
input
:
IEditorInput
,
position
:
Position
}
{
if
(
context
)
{
return
{
input
:
context
.
editor
,
position
:
editorGroupService
.
getStacksModel
().
positionOfGroup
(
editorGroupService
.
getStacksModel
().
getGroup
(
context
.
groupId
))
};
}
const
activeEditor
=
editorService
.
getActiveEditor
();
if
(
activeEditor
)
{
return
{
input
:
activeEditor
.
input
,
position
:
activeEditor
.
group
};
}
return
null
;
}
export
abstract
class
BaseNavigateEditorAction
extends
Action
{
constructor
(
...
...
@@ -1380,18 +1374,16 @@ export class FocusLastEditorInStackAction extends Action {
constructor
(
id
:
string
,
label
:
string
,
@
I
EditorGroupService
private
editorGroupService
:
IEditorGroup
Service
,
@
I
WorkbenchEditorService
private
editorService
:
IWorkbench
EditorService
@
I
NextEditorGroupsService
private
editorGroupService
:
INextEditorGroups
Service
,
@
I
NextEditorService
private
editorService
:
INext
EditorService
)
{
super
(
id
,
label
);
}
public
run
():
TPromise
<
any
>
{
const
active
=
this
.
editorService
.
getActiveEditor
();
if
(
active
)
{
const
group
=
this
.
editorGroupService
.
getStacksModel
().
groupAt
(
active
.
group
);
const
editor
=
group
.
getEditor
(
group
.
count
-
1
);
const
activeGroup
=
this
.
editorGroupService
.
activeGroup
;
if
(
activeGroup
)
{
const
editor
=
activeGroup
.
getEditor
(
activeGroup
.
count
-
1
);
if
(
editor
)
{
return
this
.
editorService
.
openEditor
(
editor
);
}
...
...
src/vs/workbench/browser/parts/notifications/notificationsCenter.ts
浏览文件 @
78783be3
...
...
@@ -18,7 +18,7 @@ import { NotificationsList } from 'vs/workbench/browser/parts/notifications/noti
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
addClass
,
removeClass
,
isAncestor
,
Dimension
}
from
'
vs/base/browser/dom
'
;
import
{
widgetShadow
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
INextEditor
Service
}
from
'
vs/workbench/services/editor/common/nextEditor
Service
'
;
import
{
INextEditor
GroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroups
Service
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
ActionBar
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
ClearAllNotificationsAction
,
HideNotificationsCenterAction
,
NotificationActionRunner
}
from
'
vs/workbench/browser/parts/notifications/notificationsActions
'
;
...
...
@@ -45,7 +45,7 @@ export class NotificationsCenter extends Themable {
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IPartService
private
partService
:
IPartService
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
INextEditor
Service
private
editorService
:
INextEditor
Service
,
@
INextEditor
GroupsService
private
editorGroupService
:
INextEditorGroups
Service
,
@
IKeybindingService
private
keybindingService
:
IKeybindingService
)
{
super
(
themeService
);
...
...
@@ -174,7 +174,7 @@ export class NotificationsCenter extends Themable {
return
;
// only if visible
}
let
focus
Editor
=
false
;
let
focus
Group
=
false
;
// Update notifications list based on event
switch
(
e
.
kind
)
{
...
...
@@ -185,7 +185,7 @@ export class NotificationsCenter extends Themable {
this
.
notificationsList
.
updateNotificationsList
(
e
.
index
,
1
,
[
e
.
item
]);
break
;
case
NotificationChangeType
.
REMOVE
:
focus
Editor
=
isAncestor
(
document
.
activeElement
,
this
.
notificationsCenterContainer
);
focus
Group
=
isAncestor
(
document
.
activeElement
,
this
.
notificationsCenterContainer
);
this
.
notificationsList
.
updateNotificationsList
(
e
.
index
,
1
);
break
;
}
...
...
@@ -197,26 +197,19 @@ export class NotificationsCenter extends Themable {
if
(
this
.
model
.
notifications
.
length
===
0
)
{
this
.
hide
();
// Restore focus to editor if we had focus
if
(
focus
Editor
)
{
this
.
focusEditor
();
// Restore focus to editor
group
if we had focus
if
(
focus
Group
)
{
this
.
editorGroupService
.
activeGroup
.
focus
();
}
}
}
private
focusEditor
():
void
{
const
activeControl
=
this
.
editorService
.
activeControl
;
if
(
activeControl
)
{
activeControl
.
focus
();
}
}
public
hide
():
void
{
if
(
!
this
.
_isVisible
||
!
this
.
notificationsCenterContainer
)
{
return
;
// already hidden
}
const
focus
Editor
=
isAncestor
(
document
.
activeElement
,
this
.
notificationsCenterContainer
);
const
focus
Group
=
isAncestor
(
document
.
activeElement
,
this
.
notificationsCenterContainer
);
// Hide
this
.
_isVisible
=
false
;
...
...
@@ -229,8 +222,9 @@ export class NotificationsCenter extends Themable {
// Event
this
.
_onDidChangeVisibility
.
fire
();
if
(
focusEditor
)
{
this
.
focusEditor
();
// Restore focus to editor group if we had focus
if
(
focusGroup
)
{
this
.
editorGroupService
.
activeGroup
.
focus
();
}
}
...
...
src/vs/workbench/browser/parts/notifications/notificationsToasts.ts
浏览文件 @
78783be3
...
...
@@ -16,7 +16,7 @@ import { IPartService, Parts } from 'vs/workbench/services/part/common/partServi
import
{
Themable
,
NOTIFICATIONS_TOAST_BORDER
}
from
'
vs/workbench/common/theme
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
widgetShadow
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
INextEditor
Service
}
from
'
vs/workbench/services/editor/common/nextEditor
Service
'
;
import
{
INextEditor
GroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroups
Service
'
;
import
{
NotificationsToastsVisibleContext
}
from
'
vs/workbench/browser/parts/notifications/notificationsCommands
'
;
import
{
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
localize
}
from
'
vs/nls
'
;
...
...
@@ -64,7 +64,7 @@ export class NotificationsToasts extends Themable {
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IPartService
private
partService
:
IPartService
,
@
IThemeService
themeService
:
IThemeService
,
@
INextEditor
Service
private
editorService
:
INextEditor
Service
,
@
INextEditor
GroupsService
private
editorGroupService
:
INextEditorGroups
Service
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
ILifecycleService
private
lifecycleService
:
ILifecycleService
)
{
...
...
@@ -219,11 +219,11 @@ export class NotificationsToasts extends Themable {
private
removeToast
(
item
:
INotificationViewItem
):
void
{
const
notificationToast
=
this
.
mapNotificationToToast
.
get
(
item
);
let
focus
Editor
=
false
;
let
focus
Group
=
false
;
if
(
notificationToast
)
{
const
toastHasDOMFocus
=
isAncestor
(
document
.
activeElement
,
notificationToast
.
container
);
if
(
toastHasDOMFocus
)
{
focus
Editor
=
!
(
this
.
focusNext
()
||
this
.
focusPrevious
());
// focus next if any, otherwise focus editor
focus
Group
=
!
(
this
.
focusNext
()
||
this
.
focusPrevious
());
// focus next if any, otherwise focus editor
}
// Listeners
...
...
@@ -242,20 +242,13 @@ export class NotificationsToasts extends Themable {
else
{
this
.
doHide
();
// Move focus
to editor
as needed
if
(
focus
Editor
)
{
this
.
focusEditor
();
// Move focus
back to editor group
as needed
if
(
focus
Group
)
{
this
.
editorGroupService
.
activeGroup
.
focus
();
}
}
}
private
focusEditor
():
void
{
const
activeControl
=
this
.
editorService
.
activeControl
;
if
(
activeControl
)
{
activeControl
.
focus
();
}
}
private
removeToasts
():
void
{
this
.
mapNotificationToToast
.
forEach
(
toast
=>
dispose
(
toast
.
disposeables
));
this
.
mapNotificationToToast
.
clear
();
...
...
@@ -273,12 +266,12 @@ export class NotificationsToasts extends Themable {
}
public
hide
():
void
{
const
focus
Editor
=
isAncestor
(
document
.
activeElement
,
this
.
notificationsToastsContainer
);
const
focus
Group
=
isAncestor
(
document
.
activeElement
,
this
.
notificationsToastsContainer
);
this
.
removeToasts
();
if
(
focus
Editor
)
{
this
.
focusEditor
();
if
(
focus
Group
)
{
this
.
editorGroupService
.
activeGroup
.
focus
();
}
}
...
...
src/vs/workbench/browser/parts/quickinput/quickInput.ts
浏览文件 @
78783be3
...
...
@@ -33,7 +33,7 @@ import { Button } from 'vs/base/browser/ui/button/button';
import
{
dispose
,
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
onUnexpectedError
,
canceled
}
from
'
vs/base/common/errors
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
{
INextEditor
Service
}
from
'
vs/workbench/services/editor/common/nextEditor
Service
'
;
import
{
INextEditor
GroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroups
Service
'
;
import
{
IContextKeyService
,
RawContextKey
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
...
...
@@ -369,7 +369,7 @@ export class QuickInputService extends Component implements IQuickInputService {
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IPartService
private
partService
:
IPartService
,
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
,
@
INextEditor
Service
private
editorService
:
INextEditor
Service
,
@
INextEditor
GroupsService
private
editorGroupService
:
INextEditorGroups
Service
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
IThemeService
themeService
:
IThemeService
)
{
...
...
@@ -534,7 +534,7 @@ export class QuickInputService extends Component implements IQuickInputService {
this
.
inQuickOpen
(
'
quickInput
'
,
false
);
this
.
ui
.
container
.
style
.
display
=
'
none
'
;
if
(
!
focusLost
)
{
this
.
restoreF
ocus
();
this
.
editorGroupService
.
activeGroup
.
f
ocus
();
}
});
result
.
then
(
null
,
onUnexpectedError
);
...
...
@@ -544,18 +544,11 @@ export class QuickInputService extends Component implements IQuickInputService {
this
.
inQuickOpen
(
'
quickInput
'
,
false
);
this
.
ui
.
container
.
style
.
display
=
'
none
'
;
if
(
!
focusLost
)
{
this
.
restoreF
ocus
();
this
.
editorGroupService
.
activeGroup
.
f
ocus
();
}
return
TPromise
.
as
(
undefined
);
}
private
restoreFocus
():
void
{
const
activeControl
=
this
.
editorService
.
activeControl
;
if
(
activeControl
)
{
activeControl
.
focus
();
}
}
pick
<
T
extends
IPickOpenEntry
,
O
extends
IPickOptions
>
(
picks
:
TPromise
<
T
[]
>
,
options
:
O
=
<
O
>
{},
token
?:
CancellationToken
):
TPromise
<
O
extends
{
canPickMany
:
true
}
?
T
[]
:
T
>
{
return
this
.
_pick
(
undefined
,
picks
,
options
,
token
);
}
...
...
src/vs/workbench/browser/parts/quickopen/quickOpenController.ts
浏览文件 @
78783be3
...
...
@@ -56,6 +56,7 @@ import Severity from 'vs/base/common/severity';
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
Dimension
,
addClass
}
from
'
vs/base/browser/dom
'
;
import
{
INextEditorService
,
ACTIVE_GROUP
,
SIDE_GROUP
}
from
'
vs/workbench/services/editor/common/nextEditorService
'
;
import
{
INextEditorGroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroupsService
'
;
const
HELP_PREFIX
=
'
?
'
;
...
...
@@ -101,6 +102,7 @@ export class QuickOpenController extends Component implements IQuickOpenService
constructor
(
@
INextEditorService
private
editorService
:
INextEditorService
,
@
INextEditorGroupsService
private
editorGroupService
:
INextEditorGroupsService
,
@
INotificationService
private
notificationService
:
INotificationService
,
@
IContextKeyService
private
contextKeyService
:
IContextKeyService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
...
...
@@ -573,7 +575,7 @@ export class QuickOpenController extends Component implements IQuickOpenService
}
if
(
reason
!==
HideReason
.
FOCUS_LOST
)
{
this
.
restoreFocus
();
// focus back to editor
unless user clicked somewhere else
this
.
editorGroupService
.
activeGroup
.
focus
();
// focus back to editor group
unless user clicked somewhere else
}
// Reset context keys
...
...
@@ -623,15 +625,6 @@ export class QuickOpenController extends Component implements IQuickOpenService
return
new
QuickOpenModel
(
entries
,
this
.
actionProvider
);
}
private
restoreFocus
():
void
{
// Try to focus active editor
const
editorControl
=
this
.
editorService
.
activeControl
;
if
(
editorControl
)
{
editorControl
.
focus
();
}
}
private
onType
(
value
:
string
):
void
{
// look for a handler
...
...
src/vs/workbench/browser/viewlet.ts
浏览文件 @
78783be3
...
...
@@ -17,7 +17,7 @@ import { ToggleSidebarVisibilityAction } from 'vs/workbench/browser/actions/togg
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
INextEditor
Service
}
from
'
vs/workbench/services/editor/common/nextEditor
Service
'
;
import
{
INextEditor
GroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroups
Service
'
;
export
abstract
class
Viewlet
extends
Composite
implements
IViewlet
{
...
...
@@ -120,12 +120,12 @@ export class ToggleViewletAction extends Action {
name
:
string
,
viewletId
:
string
,
@
IViewletService
protected
viewletService
:
IViewletService
,
@
INextEditor
Service
private
editorService
:
INextEditor
Service
@
INextEditor
GroupsService
private
editorGroupService
:
INextEditorGroups
Service
)
{
super
(
id
,
name
);
this
.
viewletId
=
viewletId
;
this
.
enabled
=
!!
this
.
viewletService
&&
!!
this
.
editorService
;
this
.
enabled
=
!!
this
.
viewletService
&&
!!
this
.
editor
Group
Service
;
}
public
run
():
TPromise
<
any
>
{
...
...
@@ -135,11 +135,8 @@ export class ToggleViewletAction extends Action {
return
this
.
viewletService
.
openViewlet
(
this
.
viewletId
,
true
);
}
// Otherwise pass focus to editor if possible
const
editor
=
this
.
editorService
.
activeControl
;
if
(
editor
)
{
editor
.
focus
();
}
// Otherwise pass focus to editor group
this
.
editorGroupService
.
activeGroup
.
focus
();
return
TPromise
.
as
(
true
);
}
...
...
src/vs/workbench/electron-browser/commands.ts
浏览文件 @
78783be3
...
...
@@ -14,7 +14,7 @@ import { IWindowsService, IWindowService } from 'vs/platform/windows/common/wind
import
{
List
}
from
'
vs/base/browser/ui/list/listWidget
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
{
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
I
WorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/e
ditorService
'
;
import
{
I
NextEditorService
}
from
'
vs/workbench/services/editor/common/nextE
ditorService
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
IEditorOptions
,
Position
as
EditorPosition
}
from
'
vs/platform/editor/common/editor
'
;
import
{
WorkbenchListFocusContextKey
,
IListService
,
WorkbenchListSupportsMultiSelectContextKey
,
ListWidget
}
from
'
vs/platform/list/browser/listService
'
;
...
...
@@ -536,7 +536,7 @@ export function registerCommands(): void {
});
CommandsRegistry
.
registerCommand
(
'
_workbench.diff
'
,
function
(
accessor
:
ServicesAccessor
,
args
:
[
URI
,
URI
,
string
,
string
,
IEditorOptions
,
EditorPosition
])
{
const
editorService
=
accessor
.
get
(
I
Workbench
EditorService
);
const
editorService
=
accessor
.
get
(
I
Next
EditorService
);
let
[
leftResource
,
rightResource
,
label
,
description
,
options
,
position
]
=
args
;
if
(
!
options
||
typeof
options
!==
'
object
'
)
{
...
...
@@ -555,7 +555,7 @@ export function registerCommands(): void {
});
CommandsRegistry
.
registerCommand
(
'
_workbench.open
'
,
function
(
accessor
:
ServicesAccessor
,
args
:
[
URI
,
IEditorOptions
,
EditorPosition
])
{
const
editorService
=
accessor
.
get
(
I
Workbench
EditorService
);
const
editorService
=
accessor
.
get
(
I
Next
EditorService
);
const
[
resource
,
options
,
column
]
=
args
;
return
editorService
.
openEditor
({
resource
,
options
},
column
).
then
(()
=>
{
...
...
src/vs/workbench/electron-browser/window.ts
浏览文件 @
78783be3
...
...
@@ -16,9 +16,8 @@ import * as DOM from 'vs/base/browser/dom';
import
{
Separator
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
import
{
AutoSaveConfiguration
,
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
toResource
,
IUntitledResourceInput
,
IEditor
}
from
'
vs/workbench/common/editor
'
;
import
{
IWorkbenchEditorService
,
IResourceInputType
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
toResource
,
IUntitledResourceInput
}
from
'
vs/workbench/common/editor
'
;
import
{
INextEditorService
,
IResourceEditor
}
from
'
vs/workbench/services/editor/common/nextEditorService
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IWorkspaceConfigurationService
}
from
'
vs/workbench/services/configuration/common/configuration
'
;
import
{
IWindowsService
,
IWindowService
,
IWindowSettings
,
IPath
,
IOpenFileRequest
,
IWindowsConfiguration
,
IAddFoldersRequest
,
IRunActionInWindowRequest
}
from
'
vs/platform/windows/common/windows
'
;
...
...
@@ -29,7 +28,7 @@ import { IWorkbenchThemeService, VS_HC_THEME, VS_DARK_THEME } from 'vs/workbench
import
*
as
browser
from
'
vs/base/browser/browser
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
Position
,
IResourceInput
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IResourceInput
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
KeyboardMapperFactory
}
from
'
vs/workbench/services/keybinding/electron-browser/keybindingService
'
;
import
{
Themable
}
from
'
vs/workbench/common/theme
'
;
...
...
@@ -75,8 +74,7 @@ export class ElectronWindow extends Themable {
constructor
(
shellContainer
:
HTMLElement
,
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
IEditorGroupService
private
editorGroupService
:
IEditorGroupService
,
@
INextEditorService
private
editorService
:
INextEditorService
,
@
IWindowsService
private
windowsService
:
IWindowsService
,
@
IWindowService
private
windowService
:
IWindowService
,
@
IWorkspaceConfigurationService
private
configurationService
:
IWorkspaceConfigurationService
,
...
...
@@ -113,10 +111,10 @@ export class ElectronWindow extends Themable {
private
registerListeners
():
void
{
// React to editor input changes
this
.
toUnbind
.
push
(
this
.
editor
GroupService
.
onEditorsChanged
(()
=>
{
this
.
toUnbind
.
push
(
this
.
editor
Service
.
onDidActiveEditorChange
(()
=>
{
// Represented File Name
const
file
=
toResource
(
this
.
editorService
.
getActiveEditorInput
()
,
{
supportSideBySide
:
true
,
filter
:
'
file
'
});
const
file
=
toResource
(
this
.
editorService
.
activeEditor
,
{
supportSideBySide
:
true
,
filter
:
'
file
'
});
this
.
titleService
.
setRepresentedFilename
(
file
?
file
.
fsPath
:
''
);
// Touch Bar
...
...
@@ -137,9 +135,9 @@ export class ElectronWindow extends Themable {
// If we run an action from the touchbar, we fill in the currently active resource
// as payload because the touch bar items are context aware depending on the editor
if
(
request
.
from
===
'
touchbar
'
)
{
const
activeEditor
=
this
.
editorService
.
getActiveEditor
()
;
const
activeEditor
=
this
.
editorService
.
activeEditor
;
if
(
activeEditor
)
{
const
resource
=
toResource
(
activeEditor
.
input
,
{
supportSideBySide
:
true
});
const
resource
=
toResource
(
activeEditor
,
{
supportSideBySide
:
true
});
if
(
resource
)
{
args
.
push
(
resource
);
}
...
...
@@ -358,7 +356,7 @@ export class ElectronWindow extends Themable {
this
.
touchBarDisposables
=
dispose
(
this
.
touchBarDisposables
);
// Create new
this
.
touchBarMenu
=
this
.
editor
Group
Service
.
invokeWithinEditorContext
(
accessor
=>
this
.
menuService
.
createMenu
(
MenuId
.
TouchBarContext
,
accessor
.
get
(
IContextKeyService
)));
this
.
touchBarMenu
=
this
.
editorService
.
invokeWithinEditorContext
(
accessor
=>
this
.
menuService
.
createMenu
(
MenuId
.
TouchBarContext
,
accessor
.
get
(
IContextKeyService
)));
this
.
touchBarDisposables
.
push
(
this
.
touchBarMenu
);
this
.
touchBarDisposables
.
push
(
this
.
touchBarMenu
.
onDidChange
(()
=>
{
this
.
scheduleSetupTouchbar
();
...
...
@@ -458,7 +456,7 @@ export class ElectronWindow extends Themable {
}
private
onOpenFiles
(
request
:
IOpenFileRequest
):
void
{
const
inputs
:
IResource
InputType
[]
=
[];
const
inputs
:
IResource
Editor
[]
=
[];
const
diffMode
=
(
request
.
filesToDiff
.
length
===
2
);
if
(
!
diffMode
&&
request
.
filesToOpen
)
{
...
...
@@ -483,9 +481,8 @@ export class ElectronWindow extends Themable {
// the wait marker file to signal to the outside that editing is done.
const
resourcesToWaitFor
=
request
.
filesToWait
.
paths
.
map
(
p
=>
URI
.
file
(
p
.
filePath
));
const
waitMarkerFile
=
URI
.
file
(
request
.
filesToWait
.
waitMarkerFilePath
);
const
stacks
=
this
.
editorGroupService
.
getStacksModel
();
const
unbind
=
stacks
.
onEditorClosed
(()
=>
{
if
(
resourcesToWaitFor
.
every
(
r
=>
!
stacks
.
isOpen
(
r
)))
{
const
unbind
=
this
.
editorService
.
onDidCloseEditor
(()
=>
{
if
(
resourcesToWaitFor
.
every
(
resource
=>
!
this
.
editorService
.
isOpen
({
resource
})))
{
unbind
.
dispose
();
this
.
fileService
.
del
(
waitMarkerFile
).
done
(
null
,
errors
.
onUnexpectedError
);
}
...
...
@@ -493,8 +490,8 @@ export class ElectronWindow extends Themable {
}
}
private
openResources
(
resources
:
(
IResourceInput
|
IUntitledResourceInput
)[],
diffMode
:
boolean
):
Thenable
<
IEditor
|
IEditor
[]
>
{
return
this
.
lifecycleService
.
when
(
LifecyclePhase
.
Running
).
then
(():
TPromise
<
IEditor
|
IEditor
[]
>
=>
{
private
openResources
(
resources
:
(
IResourceInput
|
IUntitledResourceInput
)[],
diffMode
:
boolean
):
Thenable
<
any
>
{
return
this
.
lifecycleService
.
when
(
LifecyclePhase
.
Running
).
then
(():
TPromise
<
any
>
=>
{
// In diffMode we open 2 resources as diff
if
(
diffMode
&&
resources
.
length
===
2
)
{
...
...
@@ -507,17 +504,11 @@ export class ElectronWindow extends Themable {
}
// Otherwise open all
const
activeEditor
=
this
.
editorService
.
getActiveEditor
();
return
this
.
editorService
.
openEditors
(
resources
.
map
((
r
,
index
)
=>
{
return
{
input
:
r
,
position
:
activeEditor
?
activeEditor
.
group
:
Position
.
ONE
};
}));
return
this
.
editorService
.
openEditors
(
resources
);
});
}
private
toInputs
(
paths
:
IPath
[],
isNew
:
boolean
):
IResource
InputType
[]
{
private
toInputs
(
paths
:
IPath
[],
isNew
:
boolean
):
IResource
Editor
[]
{
return
paths
.
map
(
p
=>
{
const
resource
=
URI
.
file
(
p
.
filePath
);
let
input
:
IResourceInput
|
IUntitledResourceInput
;
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
78783be3
...
...
@@ -191,7 +191,7 @@ export class Workbench extends Disposable implements IPartService {
private
workbenchShutdown
:
boolean
;
private
editorService
:
NextEditorService
;
private
editorGroup
s
Service
:
INextEditorGroupsService
;
private
editorGroupService
:
INextEditorGroupsService
;
private
viewletService
:
IViewletService
;
private
contextKeyService
:
IContextKeyService
;
private
keybindingService
:
IKeybindingService
;
...
...
@@ -382,7 +382,7 @@ export class Workbench extends Disposable implements IPartService {
const
restorePreviousEditorState
=
!
this
.
hasInitialFilesToOpen
;
this
.
editorPart
=
this
.
instantiationService
.
createInstance
(
NextEditorPart
,
Identifiers
.
EDITOR_PART
,
restorePreviousEditorState
);
this
.
_register
(
toDisposable
(()
=>
this
.
editorPart
.
shutdown
()));
this
.
editorGroup
s
Service
=
this
.
editorPart
;
this
.
editorGroupService
=
this
.
editorPart
;
serviceCollection
.
set
(
INextEditorGroupsService
,
this
.
editorPart
);
this
.
editorService
=
this
.
instantiationService
.
createInstance
(
NextEditorService
);
serviceCollection
.
set
(
INextEditorService
,
this
.
editorService
);
...
...
@@ -598,19 +598,19 @@ export class Workbench extends Disposable implements IPartService {
activeEditorGroupEmpty
.
reset
();
}
if
(
this
.
editorGroup
s
Service
.
count
>
1
)
{
if
(
this
.
editorGroupService
.
count
>
1
)
{
multipleEditorGroups
.
set
(
true
);
}
else
{
multipleEditorGroups
.
reset
();
}
};
this
.
editorGroup
s
Service
.
whenRestored
.
then
(()
=>
updateEditorContextKeys
());
this
.
editorGroupService
.
whenRestored
.
then
(()
=>
updateEditorContextKeys
());
this
.
_register
(
this
.
editorService
.
onDidActiveEditorChange
(()
=>
updateEditorContextKeys
()));
this
.
_register
(
this
.
editorService
.
onDidVisibleEditorsChange
(()
=>
updateEditorContextKeys
()));
this
.
_register
(
this
.
editorGroup
s
Service
.
onDidAddGroup
(()
=>
updateEditorContextKeys
()));
this
.
_register
(
this
.
editorGroup
s
Service
.
onDidRemoveGroup
(()
=>
updateEditorContextKeys
()));
this
.
_register
(
this
.
editorGroupService
.
onDidAddGroup
(()
=>
updateEditorContextKeys
()));
this
.
_register
(
this
.
editorGroupService
.
onDidRemoveGroup
(()
=>
updateEditorContextKeys
()));
const
inputFocused
=
InputFocusedContext
.
bindTo
(
this
.
contextKeyService
);
this
.
_register
(
DOM
.
addDisposableListener
(
window
,
'
focusin
'
,
()
=>
{
...
...
@@ -635,7 +635,7 @@ export class Workbench extends Disposable implements IPartService {
// Restore Editorpart
perf
.
mark
(
'
willRestoreEditors
'
);
restorePromises
.
push
(
this
.
editorGroup
s
Service
.
whenRestored
.
then
(()
=>
{
restorePromises
.
push
(
this
.
editorGroupService
.
whenRestored
.
then
(()
=>
{
return
this
.
resolveEditorsToOpen
().
then
(
inputs
=>
{
if
(
inputs
.
length
)
{
return
this
.
editorService
.
openEditors
(
inputs
);
...
...
@@ -739,7 +739,7 @@ export class Workbench extends Disposable implements IPartService {
// Empty workbench
else
if
(
this
.
contextService
.
getWorkbenchState
()
===
WorkbenchState
.
EMPTY
&&
this
.
openUntitledFile
())
{
const
isEmpty
=
this
.
editorGroup
sService
.
count
===
1
&&
this
.
editorGroups
Service
.
activeGroup
.
count
===
0
;
const
isEmpty
=
this
.
editorGroup
Service
.
count
===
1
&&
this
.
editorGroup
Service
.
activeGroup
.
count
===
0
;
if
(
!
isEmpty
)
{
return
TPromise
.
as
([]);
// do not open any empty untitled file if we restored editors from previous session
}
...
...
@@ -1212,10 +1212,7 @@ export class Workbench extends Disposable implements IPartService {
// Status bar and activity bar visibility come from settings -> update their visibility.
this
.
onDidUpdateConfiguration
(
true
);
const
activeEditor
=
this
.
editorService
.
activeControl
;
if
(
activeEditor
)
{
activeEditor
.
focus
();
}
this
.
editorGroupService
.
activeGroup
.
focus
();
toggleFullScreen
=
this
.
zenMode
.
transitionedToFullScreen
&&
browser
.
isFullscreen
();
}
...
...
@@ -1250,19 +1247,19 @@ export class Workbench extends Disposable implements IPartService {
// Enter Centered Editor Layout
if
(
active
)
{
if
(
this
.
editorGroup
s
Service
.
count
===
1
)
{
const
activeGroup
=
this
.
editorGroup
s
Service
.
activeGroup
;
this
.
editorGroup
s
Service
.
addGroup
(
activeGroup
,
GroupDirection
.
LEFT
);
this
.
editorGroup
s
Service
.
addGroup
(
activeGroup
,
GroupDirection
.
RIGHT
);
if
(
this
.
editorGroupService
.
count
===
1
)
{
const
activeGroup
=
this
.
editorGroupService
.
activeGroup
;
this
.
editorGroupService
.
addGroup
(
activeGroup
,
GroupDirection
.
LEFT
);
this
.
editorGroupService
.
addGroup
(
activeGroup
,
GroupDirection
.
RIGHT
);
}
}
// Leave Centered Editor Layout
else
{
if
(
this
.
editorGroup
s
Service
.
count
===
3
)
{
this
.
editorGroup
s
Service
.
groups
.
forEach
(
group
=>
{
if
(
this
.
editorGroupService
.
count
===
3
)
{
this
.
editorGroupService
.
groups
.
forEach
(
group
=>
{
if
(
group
.
count
===
0
)
{
this
.
editorGroup
s
Service
.
removeGroup
(
group
);
this
.
editorGroupService
.
removeGroup
(
group
);
}
});
}
...
...
@@ -1309,14 +1306,13 @@ export class Workbench extends Disposable implements IPartService {
let
promise
=
TPromise
.
wrap
<
any
>
(
null
);
if
(
hidden
&&
this
.
sidebarPart
.
getActiveViewlet
())
{
promise
=
this
.
sidebarPart
.
hideActiveViewlet
().
then
(()
=>
{
const
activeEditor
=
this
.
editorService
.
activeControl
;
const
activePanel
=
this
.
panelPart
.
getActivePanel
();
// Pass Focus to Editor or Panel if Sidebar is now hidden
if
(
this
.
hasFocus
(
Parts
.
PANEL_PART
)
&&
activePanel
)
{
activePanel
.
focus
();
}
else
if
(
activeEditor
)
{
activeEditor
.
focus
();
}
else
{
this
.
editorGroupService
.
activeGroup
.
focus
();
}
});
}
...
...
@@ -1360,12 +1356,7 @@ export class Workbench extends Disposable implements IPartService {
let
promise
=
TPromise
.
wrap
<
any
>
(
null
);
if
(
hidden
&&
this
.
panelPart
.
getActivePanel
())
{
promise
=
this
.
panelPart
.
hideActivePanel
().
then
(()
=>
{
// Pass Focus to Editor if Panel part is now hidden
const
editor
=
this
.
editorService
.
activeControl
;
if
(
editor
)
{
editor
.
focus
();
}
this
.
editorGroupService
.
activeGroup
.
focus
();
// Pass focus to editor group if panel part is now hidden
});
}
...
...
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
浏览文件 @
78783be3
...
...
@@ -50,7 +50,7 @@ import { DebugQuickOpenHandler } from 'vs/workbench/parts/debug/browser/debugQui
import
{
DebugStatus
}
from
'
vs/workbench/parts/debug/browser/debugStatus
'
;
import
{
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
launchSchemaId
}
from
'
vs/workbench/services/configuration/common/configuration
'
;
import
{
INextEditor
Service
}
from
'
vs/workbench/services/editor/common/nextEditor
Service
'
;
import
{
INextEditor
GroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroups
Service
'
;
class
OpenDebugViewletAction
extends
ToggleViewletAction
{
public
static
readonly
ID
=
VIEWLET_ID
;
...
...
@@ -60,9 +60,9 @@ class OpenDebugViewletAction extends ToggleViewletAction {
id
:
string
,
label
:
string
,
@
IViewletService
viewletService
:
IViewletService
,
@
INextEditor
Service
editorService
:
INextEditor
Service
@
INextEditor
GroupsService
editorGroupService
:
INextEditorGroups
Service
)
{
super
(
id
,
label
,
VIEWLET_ID
,
viewletService
,
editorService
);
super
(
id
,
label
,
VIEWLET_ID
,
viewletService
,
editor
Group
Service
);
}
}
...
...
src/vs/workbench/parts/extensions/browser/extensionsActions.ts
浏览文件 @
78783be3
...
...
@@ -47,6 +47,7 @@ import { mnemonicButtonLabel } from 'vs/base/common/labels';
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IQuickOpenService
,
IPickOpenEntry
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
INextEditorService
}
from
'
vs/workbench/services/editor/common/nextEditorService
'
;
import
{
INextEditorGroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroupsService
'
;
const
promptDownloadManually
=
(
extension
:
IExtension
,
message
:
string
,
instantiationService
:
IInstantiationService
,
notificationService
:
INotificationService
,
openerService
:
IOpenerService
)
=>
{
notificationService
.
prompt
(
Severity
.
Error
,
message
,
[{
...
...
@@ -957,9 +958,9 @@ export class OpenExtensionsViewletAction extends ToggleViewletAction {
id
:
string
,
label
:
string
,
@
IViewletService
viewletService
:
IViewletService
,
@
INextEditor
Service
editorService
:
INextEditor
Service
@
INextEditor
GroupsService
editorGroupService
:
INextEditorGroups
Service
)
{
super
(
id
,
label
,
VIEWLET_ID
,
viewletService
,
editorService
);
super
(
id
,
label
,
VIEWLET_ID
,
viewletService
,
editor
Group
Service
);
}
}
...
...
src/vs/workbench/parts/files/electron-browser/files.contribution.ts
浏览文件 @
78783be3
...
...
@@ -33,6 +33,7 @@ import { IEditorRegistry, EditorDescriptor, Extensions as EditorExtensions } fro
import
{
DataUriEditorInput
}
from
'
vs/workbench/common/editor/dataUriEditorInput
'
;
import
{
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
INextEditorService
}
from
'
vs/workbench/services/editor/common/nextEditorService
'
;
import
{
INextEditorGroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroupsService
'
;
// Viewlet Action
export
class
OpenExplorerViewletAction
extends
ToggleViewletAction
{
...
...
@@ -43,9 +44,9 @@ export class OpenExplorerViewletAction extends ToggleViewletAction {
id
:
string
,
label
:
string
,
@
IViewletService
viewletService
:
IViewletService
,
@
INextEditor
Service
editorService
:
INextEditor
Service
@
INextEditor
GroupsService
editorGroupService
:
INextEditorGroups
Service
)
{
super
(
id
,
label
,
VIEWLET_ID
,
viewletService
,
editorService
);
super
(
id
,
label
,
VIEWLET_ID
,
viewletService
,
editor
Group
Service
);
}
}
...
...
src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts
浏览文件 @
78783be3
...
...
@@ -19,15 +19,15 @@ import { StatusUpdater, StatusBarController } from './scmActivity';
import
{
SCMViewlet
}
from
'
vs/workbench/parts/scm/electron-browser/scmViewlet
'
;
import
{
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
IConfigurationRegistry
,
Extensions
as
ConfigurationExtensions
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
INextEditor
Service
}
from
'
vs/workbench/services/editor/common/nextEditor
Service
'
;
import
{
INextEditor
GroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroups
Service
'
;
class
OpenSCMViewletAction
extends
ToggleViewletAction
{
static
readonly
ID
=
VIEWLET_ID
;
static
LABEL
=
localize
(
'
toggleGitViewlet
'
,
"
Show Git
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IViewletService
viewletService
:
IViewletService
,
@
INextEditor
Service
editorService
:
INextEditor
Service
)
{
super
(
id
,
label
,
VIEWLET_ID
,
viewletService
,
editorService
);
constructor
(
id
:
string
,
label
:
string
,
@
IViewletService
viewletService
:
IViewletService
,
@
INextEditor
GroupsService
editorGroupService
:
INextEditorGroups
Service
)
{
super
(
id
,
label
,
VIEWLET_ID
,
viewletService
,
editor
Group
Service
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录