Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
110a59bb
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,发现更多精彩内容 >>
提交
110a59bb
编写于
10月 23, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix opening panel with focus:true no longer puts focus to editor within
fixes #59471
上级
b8de0589
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
18 addition
and
18 deletion
+18
-18
src/vs/workbench/browser/parts/compositePart.ts
src/vs/workbench/browser/parts/compositePart.ts
+2
-2
src/vs/workbench/browser/parts/panel/panelPart.ts
src/vs/workbench/browser/parts/panel/panelPart.ts
+5
-5
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
+2
-2
src/vs/workbench/parts/debug/browser/debugActions.ts
src/vs/workbench/parts/debug/browser/debugActions.ts
+1
-1
src/vs/workbench/parts/output/electron-browser/outputServices.ts
...workbench/parts/output/electron-browser/outputServices.ts
+4
-4
src/vs/workbench/services/panel/common/panelService.ts
src/vs/workbench/services/panel/common/panelService.ts
+1
-1
src/vs/workbench/services/progress/browser/progressService.ts
...vs/workbench/services/progress/browser/progressService.ts
+2
-2
src/vs/workbench/services/progress/test/progressService.test.ts
.../workbench/services/progress/test/progressService.test.ts
+1
-1
未找到文件。
src/vs/workbench/browser/parts/compositePart.ts
浏览文件 @
110a59bb
...
...
@@ -49,7 +49,7 @@ export interface ICompositeTitleLabel {
export
abstract
class
CompositePart
<
T
extends
Composite
>
extends
Part
{
protected
_onDidCompositeOpen
=
this
.
_register
(
new
Emitter
<
IComposite
>
());
protected
_onDidCompositeOpen
=
this
.
_register
(
new
Emitter
<
{
composite
:
IComposite
,
focus
:
boolean
}
>
());
protected
_onDidCompositeClose
=
this
.
_register
(
new
Emitter
<
IComposite
>
());
protected
toolBar
:
ToolBar
;
...
...
@@ -159,7 +159,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
});
}).
then
(
composite
=>
{
if
(
composite
)
{
this
.
_onDidCompositeOpen
.
fire
(
composite
);
this
.
_onDidCompositeOpen
.
fire
(
{
composite
,
focus
}
);
}
return
composite
;
...
...
src/vs/workbench/browser/parts/panel/panelPart.ts
浏览文件 @
110a59bb
...
...
@@ -6,7 +6,7 @@
import
'
vs/css!./media/panelpart
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IAction
}
from
'
vs/base/common/actions
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
Event
,
mapEvent
}
from
'
vs/base/common/event
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
ActionsOrientation
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
IPanel
}
from
'
vs/workbench/common/panel
'
;
...
...
@@ -119,13 +119,13 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
}
private
registerListeners
():
void
{
this
.
_register
(
this
.
onDidPanelOpen
(
this
.
_onDidPanelOpen
,
this
));
this
.
_register
(
this
.
onDidPanelOpen
(
({
panel
})
=>
this
.
_onDidPanelOpen
(
panel
)
));
this
.
_register
(
this
.
onDidPanelClose
(
this
.
_onDidPanelClose
,
this
));
this
.
_register
(
this
.
registry
.
onDidRegister
(
panelDescriptor
=>
this
.
compositeBar
.
addComposite
(
panelDescriptor
)));
// Activate panel action on opening of a panel
this
.
_register
(
this
.
onDidPanelOpen
(
panel
=>
{
this
.
_register
(
this
.
onDidPanelOpen
(
({
panel
})
=>
{
this
.
compositeBar
.
activateComposite
(
panel
.
getId
());
this
.
layoutCompositeBar
();
// Need to relayout composite bar since different panels have different action bar width
}));
...
...
@@ -146,8 +146,8 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
}
}
get
onDidPanelOpen
():
Event
<
IPanel
>
{
return
this
.
_onDidCompositeOpen
.
event
;
get
onDidPanelOpen
():
Event
<
{
panel
:
IPanel
,
focus
:
boolean
}
>
{
return
mapEvent
(
this
.
_onDidCompositeOpen
.
event
,
compositeOpen
=>
({
panel
:
compositeOpen
.
composite
,
focus
:
compositeOpen
.
focus
}))
;
}
get
onDidPanelClose
():
Event
<
IPanel
>
{
...
...
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
浏览文件 @
110a59bb
...
...
@@ -21,7 +21,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
KeyMod
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
Event
,
mapEvent
}
from
'
vs/base/common/event
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
contrastBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
SIDE_BAR_TITLE_FOREGROUND
,
SIDE_BAR_BACKGROUND
,
SIDE_BAR_FOREGROUND
,
SIDE_BAR_BORDER
}
from
'
vs/workbench/common/theme
'
;
...
...
@@ -67,7 +67,7 @@ export class SidebarPart extends CompositePart<Viewlet> {
}
get
onDidViewletOpen
():
Event
<
IViewlet
>
{
return
this
.
_onDidCompositeOpen
.
event
as
Event
<
IViewlet
>
;
return
mapEvent
(
this
.
_onDidCompositeOpen
.
event
,
compositeEvent
=>
<
IViewlet
>
compositeEvent
.
composite
)
;
}
get
onDidViewletClose
():
Event
<
IViewlet
>
{
...
...
src/vs/workbench/parts/debug/browser/debugActions.ts
浏览文件 @
110a59bb
...
...
@@ -690,7 +690,7 @@ export class ToggleReplAction extends TogglePanelAction {
}
private
registerListeners
():
void
{
this
.
toDispose
.
push
(
this
.
panelService
.
onDidPanelOpen
(
panel
=>
{
this
.
toDispose
.
push
(
this
.
panelService
.
onDidPanelOpen
(
({
panel
})
=>
{
if
(
panel
.
getId
()
===
REPL_ID
)
{
this
.
class
=
'
debug-action toggle-repl
'
;
this
.
tooltip
=
ToggleReplAction
.
LABEL
;
...
...
src/vs/workbench/parts/output/electron-browser/outputServices.ts
浏览文件 @
110a59bb
...
...
@@ -461,7 +461,7 @@ export class OutputService extends Disposable implements IOutputService, ITextMo
}
this
.
_register
(
registry
.
onDidRegisterChannel
(
this
.
onDidRegisterChannel
,
this
));
this
.
_register
(
panelService
.
onDidPanelOpen
(
this
.
onDidPanelOpen
,
this
));
this
.
_register
(
panelService
.
onDidPanelOpen
(
({
panel
,
focus
})
=>
this
.
onDidPanelOpen
(
panel
,
!
focus
)
,
this
));
this
.
_register
(
panelService
.
onDidPanelClose
(
this
.
onDidPanelClose
,
this
));
// Set active channel to first channel if not set
...
...
@@ -519,16 +519,16 @@ export class OutputService extends Disposable implements IOutputService, ITextMo
this
.
channels
.
set
(
channelId
,
channel
);
if
(
this
.
activeChannelIdInStorage
===
channelId
)
{
this
.
activeChannel
=
channel
;
this
.
onDidPanelOpen
(
this
.
panelService
.
getActivePanel
())
this
.
onDidPanelOpen
(
this
.
panelService
.
getActivePanel
()
,
true
)
.
then
(()
=>
this
.
_onActiveOutputChannel
.
fire
(
channelId
));
}
}
private
onDidPanelOpen
(
panel
:
IPanel
):
Thenable
<
void
>
{
private
onDidPanelOpen
(
panel
:
IPanel
,
preserveFocus
:
boolean
):
Thenable
<
void
>
{
if
(
panel
&&
panel
.
getId
()
===
OUTPUT_PANEL_ID
)
{
this
.
_outputPanel
=
<
OutputPanel
>
this
.
panelService
.
getActivePanel
();
if
(
this
.
activeChannel
)
{
return
this
.
doShowChannel
(
this
.
activeChannel
,
true
);
return
this
.
doShowChannel
(
this
.
activeChannel
,
preserveFocus
);
}
}
return
TPromise
.
as
(
null
);
...
...
src/vs/workbench/services/panel/common/panelService.ts
浏览文件 @
110a59bb
...
...
@@ -19,7 +19,7 @@ export interface IPanelIdentifier {
export
interface
IPanelService
{
_serviceBrand
:
ServiceIdentifier
<
any
>
;
onDidPanelOpen
:
Event
<
IPanel
>
;
onDidPanelOpen
:
Event
<
{
panel
:
IPanel
,
focus
:
boolean
}
>
;
onDidPanelClose
:
Event
<
IPanel
>
;
...
...
src/vs/workbench/services/progress/browser/progressService.ts
浏览文件 @
110a59bb
...
...
@@ -31,7 +31,7 @@ export abstract class ScopedService extends Disposable {
registerListeners
():
void
{
this
.
_register
(
this
.
viewletService
.
onDidViewletOpen
(
viewlet
=>
this
.
onScopeOpened
(
viewlet
.
getId
())));
this
.
_register
(
this
.
panelService
.
onDidPanelOpen
(
panel
=>
this
.
onScopeOpened
(
panel
.
getId
())));
this
.
_register
(
this
.
panelService
.
onDidPanelOpen
(
({
panel
})
=>
this
.
onScopeOpened
(
panel
.
getId
())));
this
.
_register
(
this
.
viewletService
.
onDidViewletClose
(
viewlet
=>
this
.
onScopeClosed
(
viewlet
.
getId
())));
this
.
_register
(
this
.
panelService
.
onDidPanelClose
(
panel
=>
this
.
onScopeClosed
(
panel
.
getId
())));
...
...
src/vs/workbench/services/progress/test/progressService.test.ts
浏览文件 @
110a59bb
...
...
@@ -66,7 +66,7 @@ class TestViewletService implements IViewletService {
class
TestPanelService
implements
IPanelService
{
public
_serviceBrand
:
any
;
onDidPanelOpen
=
new
Emitter
<
IPanel
>
().
event
;
onDidPanelOpen
=
new
Emitter
<
{
panel
:
IPanel
,
focus
:
boolean
}
>
().
event
;
onDidPanelClose
=
new
Emitter
<
IPanel
>
().
event
;
public
openPanel
(
id
:
string
,
focus
?:
boolean
):
TPromise
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录