Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9c3cdc20
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,发现更多精彩内容 >>
提交
9c3cdc20
编写于
4月 23, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
some comments
上级
3dad25db
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
12 deletion
+29
-12
src/vs/workbench/browser/parts/editor2/nextEditorPart.ts
src/vs/workbench/browser/parts/editor2/nextEditorPart.ts
+17
-4
src/vs/workbench/browser/parts/editor2/nextEditorsViewer.ts
src/vs/workbench/browser/parts/editor2/nextEditorsViewer.ts
+12
-8
未找到文件。
src/vs/workbench/browser/parts/editor2/nextEditorPart.ts
浏览文件 @
9c3cdc20
...
...
@@ -17,7 +17,7 @@ import { join } from 'vs/base/common/paths';
import
{
editorBackground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
INextEditorPartService
}
from
'
vs/workbench/services/editor/common/nextEditorPartService
'
;
import
{
EditorInput
,
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
{
NextEditor
Viewer
,
GridOrientation
}
from
'
./nextEditor
Viewer
'
;
import
{
NextEditor
sViewer
,
GridOrientation
}
from
'
vs/workbench/browser/parts/editor2/nextEditors
Viewer
'
;
// import { IStorageService } from 'vs/platform/storage/common/storage';
export
class
NextEditorPart
extends
Part
implements
INextEditorPartService
{
...
...
@@ -29,7 +29,7 @@ export class NextEditorPart extends Part implements INextEditorPartService {
// private dimension: Dimension;
// private memento: object;
private
viewer
:
NextEditorViewer
;
private
viewer
:
NextEditor
s
Viewer
;
constructor
(
id
:
string
,
...
...
@@ -43,7 +43,7 @@ export class NextEditorPart extends Part implements INextEditorPartService {
// this.memento = this.getMemento(this.storageService, Scope.WORKSPACE);
this
.
viewer
=
new
NextEditorViewer
();
this
.
viewer
=
new
NextEditor
s
Viewer
();
this
.
initStyles
();
}
...
...
@@ -54,7 +54,20 @@ export class NextEditorPart extends Part implements INextEditorPartService {
// TODO@grid editor opening event and prevention
// TODO@grid support options
return
this
.
viewer
.
split
([],
GridOrientation
.
HORIZONTAL
,
input
,
options
);
// TODO@grid delegate the management of instantiated ("live"?) editors into a helper class
// that associates editors to a group id. editors should get disposed once a group closes
// Flow
// - editors viewer is the main grid control that owns EditorGroups and GridViews to add HTML into (this enables empty groups too!)
// - a helper class manages instantiation/lifecycle of ("live") editors (maybe also the title control? maybe all UI associated to show a group?)
// - how does the input gets opened in the editor group? is it 2 calls, one for editorgroup and one for showing it as HTML?
// - ^ is a bit fishy, would be nice to have this all combined somehow?
// - idea: have a EditorGroupView helper that is the thing added into a GridView and it also has a openEditor method which sets
// the editor to the editor group as well as renders the UI pieces
const
group
=
this
.
viewer
.
split
([],
GridOrientation
.
HORIZONTAL
);
return
TPromise
.
as
(
void
0
);
}
private
initStyles
():
void
{
...
...
src/vs/workbench/browser/parts/editor2/nextEditorViewer.ts
→
src/vs/workbench/browser/parts/editor2/nextEditor
s
Viewer.ts
浏览文件 @
9c3cdc20
...
...
@@ -5,16 +5,15 @@
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
EditorInput
,
EditorOptions
,
GroupIdentifier
}
from
'
vs/workbench/common/editor
'
;
// import { EditorGroup } from '../../../common/editor/editorStacksModel';
// import { TPromise } from 'vs/base/common/winjs.base';
import
{
EditorGroup
}
from
'
vs/workbench/common/editor/editorStacksModel
'
;
export
enum
GridOrientation
{
VERTICAL
,
HORIZONTAL
}
export
class
NextEditorViewer
{
export
class
NextEditor
s
Viewer
{
private
_element
:
HTMLElement
;
// private model: NextEditorViewModel;
...
...
@@ -27,14 +26,19 @@ export class NextEditorViewer {
return
this
.
_element
;
}
split
(
location
:
number
[],
orientation
:
GridOrientation
,
input
:
EditorInput
,
options
?:
EditorOptions
):
TPromise
<
void
>
{
split
(
location
:
number
[],
orientation
:
GridOrientation
):
EditorGroup
/* IEditorGroupView */
{
// TODO this should return some GridView/IEditorGroupView type which combines a newly created EditorGroup and HTML container
return
TPromise
.
as
(
void
0
)
;
return
void
0
;
}
show
(
id
:
GroupIdentifier
,
input
:
EditorInput
,
options
?:
EditorOptions
):
TPromise
<
void
>
{
return
TPromise
.
as
(
void
0
);
groupAt
(
location
:
number
[]):
EditorGroup
/* IEditorGroupView */
{
return
void
0
;
}
get
groups
():
EditorGroup
[]
/* IEditorGroupView */
{
return
[];
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录