Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f694e26a
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,发现更多精彩内容 >>
提交
f694e26a
编写于
1月 13, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move more inputs from browser => common
上级
cf459844
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
20 addition
and
20 deletion
+20
-20
src/vs/workbench/browser/parts/editor/stringEditor.ts
src/vs/workbench/browser/parts/editor/stringEditor.ts
+1
-1
src/vs/workbench/common/editor/logEditorInput.ts
src/vs/workbench/common/editor/logEditorInput.ts
+8
-7
src/vs/workbench/parts/output/browser/output.contribution.ts
src/vs/workbench/parts/output/browser/output.contribution.ts
+2
-2
src/vs/workbench/parts/output/browser/outputActions.contribution.ts
...kbench/parts/output/browser/outputActions.contribution.ts
+1
-1
src/vs/workbench/parts/output/browser/outputActions.ts
src/vs/workbench/parts/output/browser/outputActions.ts
+1
-1
src/vs/workbench/parts/output/common/outputEditorInput.ts
src/vs/workbench/parts/output/common/outputEditorInput.ts
+1
-1
src/vs/workbench/parts/output/common/outputServices.ts
src/vs/workbench/parts/output/common/outputServices.ts
+5
-6
src/vs/workbench/test/browser/parts/editor/stringEditorInput.test.ts
...bench/test/browser/parts/editor/stringEditorInput.test.ts
+1
-1
未找到文件。
src/vs/workbench/browser/parts/editor/stringEditor.ts
浏览文件 @
f694e26a
...
...
@@ -13,7 +13,7 @@ import {DefaultConfig} from 'vs/editor/common/config/defaultConfig';
import
{
EditorConfiguration
}
from
'
vs/editor/common/config/commonEditorConfig
'
;
import
{
TextEditorOptions
,
EditorModel
,
EditorInput
,
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
{
BaseTextEditorModel
}
from
'
vs/workbench/common/editor/textEditorModel
'
;
import
{
LogEditorInput
}
from
'
vs/workbench/
browser/parts
/editor/logEditorInput
'
;
import
{
LogEditorInput
}
from
'
vs/workbench/
common
/editor/logEditorInput
'
;
import
{
UntitledEditorInput
}
from
'
vs/workbench/common/editor/untitledEditorInput
'
;
import
{
BaseTextEditor
}
from
'
vs/workbench/browser/parts/editor/textEditor
'
;
import
{
UntitledEditorEvent
,
EventType
}
from
'
vs/workbench/common/events
'
;
...
...
src/vs/workbench/
browser/parts
/editor/logEditorInput.ts
→
src/vs/workbench/
common
/editor/logEditorInput.ts
浏览文件 @
f694e26a
...
...
@@ -4,9 +4,8 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
I
CodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
I
Editor
,
ITextModel
}
from
'
vs/editor/common/editorCommon
'
;
import
{
StringEditorInput
}
from
'
vs/workbench/common/editor/stringEditorInput
'
;
import
{
BaseTextEditor
}
from
'
vs/workbench/browser/parts/editor/textEditor
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -58,15 +57,17 @@ export class LogEditorInput extends StringEditorInput {
return
newValue
;
}
private
revealLastLine
():
void
{
/**
* Reveals the last line on any editor that has this output set.
*/
public
revealLastLine
():
void
{
let
editors
=
this
.
editorService
.
getVisibleEditors
();
for
(
let
i
=
0
;
i
<
editors
.
length
;
i
++
)
{
let
editor
=
editors
[
i
];
if
(
editor
.
input
===
this
&&
editor
instanceof
BaseTextEditor
)
{
let
textEditor
=
<
BaseTextEditor
>
editor
;
let
editorControl
=
<
ICodeEditor
>
textEditor
.
getControl
();
if
(
editor
.
input
===
this
)
{
let
editorControl
=
<
IEditor
>
editor
.
getControl
();
if
(
editorControl
)
{
let
model
=
editorControl
.
getModel
();
let
model
=
<
ITextModel
>
editorControl
.
getModel
();
if
(
model
)
{
let
lastLine
=
model
.
getLineCount
();
editorControl
.
revealLine
(
lastLine
);
...
...
src/vs/workbench/parts/output/browser/output.contribution.ts
浏览文件 @
f694e26a
...
...
@@ -6,9 +6,9 @@
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
registerMode
}
from
'
vs/editor/common/modes/modesRegistry
'
;
import
{
OutputService
}
from
'
vs/workbench/parts/output/
browser
/outputServices
'
;
import
{
OutputService
}
from
'
vs/workbench/parts/output/
common
/outputServices
'
;
import
{
OUTPUT_MIME
,
OUTPUT_MODE_ID
,
OUTPUT_EDITOR_INPUT_ID
,
IOutputService
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
OutputEditorInput
}
from
'
vs/workbench/parts/output/
browser
/outputEditorInput
'
;
import
{
OutputEditorInput
}
from
'
vs/workbench/parts/output/
common
/outputEditorInput
'
;
import
{
IEditorRegistry
,
Extensions
,
IEditorInputFactory
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
import
{
EditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
IInstantiationService
,
INullService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
src/vs/workbench/parts/output/browser/outputActions.contribution.ts
浏览文件 @
f694e26a
...
...
@@ -15,7 +15,7 @@ import {CommonEditorRegistry, EditorActionDescriptor} from 'vs/editor/common/edi
import
{
Scope
,
IActionBarRegistry
,
Extensions
as
ActionBarExtensions
}
from
'
vs/workbench/browser/actionBarRegistry
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
IEditorInputAction
,
IEditorInputActionContext
,
EditorInputActionContributor
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
import
{
OutputEditorInput
}
from
'
vs/workbench/parts/output/
browser
/outputEditorInput
'
;
import
{
OutputEditorInput
}
from
'
vs/workbench/parts/output/
common
/outputEditorInput
'
;
import
{
ClearOutputEditorAction
,
ToggleOutputAction
,
GlobalShowOutputAction
,
SwitchOutputActionItem
,
SwitchOutputAction
,
ClearOutputAction
}
from
'
vs/workbench/parts/output/browser/outputActions
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
KeyMod
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
...
...
src/vs/workbench/parts/output/browser/outputActions.ts
浏览文件 @
f694e26a
...
...
@@ -15,7 +15,7 @@ import {EditorAction, Behaviour} from 'vs/editor/common/editorAction';
import
{
ICommonCodeEditor
,
IEditorActionDescriptorData
}
from
'
vs/editor/common/editorCommon
'
;
import
{
EditorInputAction
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
import
{
IOutputChannelRegistry
,
Extensions
,
IOutputService
,
OUTPUT_EDITOR_INPUT_ID
,
OUTPUT_MODE_ID
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
OutputEditorInput
}
from
'
vs/workbench/parts/output/
browser
/outputEditorInput
'
;
import
{
OutputEditorInput
}
from
'
vs/workbench/parts/output/
common
/outputEditorInput
'
;
import
{
SelectActionItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
...
...
src/vs/workbench/parts/output/
browser
/outputEditorInput.ts
→
src/vs/workbench/parts/output/
common
/outputEditorInput.ts
浏览文件 @
f694e26a
...
...
@@ -7,7 +7,7 @@
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
nls
=
require
(
'
vs/nls
'
);
import
{
EditorModel
}
from
'
vs/workbench/common/editor
'
;
import
{
LogEditorInput
}
from
'
vs/workbench/
browser/parts
/editor/logEditorInput
'
;
import
{
LogEditorInput
}
from
'
vs/workbench/
common
/editor/logEditorInput
'
;
import
{
OUTPUT_EDITOR_INPUT_ID
,
IOutputEvent
,
OUTPUT_MIME
,
IOutputService
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
...
...
src/vs/workbench/parts/output/
browser
/outputServices.ts
→
src/vs/workbench/parts/output/
common
/outputServices.ts
浏览文件 @
f694e26a
...
...
@@ -8,9 +8,8 @@ import {Promise, TPromise} from 'vs/base/common/winjs.base';
import
strings
=
require
(
'
vs/base/common/strings
'
);
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
{
StringEditor
}
from
'
vs/workbench/browser/parts/editor/stringEditor
'
;
import
{
OUTPUT_MIME
,
DEFAULT_OUTPUT_CHANNEL
,
IOutputEvent
,
IOutputService
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
OutputEditorInput
}
from
'
vs/workbench/parts/output/
browser
/outputEditorInput
'
;
import
{
OutputEditorInput
}
from
'
vs/workbench/parts/output/
common
/outputEditorInput
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IEditor
,
Position
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IEventService
}
from
'
vs/platform/event/common/event
'
;
...
...
@@ -172,21 +171,21 @@ export class OutputService implements IOutputService {
}
// Still reveal last line
existingOutputEditor
.
revealLastLine
();
(
<
OutputEditorInput
>
existingOutputEditor
.
input
)
.
revealLastLine
();
return
Promise
.
as
(
existingOutputEditor
);
}
// Otherwise open new
return
this
.
editorService
.
openEditor
(
OutputEditorInput
.
getInstance
(
this
.
instantiationService
,
channel
),
preserveFocus
?
EditorOptions
.
create
({
preserveFocus
:
true
})
:
null
,
<
any
>
sideBySide
);
return
this
.
editorService
.
openEditor
(
OutputEditorInput
.
getInstance
(
this
.
instantiationService
,
channel
),
preserveFocus
?
EditorOptions
.
create
({
preserveFocus
:
true
})
:
null
,
<
any
>
sideBySide
);
}
private
findOutputEditor
(
channel
:
string
):
String
Editor
{
private
findOutputEditor
(
channel
:
string
):
I
Editor
{
let
editors
=
this
.
editorService
.
getVisibleEditors
();
for
(
let
i
=
0
;
i
<
editors
.
length
;
i
++
)
{
let
editor
=
editors
[
i
];
if
(
editor
.
input
instanceof
OutputEditorInput
&&
(
<
OutputEditorInput
>
editor
.
input
).
getChannel
()
===
channel
&&
(
<
OutputEditorInput
>
editor
.
input
).
getMime
()
===
OUTPUT_MIME
)
{
return
<
StringEditor
>
editor
;
return
editor
;
}
}
...
...
src/vs/workbench/test/browser/parts/editor/stringEditorInput.test.ts
浏览文件 @
f694e26a
...
...
@@ -10,7 +10,7 @@ import {Promise } from 'vs/base/common/winjs.base';
import
*
as
Strings
from
'
vs/base/common/strings
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
StringEditorInput
}
from
'
vs/workbench/common/editor/stringEditorInput
'
;
import
{
LogEditorInput
}
from
'
vs/workbench/
browser/parts
/editor/logEditorInput
'
;
import
{
LogEditorInput
}
from
'
vs/workbench/
common
/editor/logEditorInput
'
;
import
{
ResourceEditorInput
}
from
'
vs/workbench/common/editor/resourceEditorInput
'
;
import
{
ResourceEditorModel
}
from
'
vs/workbench/common/editor/resourceEditorModel
'
;
import
{
TestWorkspace
,
TestEditorService
,
MockRequestService
}
from
'
vs/workbench/test/browser/servicesTestUtils
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录