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