Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
5ef42ec5
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,发现更多精彩内容 >>
提交
5ef42ec5
编写于
6月 01, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
less direct use of EditorInput
上级
efeffdd1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
18 deletion
+18
-18
src/vs/workbench/browser/parts/editor/editorActions.ts
src/vs/workbench/browser/parts/editor/editorActions.ts
+2
-2
src/vs/workbench/browser/quickopen.ts
src/vs/workbench/browser/quickopen.ts
+4
-4
src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts
src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts
+4
-4
src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts
...vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts
+4
-4
src/vs/workbench/services/editor/browser/editorService.ts
src/vs/workbench/services/editor/browser/editorService.ts
+4
-4
未找到文件。
src/vs/workbench/browser/parts/editor/editorActions.ts
浏览文件 @
5ef42ec5
...
...
@@ -14,7 +14,7 @@ import {EditorQuickOpenEntry, EditorQuickOpenEntryGroup, IEditorQuickOpenEntry,
import
{
IWorkbenchEditorService
,
GroupArrangement
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IQuickOpenService
,
IPickOpenEntry
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
Position
,
IEditor
,
Direction
}
from
'
vs/platform/editor/common/editor
'
;
import
{
Position
,
IEditor
,
Direction
,
IResourceInput
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IEditorIdentifier
}
from
'
vs/workbench/common/editor/editorStacksModel
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
...
...
@@ -367,7 +367,7 @@ export class OpenToSideAction extends Action {
if
(
input
instanceof
EditorInput
)
{
typedInputPromise
=
TPromise
.
as
(
input
);
}
else
{
typedInputPromise
=
this
.
editorService
.
createInput
(
input
);
typedInputPromise
=
this
.
editorService
.
createInput
(
<
IResourceInput
>
input
);
}
return
typedInputPromise
.
then
(
typedInput
=>
this
.
editorService
.
openEditor
(
typedInput
,
entry
.
getOptions
(),
true
));
...
...
src/vs/workbench/browser/quickopen.ts
浏览文件 @
5ef42ec5
...
...
@@ -17,7 +17,7 @@ import {KeyMod} from 'vs/base/common/keyCodes';
import
{
Mode
,
IEntryRunContext
,
IAutoFocus
,
IModel
}
from
'
vs/base/parts/quickopen/common/quickOpen
'
;
import
{
QuickOpenEntry
,
IHighlight
,
QuickOpenEntryGroup
,
QuickOpenModel
}
from
'
vs/base/parts/quickopen/browser/quickOpenModel
'
;
import
{
EditorOptions
,
EditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
IResourceInput
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IResourceInput
,
IEditorInput
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
AsyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
...
...
@@ -204,7 +204,7 @@ export interface IEditorQuickOpenEntry {
/**
* The editor input used for this entry when opening.
*/
getInput
():
IResourceInput
|
EditorInput
;
getInput
():
IResourceInput
|
I
EditorInput
;
/**
* The editor options used for this entry when opening.
...
...
@@ -225,7 +225,7 @@ export class EditorQuickOpenEntry extends QuickOpenEntry implements IEditorQuick
return
this
.
_editorService
;
}
public
getInput
():
IResourceInput
|
EditorInput
{
public
getInput
():
IResourceInput
|
I
EditorInput
{
return
null
;
}
...
...
@@ -256,7 +256,7 @@ export class EditorQuickOpenEntry extends QuickOpenEntry implements IEditorQuick
*/
export
class
EditorQuickOpenEntryGroup
extends
QuickOpenEntryGroup
implements
IEditorQuickOpenEntry
{
public
getInput
():
EditorInput
{
public
getInput
():
I
EditorInput
{
return
null
;
}
...
...
src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts
浏览文件 @
5ef42ec5
...
...
@@ -12,11 +12,11 @@ import {IEntryRunContext, Mode, IAutoFocus} from 'vs/base/parts/quickopen/common
import
{
QuickOpenModel
}
from
'
vs/base/parts/quickopen/browser/quickOpenModel
'
;
import
{
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
{
QuickOpenHandler
,
EditorQuickOpenEntry
,
QuickOpenAction
}
from
'
vs/workbench/browser/quickopen
'
;
import
{
TextEditorOptions
,
EditorOptions
,
EditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
TextEditorOptions
,
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
{
BaseTextEditor
}
from
'
vs/workbench/browser/parts/editor/textEditor
'
;
import
{
IEditor
,
IModelDecorationsChangeAccessor
,
OverviewRulerLane
,
IModelDeltaDecoration
,
IRange
,
IEditorViewState
,
ITextModel
,
IDiffEditorModel
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
Position
}
from
'
vs/platform/editor/common/editor
'
;
import
{
Position
,
IEditorInput
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
export
const
GOTO_LINE_PREFIX
=
'
:
'
;
...
...
@@ -88,8 +88,8 @@ class GotoLineEntry extends EditorQuickOpenEntry {
return
this
.
runPreview
();
}
public
getInput
():
EditorInput
{
return
<
EditorInput
>
this
.
editorService
.
getActiveEditorInput
();
public
getInput
():
I
EditorInput
{
return
this
.
editorService
.
getActiveEditorInput
();
}
public
getOptions
():
EditorOptions
{
...
...
src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts
浏览文件 @
5ef42ec5
...
...
@@ -15,14 +15,14 @@ import {IEntryRunContext, Mode, IAutoFocus} from 'vs/base/parts/quickopen/common
import
{
QuickOpenModel
,
IHighlight
}
from
'
vs/base/parts/quickopen/browser/quickOpenModel
'
;
import
{
QuickOpenHandler
,
EditorQuickOpenEntryGroup
,
QuickOpenAction
}
from
'
vs/workbench/browser/quickopen
'
;
import
{
BaseTextEditor
}
from
'
vs/workbench/browser/parts/editor/textEditor
'
;
import
{
TextEditorOptions
,
EditorOptions
,
EditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
TextEditorOptions
,
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
filters
=
require
(
'
vs/base/common/filters
'
);
import
{
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
{
IEditor
,
IModelDecorationsChangeAccessor
,
OverviewRulerLane
,
IModelDeltaDecoration
,
IRange
,
IModel
,
ITokenizedModel
,
IDiffEditorModel
,
IEditorViewState
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
Position
}
from
'
vs/platform/editor/common/editor
'
;
import
{
Position
,
IEditorInput
}
from
'
vs/platform/editor/common/editor
'
;
import
{
getDocumentSymbols
}
from
'
vs/editor/contrib/quickOpen/common/quickOpen
'
;
import
{
DocumentSymbolProviderRegistry
,
SymbolInformation
,
SymbolKind
}
from
'
vs/editor/common/modes
'
;
...
...
@@ -289,8 +289,8 @@ class SymbolEntry extends EditorQuickOpenEntryGroup {
return
this
.
range
;
}
public
getInput
():
EditorInput
{
return
<
EditorInput
>
this
.
editorService
.
getActiveEditorInput
();
public
getInput
():
I
EditorInput
{
return
this
.
editorService
.
getActiveEditorInput
();
}
public
getOptions
():
EditorOptions
{
...
...
src/vs/workbench/services/editor/browser/editorService.ts
浏览文件 @
5ef42ec5
...
...
@@ -47,7 +47,7 @@ export interface IEditorPart {
}
export
class
WorkbenchEditorService
implements
IWorkbenchEditorService
{
public
serviceId
=
IWorkbenchEditorService
;
private
editorPart
:
IEditorPart
|
IWorkbenchEditorService
;
...
...
@@ -122,7 +122,7 @@ export class WorkbenchEditorService implements IWorkbenchEditorService {
// Workbench Input Support
if
(
input
instanceof
EditorInput
)
{
return
this
.
doOpenEditor
(
<
EditorInput
>
input
,
<
EditorOptions
>
arg2
,
arg3
);
return
this
.
doOpenEditor
(
input
,
<
EditorOptions
>
arg2
,
arg3
);
}
// Support opening foreign resources (such as a http link that points outside of the workbench)
...
...
@@ -225,7 +225,7 @@ export class WorkbenchEditorService implements IWorkbenchEditorService {
// Resolve if applicable
if
(
workbenchInput
instanceof
EditorInput
)
{
return
(
<
EditorInput
>
workbenchInput
)
.
resolve
(
!!
refresh
);
return
workbenchInput
.
resolve
(
!!
refresh
);
}
}
...
...
@@ -239,7 +239,7 @@ export class WorkbenchEditorService implements IWorkbenchEditorService {
// Workbench Input Support
if
(
input
instanceof
EditorInput
)
{
return
TPromise
.
as
<
EditorInput
>
(
<
EditorInput
>
input
);
return
TPromise
.
as
<
EditorInput
>
(
input
);
}
// Base Text Editor Support for inmemory resources
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录