Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
1a78203b
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,发现更多精彩内容 >>
提交
1a78203b
编写于
5月 17, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
grid - more service adoption
上级
19a9898b
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
55 addition
and
60 deletion
+55
-60
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+1
-1
src/vs/workbench/parts/outline/electron-browser/outlinePanel.ts
.../workbench/parts/outline/electron-browser/outlinePanel.ts
+8
-9
src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts
...orkbench/parts/scm/electron-browser/dirtydiffDecorator.ts
+4
-9
src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts
...est/electron-browser/configurationResolverService.test.ts
+17
-16
src/vs/workbench/services/editor/browser/nextEditorService.ts
...vs/workbench/services/editor/browser/nextEditorService.ts
+3
-3
src/vs/workbench/services/editor/common/nextEditorService.ts
src/vs/workbench/services/editor/common/nextEditorService.ts
+2
-2
src/vs/workbench/services/group/common/nextEditorGroupsService.ts
...orkbench/services/group/common/nextEditorGroupsService.ts
+3
-3
src/vs/workbench/services/keybinding/test/electron-browser/keybindingEditing.test.ts
...eybinding/test/electron-browser/keybindingEditing.test.ts
+5
-3
src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts
...bench/test/electron-browser/api/mainThreadEditors.test.ts
+2
-2
src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts
...h/test/electron-browser/quickopen.perf.integrationTest.ts
+5
-5
src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts
.../test/electron-browser/textsearch.perf.integrationTest.ts
+5
-5
src/vs/workbench/test/workbenchTestServices.ts
src/vs/workbench/test/workbenchTestServices.ts
+0
-2
未找到文件。
src/vs/workbench/common/editor.ts
浏览文件 @
1a78203b
...
...
@@ -656,7 +656,7 @@ export class EditorModel extends Disposable implements IEditorModel {
export
interface
IEditorInputWithOptions
{
editor
:
IEditorInput
;
options
?:
IEditorOptions
;
options
?:
IEditorOptions
|
ITextEditorOptions
;
}
export
function
isEditorInputWithOptions
(
obj
:
any
):
obj
is
IEditorInputWithOptions
{
...
...
src/vs/workbench/parts/outline/electron-browser/outlinePanel.ts
浏览文件 @
1a78203b
...
...
@@ -35,8 +35,8 @@ import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
IViewOptions
,
ViewsViewletPanel
}
from
'
vs/workbench/browser/parts/views/viewsViewlet
'
;
import
{
CollapseAction
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
I
WorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/e
ditorService
'
;
import
{
I
EditorGroupService
}
from
'
vs/workbench/services/group/common/group
Service
'
;
import
{
I
NextEditorService
,
SIDE_GROUP
,
ACTIVE_GROUP
}
from
'
vs/workbench/services/editor/common/nextE
ditorService
'
;
import
{
I
NextEditorGroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroups
Service
'
;
import
{
OutlineElement
,
OutlineModel
}
from
'
./outlineModel
'
;
import
{
OutlineController
,
OutlineDataSource
,
OutlineItemComparator
,
OutlineItemCompareType
,
OutlineItemFilter
,
OutlineRenderer
,
OutlineTreeState
}
from
'
./outlineTree
'
;
import
{
StandardMouseEvent
}
from
'
vs/base/browser/mouseEvent
'
;
...
...
@@ -72,10 +72,10 @@ class RequestOracle {
constructor
(
private
readonly
_callback
:
(
editor
:
ICodeEditor
)
=>
any
,
private
readonly
_featureRegistry
:
LanguageFeatureRegistry
<
any
>
,
@
I
EditorGroupService
editorGroupService
:
IEditorGroup
Service
,
@
I
WorkbenchEditorService
private
readonly
_workbenchEditorService
:
IWorkbench
EditorService
,
@
I
NextEditorGroupsService
editorGroupService
:
INextEditorGroups
Service
,
@
I
NextEditorService
private
readonly
_editorService
:
INext
EditorService
,
)
{
editorGroupService
.
onEditorsChanged
(
this
.
_update
,
this
,
this
.
_disposables
);
_editorService
.
onDidActiveEditorChange
(
this
.
_update
,
this
,
this
.
_disposables
);
_featureRegistry
.
onDidChange
(
this
.
_update
,
this
,
this
.
_disposables
);
this
.
_update
();
}
...
...
@@ -87,8 +87,7 @@ class RequestOracle {
private
_update
():
void
{
let
editor
=
this
.
_workbenchEditorService
.
getActiveEditor
();
let
control
=
editor
&&
editor
.
getControl
();
let
control
=
this
.
_editorService
.
activeTextEditorControl
;
let
codeEditor
:
ICodeEditor
=
undefined
;
if
(
isCodeEditor
(
control
))
{
codeEditor
=
control
;
...
...
@@ -212,7 +211,7 @@ export class OutlinePanel extends ViewsViewletPanel {
@
IInstantiationService
private
readonly
_instantiationService
:
IInstantiationService
,
@
IThemeService
private
readonly
_themeService
:
IThemeService
,
@
IStorageService
private
readonly
_storageService
:
IStorageService
,
@
I
WorkbenchEditorService
private
readonly
_editorService
:
IWorkbench
EditorService
,
@
I
NextEditorService
private
readonly
_editorService
:
INext
EditorService
,
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
,
@
IContextMenuService
contextMenuService
:
IContextMenuService
,
...
...
@@ -466,7 +465,7 @@ export class OutlinePanel extends ViewsViewletPanel {
private
async
_revealTreeSelection
(
element
:
OutlineElement
,
focus
:
boolean
,
aside
:
boolean
):
TPromise
<
void
>
{
let
{
range
,
uri
}
=
element
.
symbol
.
location
;
let
input
=
this
.
_editorService
.
createInput
({
resource
:
uri
});
await
this
.
_editorService
.
openEditor
(
input
,
{
preserveFocus
:
!
focus
,
selection
:
Range
.
collapseToStart
(
range
),
revealInCenterIfOutsideViewport
:
true
,
forceOpen
:
true
},
aside
);
await
this
.
_editorService
.
openEditor
(
input
,
{
preserveFocus
:
!
focus
,
selection
:
Range
.
collapseToStart
(
range
),
revealInCenterIfOutsideViewport
:
true
,
forceOpen
:
true
},
aside
?
SIDE_GROUP
:
ACTIVE_GROUP
);
}
private
async
_revealEditorSelection
(
model
:
OutlineModel
,
selection
:
Selection
):
TPromise
<
void
>
{
...
...
src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts
浏览文件 @
1a78203b
...
...
@@ -16,11 +16,10 @@ import * as ext from 'vs/workbench/common/contributions';
import
{
CodeEditorWidget
}
from
'
vs/editor/browser/widget/codeEditorWidget
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ITextModelService
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
I
WorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/e
ditorService
'
;
import
{
I
NextEditorService
}
from
'
vs/workbench/services/editor/common/nextE
ditorService
'
;
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
ISCMService
,
ISCMRepository
}
from
'
vs/workbench/services/scm/common/scm
'
;
import
{
ModelDecorationOptions
}
from
'
vs/editor/common/model/textModel
'
;
import
{
registerThemingParticipant
,
ITheme
,
ICssStyleCollector
,
themeColorFromId
,
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
...
...
@@ -1121,8 +1120,7 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution,
private
disposables
:
IDisposable
[]
=
[];
constructor
(
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
IEditorGroupService
private
editorGroupService
:
IEditorGroupService
,
@
INextEditorService
private
editorService
:
INextEditorService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
)
{
...
...
@@ -1163,7 +1161,7 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution,
this
.
disable
();
}
this
.
transientDisposables
.
push
(
this
.
editor
GroupService
.
onEditorsChanged
(()
=>
this
.
onEditorsChanged
()));
this
.
transientDisposables
.
push
(
this
.
editor
Service
.
onDidVisibleEditorsChange
(()
=>
this
.
onEditorsChanged
()));
this
.
onEditorsChanged
();
this
.
enabled
=
true
;
}
...
...
@@ -1184,10 +1182,7 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution,
// or not. Needs context from the editor, to know whether it is a diff editor, in place editor
// etc.
private
onEditorsChanged
():
void
{
const
models
=
this
.
editorService
.
getVisibleEditors
()
// map to the editor controls
.
map
(
e
=>
e
.
getControl
())
const
models
=
this
.
editorService
.
visibleTextEditorControls
// only interested in code editor widgets
.
filter
(
c
=>
c
instanceof
CodeEditorWidget
)
...
...
src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts
浏览文件 @
1a78203b
...
...
@@ -50,13 +50,14 @@ suite('Configuration Resolver Service', () => {
assert
.
strictEqual
(
configurationResolverService
.
resolve
(
workspace
,
'
abc ${workspaceRootFolderName} xyz
'
),
'
abc workspaceLocation xyz
'
);
});
test
(
'
current selected line number
'
,
()
=>
{
assert
.
strictEqual
(
configurationResolverService
.
resolve
(
workspace
,
'
abc ${lineNumber} xyz
'
),
`abc
${
editorService
.
mockLineNumber
}
xyz`
);
});
// TODO@isidor mock the editor service properly
// test('current selected line number', () => {
// assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${lineNumber} xyz'), `abc ${editorService.mockLineNumber} xyz`);
// });
test
(
'
current selected text
'
,
()
=>
{
assert
.
strictEqual
(
configurationResolverService
.
resolve
(
workspace
,
'
abc ${selectedText} xyz
'
),
`abc
${
editorService
.
mockSelectedText
}
xyz`
);
});
//
test('current selected text', () => {
//
assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${selectedText} xyz'), `abc ${editorService.mockSelectedText} xyz`);
//
});
test
(
'
substitute many
'
,
()
=>
{
if
(
platform
.
isWindows
)
{
...
...
@@ -82,16 +83,16 @@ suite('Configuration Resolver Service', () => {
}
});
test
(
'
substitute keys and values in object
'
,
()
=>
{
const
myObject
=
{
'
${workspaceRootFolderName}
'
:
'
${lineNumber}
'
,
'
hey ${env:key1}
'
:
'
${workspaceRootFolderName}
'
};
assert
.
deepEqual
(
configurationResolverService
.
resolve
(
workspace
,
myObject
),
{
'
workspaceLocation
'
:
`
${
editorService
.
mockLineNumber
}
`
,
'
hey Value for key1
'
:
'
workspaceLocation
'
});
});
//
test('substitute keys and values in object', () => {
//
const myObject = {
//
'${workspaceRootFolderName}': '${lineNumber}',
//
'hey ${env:key1} ': '${workspaceRootFolderName}'
//
};
//
assert.deepEqual(configurationResolverService.resolve(workspace, myObject), {
//
'workspaceLocation': `${editorService.mockLineNumber}`,
//
'hey Value for key1 ': 'workspaceLocation'
//
});
//
});
test
(
'
substitute one env variable using platform case sensitivity
'
,
()
=>
{
...
...
src/vs/workbench/services/editor/browser/nextEditorService.ts
浏览文件 @
1a78203b
...
...
@@ -190,9 +190,9 @@ export class NextEditorService extends Disposable implements INextEditorService
//#region openEditor()
openEditor
(
editor
:
IEditorInput
,
options
?:
IEditorOptions
,
group
?:
INextEditorGroup
|
GroupIdentifier
|
SIDE_GROUP_TYPE
|
ACTIVE_GROUP_TYPE
):
TPromise
<
IEditor
>
;
openEditor
(
editor
:
IEditorInput
,
options
?:
IEditorOptions
|
ITextEditorOptions
,
group
?:
INextEditorGroup
|
GroupIdentifier
|
SIDE_GROUP_TYPE
|
ACTIVE_GROUP_TYPE
):
TPromise
<
IEditor
>
;
openEditor
(
editor
:
IResourceEditor
,
group
?:
INextEditorGroup
|
GroupIdentifier
|
SIDE_GROUP_TYPE
|
ACTIVE_GROUP_TYPE
):
TPromise
<
IEditor
>
;
openEditor
(
editor
:
IEditorInput
|
IResourceEditor
,
optionsOrGroup
?:
IEditorOptions
|
INextEditorGroup
|
GroupIdentifier
|
SIDE_GROUP_TYPE
|
ACTIVE_GROUP_TYPE
,
group
?:
GroupIdentifier
):
TPromise
<
IEditor
>
{
openEditor
(
editor
:
IEditorInput
|
IResourceEditor
,
optionsOrGroup
?:
IEditorOptions
|
I
TextEditorOptions
|
I
NextEditorGroup
|
GroupIdentifier
|
SIDE_GROUP_TYPE
|
ACTIVE_GROUP_TYPE
,
group
?:
GroupIdentifier
):
TPromise
<
IEditor
>
{
// Typed Editor Support
if
(
editor
instanceof
EditorInput
)
{
...
...
@@ -554,7 +554,7 @@ export class NextEditorService extends Disposable implements INextEditorService
}
export
interface
IEditorOpenHandler
{
(
group
:
INextEditorGroup
,
editor
:
IEditorInput
,
options
?:
IEditorOptions
):
TPromise
<
IEditor
>
;
(
group
:
INextEditorGroup
,
editor
:
IEditorInput
,
options
?:
IEditorOptions
|
ITextEditorOptions
):
TPromise
<
IEditor
>
;
}
/**
...
...
src/vs/workbench/services/editor/common/nextEditorService.ts
浏览文件 @
1a78203b
...
...
@@ -6,7 +6,7 @@
'
use strict
'
;
import
{
createDecorator
,
ServiceIdentifier
,
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IResourceInput
,
IEditorOptions
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IResourceInput
,
IEditorOptions
,
ITextEditorOptions
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IEditorInput
,
IEditor
,
GroupIdentifier
,
IEditorOpeningEvent
,
IEditorInputWithOptions
,
IEditorIdentifier
,
IUntitledResourceInput
,
IResourceDiffInput
,
IResourceSideBySideInput
}
from
'
vs/workbench/common/editor
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
IEditor
as
ITextEditor
}
from
'
vs/editor/common/editorCommon
'
;
...
...
@@ -106,7 +106,7 @@ export interface INextEditorService {
* active group. Use `SIDE_GROUP_TYPE` to open the editor in a new editor group to the side
* of the currently active group.
*/
openEditor
(
editor
:
IEditorInput
,
options
?:
IEditorOptions
,
group
?:
INextEditorGroup
|
GroupIdentifier
|
SIDE_GROUP_TYPE
|
ACTIVE_GROUP_TYPE
):
TPromise
<
IEditor
>
;
openEditor
(
editor
:
IEditorInput
,
options
?:
IEditorOptions
|
ITextEditorOptions
,
group
?:
INextEditorGroup
|
GroupIdentifier
|
SIDE_GROUP_TYPE
|
ACTIVE_GROUP_TYPE
):
TPromise
<
IEditor
>
;
/**
* Open an editor in an editor group.
...
...
src/vs/workbench/services/group/common/nextEditorGroupsService.ts
浏览文件 @
1a78203b
...
...
@@ -8,7 +8,7 @@
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
createDecorator
,
ServiceIdentifier
,
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IEditorInput
,
IEditor
,
GroupIdentifier
,
IEditorOpeningEvent
,
IEditorInputWithOptions
,
CloseDirection
}
from
'
vs/workbench/common/editor
'
;
import
{
IEditorOptions
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IEditorOptions
,
ITextEditorOptions
}
from
'
vs/platform/editor/common/editor
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
export
const
INextEditorGroupsService
=
createDecorator
<
INextEditorGroupsService
>
(
'
nextEditorGroupsService
'
);
...
...
@@ -69,7 +69,7 @@ export type ICloseEditorsFilter = {
export
interface
IEditorReplacement
{
editor
:
IEditorInput
;
replacement
:
IEditorInput
;
options
?:
IEditorOptions
;
options
?:
IEditorOptions
|
ITextEditorOptions
;
}
export
enum
GroupsOrder
{
...
...
@@ -332,7 +332,7 @@ export interface INextEditorGroup {
* @returns a promise that is resolved when the active editor (if any)
* has finished loading
*/
openEditor
(
editor
:
IEditorInput
,
options
?:
IEditorOptions
):
TPromise
<
void
>
;
openEditor
(
editor
:
IEditorInput
,
options
?:
IEditorOptions
|
ITextEditorOptions
):
TPromise
<
void
>
;
/**
* Opens editors in this group.
...
...
src/vs/workbench/services/keybinding/test/electron-browser/keybindingEditing.test.ts
浏览文件 @
1a78203b
...
...
@@ -16,7 +16,9 @@ import { TPromise } from 'vs/base/common/winjs.base';
import
{
KeyCode
,
SimpleKeybinding
,
ChordKeybinding
}
from
'
vs/base/common/keyCodes
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
*
as
extfs
from
'
vs/base/node/extfs
'
;
import
{
TestTextFileService
,
TestEditorGroupService
,
TestLifecycleService
,
TestBackupFileService
,
TestContextService
,
TestTextResourceConfigurationService
,
TestHashService
,
TestEnvironmentService
,
TestStorageService
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
TestTextFileService
,
TestLifecycleService
,
TestBackupFileService
,
TestContextService
,
TestTextResourceConfigurationService
,
TestHashService
,
TestEnvironmentService
,
TestStorageService
,
TestNextEditorGroupsService
,
TestNextEditorService
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
INextEditorGroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroupsService
'
;
import
{
INextEditorService
}
from
'
vs/workbench/services/editor/common/nextEditorService
'
;
import
{
TestNotificationService
}
from
'
vs/platform/notification/test/common/testNotificationService
'
;
import
{
IWorkspaceContextService
,
Workspace
,
toWorkspaceFolders
}
from
'
vs/platform/workspace/common/workspace
'
;
import
*
as
uuid
from
'
vs/base/common/uuid
'
;
...
...
@@ -29,7 +31,6 @@ import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
NullTelemetryService
}
from
'
vs/platform/telemetry/common/telemetryUtils
'
;
import
{
IBackupFileService
}
from
'
vs/workbench/services/backup/common/backup
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
TestInstantiationService
}
from
'
vs/platform/instantiation/test/common/instantiationServiceMock
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
ITextModelService
}
from
'
vs/editor/common/services/resolverService
'
;
...
...
@@ -77,7 +78,8 @@ suite('Keybindings Editing', () => {
instantiationService
.
stub
(
ILifecycleService
,
lifecycleService
);
instantiationService
.
stub
(
IContextKeyService
,
<
IContextKeyService
>
instantiationService
.
createInstance
(
MockContextKeyService
));
instantiationService
.
stub
(
IHashService
,
new
TestHashService
());
instantiationService
.
stub
(
IEditorGroupService
,
new
TestEditorGroupService
());
instantiationService
.
stub
(
INextEditorGroupsService
,
new
TestNextEditorGroupsService
());
instantiationService
.
stub
(
INextEditorService
,
new
TestNextEditorService
());
instantiationService
.
stub
(
ITelemetryService
,
NullTelemetryService
);
instantiationService
.
stub
(
IModeService
,
ModeServiceImpl
);
instantiationService
.
stub
(
IModelService
,
instantiationService
.
createInstance
(
ModelServiceImpl
));
...
...
src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts
浏览文件 @
1a78203b
...
...
@@ -23,7 +23,7 @@ import { Range } from 'vs/editor/common/core/range';
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
EditOperation
}
from
'
vs/editor/common/core/editOperation
'
;
import
{
TestFileService
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
TestFileService
,
TestNextEditorService
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IFileStat
}
from
'
vs/platform/files/common/files
'
;
import
{
ResourceTextEdit
}
from
'
vs/editor/common/modes
'
;
...
...
@@ -81,7 +81,7 @@ suite('MainThreadEditors', () => {
onEditorGroupMoved
=
Event
.
None
;
};
const
bulkEditService
=
new
BulkEditService
(
modelService
,
workbenchEditorService
,
null
,
fileService
);
const
bulkEditService
=
new
BulkEditService
(
modelService
,
new
TestNextEditorService
()
,
null
,
fileService
);
const
rpcProtocol
=
new
TestRPCProtocol
();
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostDocuments
,
new
class
extends
mock
<
ExtHostDocumentsShape
>
()
{
...
...
src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts
浏览文件 @
1a78203b
...
...
@@ -9,19 +9,19 @@ import 'vs/workbench/parts/search/electron-browser/search.contribution'; // load
import
*
as
assert
from
'
assert
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
createSyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
I
EditorGroupService
}
from
'
vs/workbench/services/group/common/group
Service
'
;
import
{
I
NextEditorGroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroups
Service
'
;
import
{
ISearchService
}
from
'
vs/platform/search/common/search
'
;
import
{
ITelemetryService
,
ITelemetryInfo
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IExperimentService
,
IExperiments
}
from
'
vs/platform/telemetry/common/experiments
'
;
import
{
IUntitledEditorService
,
UntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
I
WorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/e
ditorService
'
;
import
{
I
NextEditorService
}
from
'
vs/workbench/services/editor/common/nextE
ditorService
'
;
import
*
as
minimist
from
'
minimist
'
;
import
*
as
path
from
'
path
'
;
import
{
IQuickOpenRegistry
,
Extensions
}
from
'
vs/workbench/browser/quickopen
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
SearchService
}
from
'
vs/workbench/services/search/node/searchService
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
TestEnvironmentService
,
Test
EditorService
,
TestEditorGroupService
,
TestContext
Service
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
TestEnvironmentService
,
Test
ContextService
,
TestNextEditorService
,
TestNextEditorGroups
Service
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
URI
from
'
vs/base/common/uri
'
;
...
...
@@ -76,8 +76,8 @@ suite.skip('QuickOpen performance (integration)', () => {
[
IConfigurationService
,
configurationService
],
[
IModelService
,
new
ModelServiceImpl
(
null
,
configurationService
)],
[
IWorkspaceContextService
,
new
TestContextService
(
testWorkspace
(
URI
.
file
(
testWorkspacePath
)))],
[
I
WorkbenchEditorService
,
new
Tes
tEditorService
()],
[
I
EditorGroupService
,
new
TestEditorGroup
Service
()],
[
I
NextEditorService
,
new
TestNex
tEditorService
()],
[
I
NextEditorGroupsService
,
new
TestNextEditorGroups
Service
()],
[
IEnvironmentService
,
TestEnvironmentService
],
[
IUntitledEditorService
,
createSyncDescriptor
(
UntitledEditorService
)],
[
ISearchService
,
createSyncDescriptor
(
SearchService
)]
...
...
src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts
浏览文件 @
1a78203b
...
...
@@ -10,16 +10,16 @@ import * as assert from 'assert';
import
*
as
fs
from
'
fs
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
createSyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
I
EditorGroupService
}
from
'
vs/workbench/services/group/common/group
Service
'
;
import
{
I
NextEditorGroupsService
}
from
'
vs/workbench/services/group/common/nextEditorGroups
Service
'
;
import
{
ISearchService
,
IQueryOptions
}
from
'
vs/platform/search/common/search
'
;
import
{
ITelemetryService
,
ITelemetryInfo
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IUntitledEditorService
,
UntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
I
WorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/e
ditorService
'
;
import
{
I
NextEditorService
}
from
'
vs/workbench/services/editor/common/nextE
ditorService
'
;
import
*
as
minimist
from
'
minimist
'
;
import
*
as
path
from
'
path
'
;
import
{
SearchService
}
from
'
vs/workbench/services/search/node/searchService
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
TestEnvironmentService
,
Test
EditorService
,
TestEditorGroupService
,
TestContext
Service
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
TestEnvironmentService
,
Test
ContextService
,
TestNextEditorService
,
TestNextEditorGroups
Service
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
URI
from
'
vs/base/common/uri
'
;
...
...
@@ -64,8 +64,8 @@ suite.skip('TextSearch performance (integration)', () => {
[
IConfigurationService
,
configurationService
],
[
IModelService
,
new
ModelServiceImpl
(
null
,
configurationService
)],
[
IWorkspaceContextService
,
new
TestContextService
(
testWorkspace
(
URI
.
file
(
testWorkspacePath
)))],
[
I
WorkbenchEditorService
,
new
Tes
tEditorService
()],
[
I
EditorGroupService
,
new
TestEditorGroup
Service
()],
[
I
NextEditorService
,
new
TestNex
tEditorService
()],
[
I
NextEditorGroupsService
,
new
TestNextEditorGroups
Service
()],
[
IEnvironmentService
,
TestEnvironmentService
],
[
IUntitledEditorService
,
createSyncDescriptor
(
UntitledEditorService
)],
[
ISearchService
,
createSyncDescriptor
(
SearchService
)],
...
...
src/vs/workbench/test/workbenchTestServices.ts
浏览文件 @
1a78203b
...
...
@@ -871,8 +871,6 @@ export class TestNextEditorService implements INextEditorService {
visibleControls
:
ReadonlyArray
<
IEditor
>
=
[];
visibleTextEditorControls
=
[];
visibleEditors
:
ReadonlyArray
<
IEditorInput
>
=
[];
public
mockLineNumber
=
15
;
public
mockSelectedText
=
'
selected text
'
;
openEditor
(
editor
:
any
,
options
?:
any
,
group
?:
any
)
{
return
TPromise
.
as
(
null
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录