Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
92839a05
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,发现更多精彩内容 >>
提交
92839a05
编写于
12月 10, 2015
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
some cleanup
上级
d97efc5f
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
11 addition
and
26 deletion
+11
-26
src/vs/workbench/browser/parts/quickopen/editorHistoryModel.ts
...s/workbench/browser/parts/quickopen/editorHistoryModel.ts
+1
-3
src/vs/workbench/browser/parts/quickopen/quickOpenController.ts
.../workbench/browser/parts/quickopen/quickOpenController.ts
+1
-3
src/vs/workbench/browser/workbench.ts
src/vs/workbench/browser/workbench.ts
+0
-3
src/vs/workbench/parts/quickopen/browser/commandsHandler.ts
src/vs/workbench/parts/quickopen/browser/commandsHandler.ts
+1
-2
src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts
...vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts
+1
-2
src/vs/workbench/parts/search/browser/openAnythingHandler.ts
src/vs/workbench/parts/search/browser/openAnythingHandler.ts
+0
-2
src/vs/workbench/parts/search/browser/openFileHandler.ts
src/vs/workbench/parts/search/browser/openFileHandler.ts
+1
-3
src/vs/workbench/test/browser/parts/quickOpen/quickopen.test.ts
.../workbench/test/browser/parts/quickOpen/quickopen.test.ts
+6
-8
未找到文件。
src/vs/workbench/browser/parts/quickopen/editorHistoryModel.ts
浏览文件 @
92839a05
...
...
@@ -19,7 +19,6 @@ import {EditorInput, getUntitledOrFileResource} from 'vs/workbench/common/editor
import
{
IEditorRegistry
,
Extensions
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
import
{
EditorQuickOpenEntry
}
from
'
vs/workbench/browser/quickopen
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/browser/quickOpenService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
...
...
@@ -118,8 +117,7 @@ export class EditorHistoryModel extends QuickOpenModel {
constructor
(
private
editorService
:
IWorkbenchEditorService
,
private
instantiationService
:
IInstantiationService
,
private
contextService
:
IWorkspaceContextService
,
private
quickOpenService
:
IQuickOpenService
private
contextService
:
IWorkspaceContextService
)
{
super
();
}
...
...
src/vs/workbench/browser/parts/quickopen/quickOpenController.ts
浏览文件 @
92839a05
...
...
@@ -40,7 +40,6 @@ import {IMessageService, Severity} from 'vs/platform/message/common/message';
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IWorkspaceContextService
}
from
'
vs/workbench/services/workspace/common/contextService
'
;
import
{
IKeybindingService
,
IKeybindingContextKey
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
import
{
IConfigurationService
,
IConfigurationServiceEvent
,
ConfigurationServiceEventTypes
}
from
'
vs/platform/configuration/common/configuration
'
;
const
ID
=
'
workbench.component.quickopen
'
;
const
EDITOR_HISTORY_STORAGE_KEY
=
'
quickopen.editorhistory
'
;
...
...
@@ -87,7 +86,6 @@ export class QuickOpenController extends WorkbenchComponent implements IQuickOpe
private
messageService
:
IMessageService
,
private
telemetryService
:
ITelemetryService
,
private
contextService
:
IWorkspaceContextService
,
private
configurationService
:
IConfigurationService
,
keybindingService
:
IKeybindingService
)
{
super
(
ID
);
...
...
@@ -126,7 +124,7 @@ export class QuickOpenController extends WorkbenchComponent implements IQuickOpe
this
.
toUnbind
.
push
(
this
.
eventService
.
addListener
(
EventType
.
EDITOR_SET_INPUT_ERROR
,
(
e
:
EditorEvent
)
=>
this
.
onEditorInputSetError
(
e
)));
// Editor History Model
this
.
editorHistoryModel
=
new
EditorHistoryModel
(
this
.
editorService
,
this
.
instantiationService
,
this
.
contextService
,
this
);
this
.
editorHistoryModel
=
new
EditorHistoryModel
(
this
.
editorService
,
this
.
instantiationService
,
this
.
contextService
);
this
.
memento
=
this
.
getMemento
(
this
.
storageService
,
Scope
.
WORKSPACE
);
if
(
this
.
memento
[
EDITOR_HISTORY_STORAGE_KEY
])
{
this
.
editorHistoryModel
.
loadFrom
(
this
.
memento
[
EDITOR_HISTORY_STORAGE_KEY
]);
...
...
src/vs/workbench/browser/workbench.ts
浏览文件 @
92839a05
...
...
@@ -29,7 +29,6 @@ import {HistoryService} from 'vs/workbench/services/history/browser/history';
import
{
ActivitybarPart
}
from
'
vs/workbench/browser/parts/activitybar/activitybarPart
'
;
import
{
EditorPart
}
from
'
vs/workbench/browser/parts/editor/editorPart
'
;
import
{
SidebarPart
}
from
'
vs/workbench/browser/parts/sidebar/sidebarPart
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
StatusbarPart
}
from
'
vs/workbench/browser/parts/statusbar/statusbarPart
'
;
import
{
WorkbenchLayout
,
LayoutOptions
}
from
'
vs/workbench/browser/layout
'
;
import
{
IActionBarRegistry
,
Extensions
as
ActionBarExtensions
}
from
'
vs/workbench/browser/actionBarRegistry
'
;
...
...
@@ -271,7 +270,6 @@ export class Workbench implements IPartService {
this
.
keybindingService
=
this
.
instantiationService
.
getInstance
(
IKeybindingService
);
this
.
contextService
=
this
.
instantiationService
.
getInstance
(
IWorkbenchWorkspaceContextService
);
this
.
telemetryService
=
this
.
instantiationService
.
getInstance
(
ITelemetryService
);
let
configurationService
=
this
.
instantiationService
.
getInstance
(
IConfigurationService
);
let
messageService
=
this
.
instantiationService
.
getInstance
(
IMessageService
);
if
(
this
.
keybindingService
instanceof
AbstractKeybindingService
)
{
(
<
AbstractKeybindingService
><
any
>
this
.
keybindingService
).
setMessageService
(
messageService
);
...
...
@@ -341,7 +339,6 @@ export class Workbench implements IPartService {
messageService
,
this
.
telemetryService
,
this
.
contextService
,
configurationService
,
this
.
keybindingService
);
this
.
toDispose
.
push
(
this
.
quickOpen
);
...
...
src/vs/workbench/parts/quickopen/browser/commandsHandler.ts
浏览文件 @
92839a05
...
...
@@ -190,8 +190,7 @@ export class CommandsHandler extends QuickOpenHandler {
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IMessageService
private
messageService
:
IMessageService
,
@
IKeybindingService
private
keybindingService
:
IKeybindingService
,
@
IActionsService
private
actionsService
:
IActionsService
,
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
@
IActionsService
private
actionsService
:
IActionsService
)
{
super
();
}
...
...
src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts
浏览文件 @
92839a05
...
...
@@ -386,8 +386,7 @@ export class GotoSymbolHandler extends QuickOpenHandler {
constructor
(
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
)
{
super
();
...
...
src/vs/workbench/parts/search/browser/openAnythingHandler.ts
浏览文件 @
92839a05
...
...
@@ -23,7 +23,6 @@ import {OpenSymbolHandler as _OpenSymbolHandler} from 'vs/workbench/parts/search
import
{
IMessageService
,
Severity
}
from
'
vs/platform/message/common/message
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IWorkspaceContextService
}
from
'
vs/workbench/services/workspace/common/contextService
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/browser/quickOpenService
'
;
import
{
ISearchConfiguration
}
from
'
vs/platform/search/common/search
'
;
import
{
IConfigurationService
,
IConfigurationServiceEvent
,
ConfigurationServiceEventTypes
}
from
'
vs/platform/configuration/common/configuration
'
;
...
...
@@ -52,7 +51,6 @@ export class OpenAnythingHandler extends QuickOpenHandler {
@
IMessageService
private
messageService
:
IMessageService
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
)
{
super
();
...
...
src/vs/workbench/parts/search/browser/openFileHandler.ts
浏览文件 @
92839a05
...
...
@@ -25,7 +25,6 @@ import {IInstantiationService} from 'vs/platform/instantiation/common/instantiat
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
{
IQueryOptions
,
ISearchService
,
ISearchComplete
,
ISearchProgressItem
}
from
'
vs/platform/search/common/search
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/browser/quickOpenService
'
;
export
class
FileEntry
extends
EditorQuickOpenEntry
{
private
name
:
string
;
...
...
@@ -99,8 +98,7 @@ export class OpenFileHandler extends QuickOpenHandler {
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
ITextFileService
private
textFileService
:
ITextFileService
,
@
ISearchService
private
searchService
:
ISearchService
,
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
@
ISearchService
private
searchService
:
ISearchService
)
{
super
();
...
...
src/vs/workbench/test/browser/parts/quickOpen/quickopen.test.ts
浏览文件 @
92839a05
...
...
@@ -40,7 +40,7 @@ suite('Workbench QuickOpen', () => {
let
contextService
=
new
TestContextService
();
let
inst
=
create
({});
let
model
=
new
EditorHistoryModel
(
editorService
,
null
,
contextService
,
new
TestQuickOpenService
()
);
let
model
=
new
EditorHistoryModel
(
editorService
,
null
,
contextService
);
let
input1
=
inst
.
createInstance
(
StringEditorInput
,
"
name1
"
,
'
description
'
,
"
value1
"
,
"
text/plain
"
,
false
);
let
entry1
=
new
EditorHistoryEntry
(
editorService
,
contextService
,
input1
,
null
,
null
,
model
);
...
...
@@ -78,7 +78,7 @@ suite('Workbench QuickOpen', () => {
let
contextService
=
new
TestContextService
();
let
inst
=
create
({});
let
model
=
new
EditorHistoryModel
(
editorService
,
null
,
contextService
,
new
TestQuickOpenService
()
);
let
model
=
new
EditorHistoryModel
(
editorService
,
null
,
contextService
);
let
input1
=
inst
.
createInstance
(
StringEditorInput
,
"
name1
"
,
'
description
'
,
"
value1
"
,
"
text/plain
"
,
false
);
...
...
@@ -96,11 +96,10 @@ suite('Workbench QuickOpen', () => {
let
editorService
=
new
TestEditorService
();
let
contextService
=
new
TestContextService
();
let
quickOpenService
=
new
TestQuickOpenService
();
let
inst
=
create
({
editorService
:
editorService
});
let
model
=
new
EditorHistoryModel
(
editorService
,
inst
,
contextService
,
quickOpenService
);
let
model
=
new
EditorHistoryModel
(
editorService
,
inst
,
contextService
);
let
input1
=
inst
.
createInstance
(
StringEditorInput
,
"
name1
"
,
'
description
'
,
"
value1
"
,
"
text/plain
"
,
false
);
let
input2
=
inst
.
createInstance
(
StringEditorInput
,
"
name2
"
,
'
description
'
,
"
value2
"
,
"
text/plain
"
,
false
);
...
...
@@ -135,14 +134,14 @@ suite('Workbench QuickOpen', () => {
model
.
saveTo
(
memento
);
assert
(
!
isEmptyObject
(
memento
));
model
=
new
EditorHistoryModel
(
editorService
,
inst
,
contextService
,
quickOpenService
);
model
=
new
EditorHistoryModel
(
editorService
,
inst
,
contextService
);
model
.
loadFrom
(
memento
);
assert
.
equal
(
2
,
model
.
getEntries
().
length
);
assert
(
model
.
getEntries
()[
0
].
matches
(
saveInput2
));
assert
(
model
.
getEntries
()[
1
].
matches
(
saveInput1
));
model
=
new
EditorHistoryModel
(
editorService
,
inst
,
contextService
,
quickOpenService
);
model
=
new
EditorHistoryModel
(
editorService
,
inst
,
contextService
);
let
cinput1
=
<
EditorInput
>
inst
.
createInstance
(
fileInputCtor
,
toResource
(
"
Hello World
"
),
"
text/plain
"
,
void
0
);
let
cinput2
=
<
EditorInput
>
inst
.
createInstance
(
fileInputCtor
,
toResource
(
"
Yes World
"
),
"
text/plain
"
,
void
0
);
...
...
@@ -158,7 +157,7 @@ suite('Workbench QuickOpen', () => {
assert
.
equal
(
1
,
model
.
getResults
(
"
*
"
)[
0
].
getHighlights
()[
0
].
length
);
model
=
new
EditorHistoryModel
(
editorService
,
inst
,
contextService
,
quickOpenService
);
model
=
new
EditorHistoryModel
(
editorService
,
inst
,
contextService
);
let
cinput4
=
<
EditorInput
>
inst
.
createInstance
(
fileInputCtor
,
toResource
(
"
foo.ts
"
),
"
text/plain
"
,
void
0
);
let
cinput5
=
<
EditorInput
>
inst
.
createInstance
(
fileInputCtor
,
toResource
(
"
bar.js
"
),
"
text/plain
"
,
void
0
);
...
...
@@ -217,7 +216,6 @@ suite('Workbench QuickOpen', () => {
null
,
null
,
contextService
,
new
TestConfigurationService
(),
new
TestKeybindingService
()
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录