Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
74caa412
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
74caa412
编写于
6月 15, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
💄
上级
0b3457a4
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
56 addition
and
60 deletion
+56
-60
src/vs/workbench/browser/layout.ts
src/vs/workbench/browser/layout.ts
+1
-1
src/vs/workbench/browser/parts/editor/baseEditor.ts
src/vs/workbench/browser/parts/editor/baseEditor.ts
+7
-6
src/vs/workbench/browser/parts/editor/editorControl.ts
src/vs/workbench/browser/parts/editor/editorControl.ts
+21
-23
src/vs/workbench/browser/parts/editor/editorGroupView.ts
src/vs/workbench/browser/parts/editor/editorGroupView.ts
+1
-1
src/vs/workbench/browser/parts/editor/editorPart.ts
src/vs/workbench/browser/parts/editor/editorPart.ts
+21
-24
src/vs/workbench/browser/parts/editor/sideBySideEditor.ts
src/vs/workbench/browser/parts/editor/sideBySideEditor.ts
+3
-3
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+1
-1
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
.../workbench/parts/preferences/browser/preferencesEditor.ts
+1
-1
未找到文件。
src/vs/workbench/browser/layout.ts
浏览文件 @
74caa412
...
@@ -117,7 +117,7 @@ export class WorkbenchLayout extends Disposable implements IVerticalSashLayoutPr
...
@@ -117,7 +117,7 @@ export class WorkbenchLayout extends Disposable implements IVerticalSashLayoutPr
private
registerListeners
():
void
{
private
registerListeners
():
void
{
this
.
_register
(
this
.
themeService
.
onThemeChange
(
_
=>
this
.
layout
()));
this
.
_register
(
this
.
themeService
.
onThemeChange
(
_
=>
this
.
layout
()));
this
.
_register
(
this
.
parts
.
editor
.
onDidChange
(()
=>
this
.
onDidEditorChange
()));
this
.
_register
(
this
.
parts
.
editor
.
onDid
SizeConstraints
Change
(()
=>
this
.
onDidEditorChange
()));
this
.
registerSashListeners
();
this
.
registerSashListeners
();
}
}
...
...
src/vs/workbench/browser/parts/editor/baseEditor.ts
浏览文件 @
74caa412
...
@@ -33,6 +33,13 @@ import { DEFAULT_EDITOR_MIN_DIMENSIONS, DEFAULT_EDITOR_MAX_DIMENSIONS } from 'vs
...
@@ -33,6 +33,13 @@ import { DEFAULT_EDITOR_MIN_DIMENSIONS, DEFAULT_EDITOR_MAX_DIMENSIONS } from 'vs
*/
*/
export
abstract
class
BaseEditor
extends
Panel
implements
IEditor
{
export
abstract
class
BaseEditor
extends
Panel
implements
IEditor
{
readonly
minimumWidth
=
DEFAULT_EDITOR_MIN_DIMENSIONS
.
width
;
readonly
maximumWidth
=
DEFAULT_EDITOR_MAX_DIMENSIONS
.
width
;
readonly
minimumHeight
=
DEFAULT_EDITOR_MIN_DIMENSIONS
.
height
;
readonly
maximumHeight
=
DEFAULT_EDITOR_MAX_DIMENSIONS
.
height
;
readonly
onDidSizeConstraintsChange
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
=
Event
.
None
;
private
static
readonly
EDITOR_MEMENTOS
:
Map
<
string
,
EditorMemento
<
any
>>
=
new
Map
<
string
,
EditorMemento
<
any
>>
();
private
static
readonly
EDITOR_MEMENTOS
:
Map
<
string
,
EditorMemento
<
any
>>
=
new
Map
<
string
,
EditorMemento
<
any
>>
();
protected
_input
:
EditorInput
;
protected
_input
:
EditorInput
;
...
@@ -40,12 +47,6 @@ export abstract class BaseEditor extends Panel implements IEditor {
...
@@ -40,12 +47,6 @@ export abstract class BaseEditor extends Panel implements IEditor {
private
_options
:
EditorOptions
;
private
_options
:
EditorOptions
;
private
_group
:
IEditorGroup
;
private
_group
:
IEditorGroup
;
readonly
minimumWidth
:
number
=
DEFAULT_EDITOR_MIN_DIMENSIONS
.
width
;
readonly
maximumWidth
:
number
=
DEFAULT_EDITOR_MAX_DIMENSIONS
.
width
;
readonly
minimumHeight
:
number
=
DEFAULT_EDITOR_MIN_DIMENSIONS
.
height
;
readonly
maximumHeight
:
number
=
DEFAULT_EDITOR_MAX_DIMENSIONS
.
height
;
readonly
onDidChange
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
=
Event
.
None
;
constructor
(
constructor
(
id
:
string
,
id
:
string
,
telemetryService
:
ITelemetryService
,
telemetryService
:
ITelemetryService
,
...
...
src/vs/workbench/browser/parts/editor/editorControl.ts
浏览文件 @
74caa412
...
@@ -26,22 +26,20 @@ export interface IOpenEditorResult {
...
@@ -26,22 +26,20 @@ export interface IOpenEditorResult {
export
class
EditorControl
extends
Disposable
{
export
class
EditorControl
extends
Disposable
{
get
minimumWidth
()
{
return
this
.
_activeControl
?
this
.
_activeControl
.
minimumWidth
:
DEFAULT_EDITOR_MIN_DIMENSIONS
.
width
;
}
get
minimumHeight
()
{
return
this
.
_activeControl
?
this
.
_activeControl
.
minimumHeight
:
DEFAULT_EDITOR_MIN_DIMENSIONS
.
height
;
}
get
maximumWidth
()
{
return
this
.
_activeControl
?
this
.
_activeControl
.
maximumWidth
:
DEFAULT_EDITOR_MAX_DIMENSIONS
.
width
;
}
get
maximumHeight
()
{
return
this
.
_activeControl
?
this
.
_activeControl
.
maximumHeight
:
DEFAULT_EDITOR_MAX_DIMENSIONS
.
height
;
}
private
_onDidFocus
:
Emitter
<
void
>
=
this
.
_register
(
new
Emitter
<
void
>
());
private
_onDidFocus
:
Emitter
<
void
>
=
this
.
_register
(
new
Emitter
<
void
>
());
get
onDidFocus
():
Event
<
void
>
{
return
this
.
_onDidFocus
.
event
;
}
get
onDidFocus
():
Event
<
void
>
{
return
this
.
_onDidFocus
.
event
;
}
private
activeControlFocusListener
:
IDisposable
;
private
_onDidSizeConstraintsChange
=
this
.
_register
(
new
Emitter
<
{
width
:
number
;
height
:
number
;
}
>
());
get
onDidSizeConstraintsChange
():
Event
<
{
width
:
number
;
height
:
number
;
}
>
{
return
this
.
_onDidSizeConstraintsChange
.
event
;
}
private
activeControlFocusListener
:
IDisposable
;
private
dimension
:
Dimension
;
private
dimension
:
Dimension
;
private
editorOperation
:
LongRunningOperation
;
private
editorOperation
:
LongRunningOperation
;
get
minimumWidth
():
number
{
return
this
.
_activeControl
?
this
.
_activeControl
.
minimumWidth
:
DEFAULT_EDITOR_MIN_DIMENSIONS
.
width
;
}
get
minimumHeight
():
number
{
return
this
.
_activeControl
?
this
.
_activeControl
.
minimumHeight
:
DEFAULT_EDITOR_MIN_DIMENSIONS
.
height
;
}
get
maximumWidth
():
number
{
return
this
.
_activeControl
?
this
.
_activeControl
.
maximumWidth
:
DEFAULT_EDITOR_MAX_DIMENSIONS
.
width
;
}
get
maximumHeight
():
number
{
return
this
.
_activeControl
?
this
.
_activeControl
.
maximumHeight
:
DEFAULT_EDITOR_MAX_DIMENSIONS
.
height
;
}
private
_onDidChange
=
new
Emitter
<
{
width
:
number
;
height
:
number
;
}
>
();
readonly
onDidChange
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
=
this
.
_onDidChange
.
event
;
private
_activeControl
:
BaseEditor
;
private
_activeControl
:
BaseEditor
;
private
activeControlDisposable
:
IDisposable
=
EmptyDisposable
;
private
activeControlDisposable
:
IDisposable
=
EmptyDisposable
;
private
controls
:
BaseEditor
[]
=
[];
private
controls
:
BaseEditor
[]
=
[];
...
@@ -58,17 +56,6 @@ export class EditorControl extends Disposable {
...
@@ -58,17 +56,6 @@ export class EditorControl extends Disposable {
this
.
editorOperation
=
this
.
_register
(
new
LongRunningOperation
(
progressService
));
this
.
editorOperation
=
this
.
_register
(
new
LongRunningOperation
(
progressService
));
}
}
private
setActiveControl
(
activeControl
:
BaseEditor
)
{
this
.
activeControlDisposable
.
dispose
();
this
.
_activeControl
=
activeControl
;
if
(
activeControl
)
{
this
.
activeControlDisposable
=
activeControl
.
onDidChange
(
e
=>
this
.
_onDidChange
.
fire
(
e
));
}
this
.
_onDidChange
.
fire
();
}
get
activeControl
():
BaseEditor
{
get
activeControl
():
BaseEditor
{
return
this
.
_activeControl
;
return
this
.
_activeControl
;
}
}
...
@@ -97,7 +84,7 @@ export class EditorControl extends Disposable {
...
@@ -97,7 +84,7 @@ export class EditorControl extends Disposable {
const
control
=
this
.
doCreateEditorControl
(
descriptor
);
const
control
=
this
.
doCreateEditorControl
(
descriptor
);
// Remember editor as active
// Remember editor as active
this
.
s
etActiveControl
(
control
);
this
.
doS
etActiveControl
(
control
);
// Show editor
// Show editor
this
.
parent
.
appendChild
(
control
.
getContainer
());
this
.
parent
.
appendChild
(
control
.
getContainer
());
...
@@ -149,6 +136,17 @@ export class EditorControl extends Disposable {
...
@@ -149,6 +136,17 @@ export class EditorControl extends Disposable {
return
control
;
return
control
;
}
}
private
doSetActiveControl
(
control
:
BaseEditor
)
{
this
.
activeControlDisposable
.
dispose
();
this
.
_activeControl
=
control
;
if
(
control
)
{
this
.
activeControlDisposable
=
control
.
onDidSizeConstraintsChange
(
e
=>
this
.
_onDidSizeConstraintsChange
.
fire
(
e
));
}
this
.
_onDidSizeConstraintsChange
.
fire
();
}
private
doSetInput
(
control
:
BaseEditor
,
editor
:
EditorInput
,
options
:
EditorOptions
):
TPromise
<
boolean
>
{
private
doSetInput
(
control
:
BaseEditor
,
editor
:
EditorInput
,
options
:
EditorOptions
):
TPromise
<
boolean
>
{
// If the input did not change, return early and only apply the options
// If the input did not change, return early and only apply the options
...
@@ -216,7 +214,7 @@ export class EditorControl extends Disposable {
...
@@ -216,7 +214,7 @@ export class EditorControl extends Disposable {
this
.
_activeControl
.
setVisible
(
false
,
this
.
groupView
);
this
.
_activeControl
.
setVisible
(
false
,
this
.
groupView
);
// Clear active control
// Clear active control
this
.
s
etActiveControl
(
null
);
this
.
doS
etActiveControl
(
null
);
// Clear focus listener
// Clear focus listener
this
.
activeControlFocusListener
=
dispose
(
this
.
activeControlFocusListener
);
this
.
activeControlFocusListener
=
dispose
(
this
.
activeControlFocusListener
);
...
...
src/vs/workbench/browser/parts/editor/editorGroupView.ts
浏览文件 @
74caa412
...
@@ -197,7 +197,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
...
@@ -197,7 +197,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
// Editor control
// Editor control
this
.
editorControl
=
this
.
_register
(
this
.
scopedInstantiationService
.
createInstance
(
EditorControl
,
this
.
editorContainer
,
this
));
this
.
editorControl
=
this
.
_register
(
this
.
scopedInstantiationService
.
createInstance
(
EditorControl
,
this
.
editorContainer
,
this
));
this
.
_onDidChange
.
input
=
this
.
editorControl
.
onDidChange
;
this
.
_onDidChange
.
input
=
this
.
editorControl
.
onDid
SizeConstraints
Change
;
// Track Focus
// Track Focus
this
.
doTrackFocus
();
this
.
doTrackFocus
();
...
...
src/vs/workbench/browser/parts/editor/editorPart.ts
浏览文件 @
74caa412
...
@@ -64,14 +64,9 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
...
@@ -64,14 +64,9 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
private
_onDidMoveGroup
:
Emitter
<
IEditorGroupView
>
=
this
.
_register
(
new
Emitter
<
IEditorGroupView
>
());
private
_onDidMoveGroup
:
Emitter
<
IEditorGroupView
>
=
this
.
_register
(
new
Emitter
<
IEditorGroupView
>
());
get
onDidMoveGroup
():
Event
<
IEditorGroupView
>
{
return
this
.
_onDidMoveGroup
.
event
;
}
get
onDidMoveGroup
():
Event
<
IEditorGroupView
>
{
return
this
.
_onDidMoveGroup
.
event
;
}
get
minimumWidth
():
number
{
return
this
.
gridWidget
?
this
.
gridWidget
.
minimumWidth
:
0
;
}
private
onDidSetGridWidget
=
this
.
_register
(
new
Emitter
<
{
width
:
number
;
height
:
number
;
}
>
());
get
maximumWidth
():
number
{
return
this
.
gridWidget
?
this
.
gridWidget
.
maximumWidth
:
Number
.
POSITIVE_INFINITY
;
}
private
_onDidSizeConstraintsChange
=
this
.
_register
(
new
Relay
<
{
width
:
number
;
height
:
number
;
}
>
());
get
minimumHeight
():
number
{
return
this
.
gridWidget
?
this
.
gridWidget
.
minimumHeight
:
0
;
}
get
onDidSizeConstraintsChange
():
Event
<
{
width
:
number
;
height
:
number
;
}
>
{
return
anyEvent
(
this
.
onDidSetGridWidget
.
event
,
this
.
_onDidSizeConstraintsChange
.
event
);
}
get
maximumHeight
():
number
{
return
this
.
gridWidget
?
this
.
gridWidget
.
maximumHeight
:
Number
.
POSITIVE_INFINITY
;
}
private
_onDidSetGridWidget
=
new
Emitter
<
{
width
:
number
;
height
:
number
;
}
>
();
private
_onDidChange
=
new
Relay
<
{
width
:
number
;
height
:
number
;
}
>
();
readonly
onDidChange
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
=
anyEvent
(
this
.
_onDidSetGridWidget
.
event
,
this
.
_onDidChange
.
event
);
private
_onDidPreferredSizeChange
:
Emitter
<
void
>
=
this
.
_register
(
new
Emitter
<
void
>
());
private
_onDidPreferredSizeChange
:
Emitter
<
void
>
=
this
.
_register
(
new
Emitter
<
void
>
());
get
onDidPreferredSizeChange
():
Event
<
void
>
{
return
this
.
_onDidPreferredSizeChange
.
event
;
}
get
onDidPreferredSizeChange
():
Event
<
void
>
{
return
this
.
_onDidPreferredSizeChange
.
event
;
}
...
@@ -674,6 +669,11 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
...
@@ -674,6 +669,11 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
//#region Part
//#region Part
get
minimumWidth
():
number
{
return
this
.
gridWidget
?
this
.
gridWidget
.
minimumWidth
:
0
;
}
get
maximumWidth
():
number
{
return
this
.
gridWidget
?
this
.
gridWidget
.
maximumWidth
:
Number
.
POSITIVE_INFINITY
;
}
get
minimumHeight
():
number
{
return
this
.
gridWidget
?
this
.
gridWidget
.
minimumHeight
:
0
;
}
get
maximumHeight
():
number
{
return
this
.
gridWidget
?
this
.
gridWidget
.
maximumHeight
:
Number
.
POSITIVE_INFINITY
;
}
get
preferredSize
():
Dimension
{
get
preferredSize
():
Dimension
{
if
(
!
this
.
_preferredSize
)
{
if
(
!
this
.
_preferredSize
)
{
this
.
_preferredSize
=
new
Dimension
(
this
.
gridWidget
.
minimumWidth
,
this
.
gridWidget
.
minimumHeight
);
this
.
_preferredSize
=
new
Dimension
(
this
.
gridWidget
.
minimumWidth
,
this
.
gridWidget
.
minimumHeight
);
...
@@ -727,7 +727,7 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
...
@@ -727,7 +727,7 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
// Grid Widget (no previous UI state or failed to restore)
// Grid Widget (no previous UI state or failed to restore)
if
(
!
this
.
gridWidget
)
{
if
(
!
this
.
gridWidget
)
{
const
initialGroup
=
this
.
doCreateGroupView
();
const
initialGroup
=
this
.
doCreateGroupView
();
this
.
s
etGridWidget
(
new
SerializableGrid
(
initialGroup
));
this
.
doS
etGridWidget
(
new
SerializableGrid
(
initialGroup
));
// Ensure a group is active
// Ensure a group is active
this
.
doSetGroupActive
(
initialGroup
);
this
.
doSetGroupActive
(
initialGroup
);
...
@@ -758,7 +758,7 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
...
@@ -758,7 +758,7 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
if
(
this
.
gridWidget
)
{
if
(
this
.
gridWidget
)
{
clearNode
(
this
.
gridWidget
.
element
);
clearNode
(
this
.
gridWidget
.
element
);
this
.
gridWidget
.
dispose
();
this
.
gridWidget
.
dispose
();
this
.
s
etGridWidget
();
this
.
doS
etGridWidget
();
}
}
this
.
groupViews
.
forEach
(
group
=>
group
.
dispose
());
this
.
groupViews
.
forEach
(
group
=>
group
.
dispose
());
...
@@ -787,7 +787,7 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
...
@@ -787,7 +787,7 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
}
}
// Create new
// Create new
this
.
s
etGridWidget
(
SerializableGrid
.
deserialize
(
serializedGrid
,
{
this
.
doS
etGridWidget
(
SerializableGrid
.
deserialize
(
serializedGrid
,
{
fromJSON
:
(
serializedEditorGroup
:
ISerializedEditorGroup
)
=>
{
fromJSON
:
(
serializedEditorGroup
:
ISerializedEditorGroup
)
=>
{
let
groupView
:
IEditorGroupView
;
let
groupView
:
IEditorGroupView
;
if
(
reuseGroupViews
.
length
>
0
)
{
if
(
reuseGroupViews
.
length
>
0
)
{
...
@@ -805,6 +805,16 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
...
@@ -805,6 +805,16 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
},
{
styles
:
{
separatorBorder
:
this
.
gridSeparatorBorder
}
}));
},
{
styles
:
{
separatorBorder
:
this
.
gridSeparatorBorder
}
}));
}
}
private
doSetGridWidget
(
gridWidget
?:
SerializableGrid
<
IEditorGroupView
>
):
void
{
this
.
gridWidget
=
gridWidget
;
if
(
gridWidget
)
{
this
.
_onDidSizeConstraintsChange
.
input
=
gridWidget
.
onDidChange
;
}
this
.
onDidSetGridWidget
.
fire
();
}
private
doGetPreviousState
():
IEditorPartUIState
{
private
doGetPreviousState
():
IEditorPartUIState
{
const
legacyState
=
this
.
doGetPreviousLegacyState
();
const
legacyState
=
this
.
doGetPreviousLegacyState
();
if
(
legacyState
)
{
if
(
legacyState
)
{
...
@@ -922,16 +932,6 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
...
@@ -922,16 +932,6 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
return
void
0
;
return
void
0
;
}
}
private
setGridWidget
(
grid
?:
SerializableGrid
<
IEditorGroupView
>
):
void
{
this
.
gridWidget
=
grid
;
if
(
grid
)
{
this
.
_onDidChange
.
input
=
grid
.
onDidChange
;
}
this
.
_onDidSetGridWidget
.
fire
();
}
private
updateContainer
():
void
{
private
updateContainer
():
void
{
toggleClass
(
this
.
gridWidget
.
element
,
'
empty
'
,
this
.
isEmpty
());
toggleClass
(
this
.
gridWidget
.
element
,
'
empty
'
,
this
.
isEmpty
());
}
}
...
@@ -1004,9 +1004,6 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
...
@@ -1004,9 +1004,6 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
this
.
groupViews
.
forEach
(
group
=>
group
.
dispose
());
this
.
groupViews
.
forEach
(
group
=>
group
.
dispose
());
this
.
groupViews
.
clear
();
this
.
groupViews
.
clear
();
this
.
_onDidSetGridWidget
.
dispose
();
this
.
_onDidChange
.
dispose
();
// Grid widget
// Grid widget
if
(
this
.
gridWidget
)
{
if
(
this
.
gridWidget
)
{
this
.
gridWidget
=
dispose
(
this
.
gridWidget
);
this
.
gridWidget
=
dispose
(
this
.
gridWidget
);
...
...
src/vs/workbench/browser/parts/editor/sideBySideEditor.ts
浏览文件 @
74caa412
...
@@ -55,7 +55,7 @@ export class SideBySideEditor extends BaseEditor {
...
@@ -55,7 +55,7 @@ export class SideBySideEditor extends BaseEditor {
private
_onDidCreateEditors
=
new
Emitter
<
{
width
:
number
;
height
:
number
;
}
>
();
private
_onDidCreateEditors
=
new
Emitter
<
{
width
:
number
;
height
:
number
;
}
>
();
private
_onDidChange
=
new
Relay
<
{
width
:
number
;
height
:
number
;
}
>
();
private
_onDidChange
=
new
Relay
<
{
width
:
number
;
height
:
number
;
}
>
();
readonly
onDidChange
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
=
anyEvent
(
this
.
_onDidCreateEditors
.
event
,
this
.
_onDidChange
.
event
);
readonly
onDid
SizeConstraints
Change
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
=
anyEvent
(
this
.
_onDidCreateEditors
.
event
,
this
.
_onDidChange
.
event
);
constructor
(
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
,
...
@@ -190,8 +190,8 @@ export class SideBySideEditor extends BaseEditor {
...
@@ -190,8 +190,8 @@ export class SideBySideEditor extends BaseEditor {
this
.
masterEditor
=
master
;
this
.
masterEditor
=
master
;
this
.
_onDidChange
.
input
=
anyEvent
(
this
.
_onDidChange
.
input
=
anyEvent
(
mapEvent
(
details
.
onDidChange
,
()
=>
undefined
),
mapEvent
(
details
.
onDid
SizeConstraints
Change
,
()
=>
undefined
),
mapEvent
(
master
.
onDidChange
,
()
=>
undefined
)
mapEvent
(
master
.
onDid
SizeConstraints
Change
,
()
=>
undefined
)
);
);
this
.
_onDidCreateEditors
.
fire
();
this
.
_onDidCreateEditors
.
fire
();
...
...
src/vs/workbench/common/editor.ts
浏览文件 @
74caa412
...
@@ -81,7 +81,7 @@ export interface IEditor {
...
@@ -81,7 +81,7 @@ export interface IEditor {
/**
/**
* An event to notify whenever minimum/maximum width/height changes.
* An event to notify whenever minimum/maximum width/height changes.
*/
*/
readonly
onDidChange
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
;
readonly
onDid
SizeConstraints
Change
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
;
/**
/**
* Returns the unique identifier of this editor.
* Returns the unique identifier of this editor.
...
...
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
浏览文件 @
74caa412
...
@@ -83,7 +83,7 @@ export class PreferencesEditor extends BaseEditor {
...
@@ -83,7 +83,7 @@ export class PreferencesEditor extends BaseEditor {
set
maximumWidth
(
value
:
number
)
{
/*noop*/
}
set
maximumWidth
(
value
:
number
)
{
/*noop*/
}
private
_onDidCreateWidget
=
new
Emitter
<
{
width
:
number
;
height
:
number
;
}
>
();
private
_onDidCreateWidget
=
new
Emitter
<
{
width
:
number
;
height
:
number
;
}
>
();
readonly
onDidChange
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
=
this
.
_onDidCreateWidget
.
event
;
readonly
onDid
SizeConstraints
Change
:
Event
<
{
width
:
number
;
height
:
number
;
}
>
=
this
.
_onDidCreateWidget
.
event
;
constructor
(
constructor
(
@
IPreferencesService
private
preferencesService
:
IPreferencesService
,
@
IPreferencesService
private
preferencesService
:
IPreferencesService
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录