Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
03c39a24
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,发现更多精彩内容 >>
提交
03c39a24
编写于
5月 11, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drop forceActive in favour of IEditorService.setActive()
上级
df5f8335
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
23 deletion
+21
-23
src/vs/platform/editor/common/editor.ts
src/vs/platform/editor/common/editor.ts
+3
-3
src/vs/workbench/browser/parts/editor/editorPart.ts
src/vs/workbench/browser/parts/editor/editorPart.ts
+0
-5
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+17
-14
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+1
-1
未找到文件。
src/vs/platform/editor/common/editor.ts
浏览文件 @
03c39a24
...
...
@@ -70,10 +70,10 @@ export interface IResourceInput {
preserveFocus
?:
boolean
;
/**
* Ensures that the editor is being activated even if the input is already showing. This only applies
* if there is more than one editor open already and preserveFocus is set to false.
* TODO@stacks clean up
*/
forceActive
?:
boolean
;
pinned
?:
boolean
;
index
?:
number
;
};
}
...
...
src/vs/workbench/browser/parts/editor/editorPart.ts
浏览文件 @
03c39a24
...
...
@@ -422,11 +422,6 @@ export class EditorPart extends Part implements IEditorPart {
editor
.
focus
();
}
// Otherwise check if we want to activate
else
if
(
options
&&
options
.
forceActive
)
{
this
.
sideBySideControl
.
setActive
(
editor
);
}
// Progress Done
this
.
sideBySideControl
.
updateProgress
(
position
,
ProgressState
.
DONE
);
...
...
src/vs/workbench/common/editor.ts
浏览文件 @
03c39a24
...
...
@@ -266,15 +266,12 @@ export class EditorOptions implements IEditorOptions {
public
static
create
(
settings
:
{
preserveFocus
?:
boolean
;
forceOpen
?:
boolean
;
forceActive
?:
boolean
,
pinned
?:
boolean
,
active
?:
boolean
,
index
?:
number
}):
EditorOptions
{
let
options
=
new
EditorOptions
();
options
.
preserveFocus
=
settings
.
preserveFocus
;
options
.
forceOpen
=
settings
.
forceOpen
;
options
.
forceActive
=
settings
.
forceActive
;
options
.
pinned
=
settings
.
pinned
;
options
.
index
=
settings
.
index
;
...
...
@@ -287,7 +284,6 @@ export class EditorOptions implements IEditorOptions {
public
mixin
(
other
:
EditorOptions
):
void
{
this
.
preserveFocus
=
other
.
preserveFocus
;
this
.
forceOpen
=
other
.
forceOpen
;
this
.
forceActive
=
other
.
forceActive
;
this
.
pinned
=
other
.
pinned
;
this
.
index
=
other
.
index
;
}
...
...
@@ -305,14 +301,6 @@ export class EditorOptions implements IEditorOptions {
*/
public
forceOpen
:
boolean
;
/**
* Ensures that the editor is being activated even if the input is already showing. This only applies
* if there is more than one editor open already and preserveFocus is set to false.
*
* TODO@stacks does this still apply?
*/
public
forceActive
:
boolean
;
/**
* TODO@stacks clean up
*/
...
...
@@ -356,6 +344,14 @@ export class TextEditorOptions extends EditorOptions {
if
(
input
.
options
.
preserveFocus
)
{
options
.
preserveFocus
=
true
;
}
if
(
input
.
options
.
pinned
)
{
options
.
pinned
=
true
;
}
if
(
typeof
input
.
options
.
index
===
'
number
'
)
{
options
.
index
=
input
.
options
.
index
;
}
}
return
options
;
...
...
@@ -364,11 +360,18 @@ export class TextEditorOptions extends EditorOptions {
/**
* Helper to create TextEditorOptions inline.
*/
public
static
create
(
settings
:
{
preserveFocus
?:
boolean
;
forceOpen
?:
boolean
;
forceActive
?:
boolean
;
selection
?:
IRange
}):
TextEditorOptions
{
public
static
create
(
settings
:
{
preserveFocus
?:
boolean
;
forceOpen
?:
boolean
;
pinned
?:
boolean
;
index
?:
number
;
selection
?:
IRange
}):
TextEditorOptions
{
let
options
=
new
TextEditorOptions
();
options
.
preserveFocus
=
settings
.
preserveFocus
;
options
.
forceActive
=
settings
.
forceActive
;
options
.
forceOpen
=
settings
.
forceOpen
;
options
.
pinned
=
settings
.
pinned
;
options
.
index
=
settings
.
index
;
if
(
settings
.
selection
)
{
options
.
startLineNumber
=
settings
.
selection
.
startLineNumber
;
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
03c39a24
...
...
@@ -735,7 +735,7 @@ export class DebugService implements debug.IDebugService {
if
(
control
)
{
control
.
revealLineInCenterIfOutsideViewport
(
lineNumber
);
control
.
setSelection
({
startLineNumber
:
lineNumber
,
startColumn
:
1
,
endLineNumber
:
lineNumber
,
endColumn
:
1
});
return
this
.
editorService
.
openEditor
(
visibleEditors
[
i
].
input
,
wbeditorcommon
.
TextEditorOptions
.
create
({
preserveFocus
:
preserveFocus
,
forceActive
:
true
}),
visibleEditors
[
i
].
position
);
this
.
editorService
.
activateEditor
(
visibleEditors
[
i
]
);
}
return
TPromise
.
as
(
null
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录