Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fef9498f
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,发现更多精彩内容 >>
未验证
提交
fef9498f
编写于
2月 06, 2020
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master' into pr/LadyCailin/77762
上级
82838194
eec46fcf
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
49 addition
and
47 deletion
+49
-47
src/vs/editor/test/common/model/textModelWithTokens.test.ts
src/vs/editor/test/common/model/textModelWithTokens.test.ts
+26
-25
src/vs/workbench/services/textfile/browser/textFileService.ts
...vs/workbench/services/textfile/browser/textFileService.ts
+9
-16
src/vs/workbench/services/textfile/electron-browser/nativeTextFileService.ts
...rvices/textfile/electron-browser/nativeTextFileService.ts
+4
-2
src/vs/workbench/test/browser/workbenchTestServices.ts
src/vs/workbench/test/browser/workbenchTestServices.ts
+5
-2
src/vs/workbench/test/electron-browser/workbenchTestServices.ts
.../workbench/test/electron-browser/workbenchTestServices.ts
+5
-2
未找到文件。
src/vs/editor/test/common/model/textModelWithTokens.test.ts
浏览文件 @
fef9498f
...
@@ -572,9 +572,10 @@ suite('TextModelWithTokens regression tests', () => {
...
@@ -572,9 +572,10 @@ suite('TextModelWithTokens regression tests', () => {
});
});
suite
(
'
TextModel.getLineIndentGuide
'
,
()
=>
{
suite
(
'
TextModel.getLineIndentGuide
'
,
()
=>
{
function
assertIndentGuides
(
lines
:
[
number
,
number
,
number
,
number
,
string
][]):
void
{
function
assertIndentGuides
(
lines
:
[
number
,
number
,
number
,
number
,
string
][]
,
tabSize
:
number
):
void
{
let
text
=
lines
.
map
(
l
=>
l
[
4
]).
join
(
'
\n
'
);
let
text
=
lines
.
map
(
l
=>
l
[
4
]).
join
(
'
\n
'
);
let
model
=
TextModel
.
createFromString
(
text
);
let
model
=
TextModel
.
createFromString
(
text
);
model
.
updateOptions
({
tabSize
:
tabSize
});
let
actualIndents
=
model
.
getLinesIndentGuides
(
1
,
model
.
getLineCount
());
let
actualIndents
=
model
.
getLinesIndentGuides
(
1
,
model
.
getLineCount
());
...
@@ -589,13 +590,13 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -589,13 +590,13 @@ suite('TextModel.getLineIndentGuide', () => {
model
.
dispose
();
model
.
dispose
();
}
}
test
(
'
getLineIndentGuide one level
'
,
()
=>
{
test
(
'
getLineIndentGuide one level
2
'
,
()
=>
{
assertIndentGuides
([
assertIndentGuides
([
[
0
,
1
,
1
,
0
,
'
A
'
],
[
0
,
1
,
1
,
0
,
'
A
'
],
[
1
,
2
,
4
,
1
,
'
A
'
],
[
1
,
2
,
4
,
1
,
'
A
'
],
[
1
,
2
,
4
,
1
,
'
A
'
],
[
1
,
2
,
4
,
1
,
'
A
'
],
[
1
,
2
,
4
,
1
,
'
A
'
],
[
1
,
2
,
4
,
1
,
'
A
'
],
]);
]
,
2
);
});
});
test
(
'
getLineIndentGuide two levels
'
,
()
=>
{
test
(
'
getLineIndentGuide two levels
'
,
()
=>
{
...
@@ -603,45 +604,45 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -603,45 +604,45 @@ suite('TextModel.getLineIndentGuide', () => {
[
0
,
1
,
1
,
0
,
'
A
'
],
[
0
,
1
,
1
,
0
,
'
A
'
],
[
1
,
2
,
5
,
1
,
'
A
'
],
[
1
,
2
,
5
,
1
,
'
A
'
],
[
1
,
2
,
5
,
1
,
'
A
'
],
[
1
,
2
,
5
,
1
,
'
A
'
],
[
1
,
2
,
5
,
1
,
'
A
'
],
[
2
,
4
,
5
,
2
,
'
A
'
],
[
1
,
2
,
5
,
1
,
'
A
'
],
[
2
,
4
,
5
,
2
,
'
A
'
],
]);
]
,
2
);
});
});
test
(
'
getLineIndentGuide three levels
'
,
()
=>
{
test
(
'
getLineIndentGuide three levels
'
,
()
=>
{
assertIndentGuides
([
assertIndentGuides
([
[
0
,
1
,
1
,
0
,
'
A
'
],
[
0
,
1
,
1
,
0
,
'
A
'
],
[
1
,
2
,
4
,
1
,
'
A
'
],
[
1
,
2
,
4
,
1
,
'
A
'
],
[
1
,
2
,
4
,
1
,
'
A
'
],
[
2
,
3
,
4
,
2
,
'
A
'
],
[
2
,
4
,
4
,
2
,
'
A
'
],
[
3
,
4
,
4
,
3
,
'
A
'
],
[
0
,
5
,
5
,
0
,
'
A
'
],
[
0
,
5
,
5
,
0
,
'
A
'
],
]);
]
,
2
);
});
});
test
(
'
getLineIndentGuide decreasing indent
'
,
()
=>
{
test
(
'
getLineIndentGuide decreasing indent
'
,
()
=>
{
assertIndentGuides
([
assertIndentGuides
([
[
1
,
1
,
2
,
1
,
'
A
'
],
[
2
,
1
,
1
,
2
,
'
A
'
],
[
1
,
1
,
2
,
1
,
'
A
'
],
[
1
,
1
,
2
,
1
,
'
A
'
],
[
0
,
3
,
3
,
0
,
'
A
'
],
[
0
,
3
,
3
,
0
,
'
A
'
],
]);
]
,
2
);
});
});
test
(
'
getLineIndentGuide Java
'
,
()
=>
{
test
(
'
getLineIndentGuide Java
'
,
()
=>
{
assertIndentGuides
([
assertIndentGuides
([
/* 1*/
[
0
,
1
,
1
,
0
,
'
class A {
'
],
/* 1*/
[
0
,
1
,
1
,
0
,
'
class A {
'
],
/* 2*/
[
1
,
2
,
9
,
1
,
'
void foo() {
'
],
/* 2*/
[
1
,
2
,
9
,
1
,
'
void foo() {
'
],
/* 3*/
[
1
,
2
,
9
,
1
,
'
console.log(1);
'
],
/* 3*/
[
2
,
3
,
4
,
2
,
'
console.log(1);
'
],
/* 4*/
[
1
,
2
,
9
,
1
,
'
console.log(2);
'
],
/* 4*/
[
2
,
3
,
4
,
2
,
'
console.log(2);
'
],
/* 5*/
[
1
,
2
,
9
,
1
,
'
}
'
],
/* 5*/
[
1
,
2
,
9
,
1
,
'
}
'
],
/* 6*/
[
1
,
2
,
9
,
1
,
''
],
/* 6*/
[
1
,
2
,
9
,
1
,
''
],
/* 7*/
[
1
,
2
,
9
,
1
,
'
void bar() {
'
],
/* 7*/
[
1
,
2
,
9
,
1
,
'
void bar() {
'
],
/* 8*/
[
1
,
2
,
9
,
1
,
'
console.log(3);
'
],
/* 8*/
[
2
,
8
,
8
,
2
,
'
console.log(3);
'
],
/* 9*/
[
1
,
2
,
9
,
1
,
'
}
'
],
/* 9*/
[
1
,
2
,
9
,
1
,
'
}
'
],
/*10*/
[
0
,
10
,
10
,
0
,
'
}
'
],
/*10*/
[
0
,
10
,
10
,
0
,
'
}
'
],
/*11*/
[
0
,
11
,
11
,
0
,
'
interface B {
'
],
/*11*/
[
0
,
11
,
11
,
0
,
'
interface B {
'
],
/*12*/
[
1
,
12
,
12
,
1
,
'
void bar();
'
],
/*12*/
[
1
,
12
,
12
,
1
,
'
void bar();
'
],
/*13*/
[
0
,
13
,
13
,
0
,
'
}
'
],
/*13*/
[
0
,
13
,
13
,
0
,
'
}
'
],
]);
]
,
2
);
});
});
test
(
'
getLineIndentGuide Javadoc
'
,
()
=>
{
test
(
'
getLineIndentGuide Javadoc
'
,
()
=>
{
...
@@ -653,7 +654,7 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -653,7 +654,7 @@ suite('TextModel.getLineIndentGuide', () => {
[
1
,
5
,
6
,
1
,
'
void foo() {
'
],
[
1
,
5
,
6
,
1
,
'
void foo() {
'
],
[
1
,
5
,
6
,
1
,
'
}
'
],
[
1
,
5
,
6
,
1
,
'
}
'
],
[
0
,
7
,
7
,
0
,
'
}
'
],
[
0
,
7
,
7
,
0
,
'
}
'
],
]);
]
,
2
);
});
});
test
(
'
getLineIndentGuide Whitespace
'
,
()
=>
{
test
(
'
getLineIndentGuide Whitespace
'
,
()
=>
{
...
@@ -661,12 +662,12 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -661,12 +662,12 @@ suite('TextModel.getLineIndentGuide', () => {
[
0
,
1
,
1
,
0
,
'
class A {
'
],
[
0
,
1
,
1
,
0
,
'
class A {
'
],
[
1
,
2
,
7
,
1
,
''
],
[
1
,
2
,
7
,
1
,
''
],
[
1
,
2
,
7
,
1
,
'
void foo() {
'
],
[
1
,
2
,
7
,
1
,
'
void foo() {
'
],
[
1
,
2
,
7
,
1
,
'
'
],
[
2
,
4
,
5
,
2
,
'
'
],
[
2
,
5
,
5
,
2
,
'
return 1;
'
],
[
3
,
5
,
5
,
3
,
'
return 1;
'
],
[
1
,
2
,
7
,
1
,
'
}
'
],
[
1
,
2
,
7
,
1
,
'
}
'
],
[
1
,
2
,
7
,
1
,
'
'
],
[
1
,
2
,
7
,
1
,
'
'
],
[
0
,
8
,
8
,
0
,
'
}
'
]
[
0
,
8
,
8
,
0
,
'
}
'
]
]);
]
,
2
);
});
});
test
(
'
getLineIndentGuide Tabs
'
,
()
=>
{
test
(
'
getLineIndentGuide Tabs
'
,
()
=>
{
...
@@ -679,7 +680,7 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -679,7 +680,7 @@ suite('TextModel.getLineIndentGuide', () => {
[
1
,
2
,
7
,
1
,
'
\t
}
'
],
[
1
,
2
,
7
,
1
,
'
\t
}
'
],
[
1
,
2
,
7
,
1
,
'
'
],
[
1
,
2
,
7
,
1
,
'
'
],
[
0
,
8
,
8
,
0
,
'
}
'
]
[
0
,
8
,
8
,
0
,
'
}
'
]
]);
]
,
4
);
});
});
test
(
'
getLineIndentGuide checker.ts
'
,
()
=>
{
test
(
'
getLineIndentGuide checker.ts
'
,
()
=>
{
...
@@ -701,7 +702,7 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -701,7 +702,7 @@ suite('TextModel.getLineIndentGuide', () => {
/*15*/
[
2
,
11
,
15
,
2
,
'
return node.id;
'
],
/*15*/
[
2
,
11
,
15
,
2
,
'
return node.id;
'
],
/*16*/
[
1
,
5
,
16
,
1
,
'
}
'
],
/*16*/
[
1
,
5
,
16
,
1
,
'
}
'
],
/*17*/
[
0
,
17
,
17
,
0
,
'
}
'
]
/*17*/
[
0
,
17
,
17
,
0
,
'
}
'
]
]);
]
,
4
);
});
});
test
(
'
issue #8425 - Missing indentation lines for first level indentation
'
,
()
=>
{
test
(
'
issue #8425 - Missing indentation lines for first level indentation
'
,
()
=>
{
...
@@ -710,7 +711,7 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -710,7 +711,7 @@ suite('TextModel.getLineIndentGuide', () => {
[
2
,
2
,
3
,
2
,
'
\t\t
indent2
'
],
[
2
,
2
,
3
,
2
,
'
\t\t
indent2
'
],
[
2
,
2
,
3
,
2
,
'
\t\t
indent2
'
],
[
2
,
2
,
3
,
2
,
'
\t\t
indent2
'
],
[
1
,
1
,
4
,
1
,
'
\t
indent1
'
]
[
1
,
1
,
4
,
1
,
'
\t
indent1
'
]
]);
]
,
4
);
});
});
test
(
'
issue #8952 - Indentation guide lines going through text on .yml file
'
,
()
=>
{
test
(
'
issue #8952 - Indentation guide lines going through text on .yml file
'
,
()
=>
{
...
@@ -721,7 +722,7 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -721,7 +722,7 @@ suite('TextModel.getLineIndentGuide', () => {
[
2
,
3
,
5
,
2
,
'
- length:
'
],
[
2
,
3
,
5
,
2
,
'
- length:
'
],
[
3
,
5
,
5
,
3
,
'
max: 255
'
],
[
3
,
5
,
5
,
3
,
'
max: 255
'
],
[
0
,
6
,
6
,
0
,
'
getters:
'
]
[
0
,
6
,
6
,
0
,
'
getters:
'
]
]);
]
,
4
);
});
});
test
(
'
issue #11892 - Indent guides look funny
'
,
()
=>
{
test
(
'
issue #11892 - Indent guides look funny
'
,
()
=>
{
...
@@ -734,7 +735,7 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -734,7 +735,7 @@ suite('TextModel.getLineIndentGuide', () => {
[
3
,
6
,
6
,
3
,
'
\t\t\t
return 2;
'
],
[
3
,
6
,
6
,
3
,
'
\t\t\t
return 2;
'
],
[
1
,
2
,
7
,
1
,
'
\t
}
'
],
[
1
,
2
,
7
,
1
,
'
\t
}
'
],
[
0
,
8
,
8
,
0
,
'
}
'
]
[
0
,
8
,
8
,
0
,
'
}
'
]
]);
]
,
4
);
});
});
test
(
'
issue #12398 - Problem in indent guidelines
'
,
()
=>
{
test
(
'
issue #12398 - Problem in indent guidelines
'
,
()
=>
{
...
@@ -742,7 +743,7 @@ suite('TextModel.getLineIndentGuide', () => {
...
@@ -742,7 +743,7 @@ suite('TextModel.getLineIndentGuide', () => {
[
2
,
1
,
2
,
2
,
'
\t\t
.bla
'
],
[
2
,
1
,
2
,
2
,
'
\t\t
.bla
'
],
[
3
,
2
,
2
,
3
,
'
\t\t\t
label(for)
'
],
[
3
,
2
,
2
,
3
,
'
\t\t\t
label(for)
'
],
[
0
,
3
,
3
,
0
,
'
include script
'
]
[
0
,
3
,
3
,
0
,
'
include script
'
]
]);
]
,
4
);
});
});
test
(
'
issue #49173
'
,
()
=>
{
test
(
'
issue #49173
'
,
()
=>
{
...
...
src/vs/workbench/services/textfile/browser/textFileService.ts
浏览文件 @
fef9498f
...
@@ -35,7 +35,7 @@ import { coalesce } from 'vs/base/common/arrays';
...
@@ -35,7 +35,7 @@ import { coalesce } from 'vs/base/common/arrays';
import
{
suggestFilename
}
from
'
vs/base/common/mime
'
;
import
{
suggestFilename
}
from
'
vs/base/common/mime
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
toErrorMessage
}
from
'
vs/base/common/errorMessage
'
;
import
{
toErrorMessage
}
from
'
vs/base/common/errorMessage
'
;
import
{
resolve
}
from
'
vs/base/common/path
'
;
import
{
IRemotePathService
}
from
'
vs/workbench/services/path/common/remotePathService
'
;
/**
/**
* The workbench file service implementation implements the raw file service spec and adds additional methods on top.
* The workbench file service implementation implements the raw file service spec and adds additional methods on top.
...
@@ -85,7 +85,8 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
...
@@ -85,7 +85,8 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
@
IFilesConfigurationService
protected
readonly
filesConfigurationService
:
IFilesConfigurationService
,
@
IFilesConfigurationService
protected
readonly
filesConfigurationService
:
IFilesConfigurationService
,
@
ITextModelService
private
readonly
textModelService
:
ITextModelService
,
@
ITextModelService
private
readonly
textModelService
:
ITextModelService
,
@
ICodeEditorService
private
readonly
codeEditorService
:
ICodeEditorService
,
@
ICodeEditorService
private
readonly
codeEditorService
:
ICodeEditorService
,
@
INotificationService
private
readonly
notificationService
:
INotificationService
@
INotificationService
private
readonly
notificationService
:
INotificationService
,
@
IRemotePathService
private
readonly
remotePathService
:
IRemotePathService
)
{
)
{
super
();
super
();
...
@@ -321,12 +322,12 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
...
@@ -321,12 +322,12 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
// Untitled with associated file path don't need to prompt
// Untitled with associated file path don't need to prompt
if
(
model
.
hasAssociatedFilePath
)
{
if
(
model
.
hasAssociatedFilePath
)
{
targetUri
=
this
.
suggestSavePath
(
resource
);
targetUri
=
await
this
.
suggestSavePath
(
resource
);
}
}
// Otherwise ask user
// Otherwise ask user
else
{
else
{
targetUri
=
await
this
.
fileDialogService
.
pickFileToSave
(
this
.
suggestSavePath
(
resource
),
options
?.
availableFileSystems
);
targetUri
=
await
this
.
fileDialogService
.
pickFileToSave
(
await
this
.
suggestSavePath
(
resource
),
options
?.
availableFileSystems
);
}
}
// Save as if target provided
// Save as if target provided
...
@@ -367,7 +368,7 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
...
@@ -367,7 +368,7 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
// Get to target resource
// Get to target resource
if
(
!
target
)
{
if
(
!
target
)
{
target
=
await
this
.
fileDialogService
.
pickFileToSave
(
this
.
suggestSavePath
(
source
),
options
?.
availableFileSystems
);
target
=
await
this
.
fileDialogService
.
pickFileToSave
(
await
this
.
suggestSavePath
(
source
),
options
?.
availableFileSystems
);
}
}
if
(
!
target
)
{
if
(
!
target
)
{
...
@@ -546,7 +547,7 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
...
@@ -546,7 +547,7 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
return
(
await
this
.
dialogService
.
confirm
(
confirm
)).
confirmed
;
return
(
await
this
.
dialogService
.
confirm
(
confirm
)).
confirmed
;
}
}
private
suggestSavePath
(
resource
:
URI
):
URI
{
private
async
suggestSavePath
(
resource
:
URI
):
Promise
<
URI
>
{
// Just take the resource as is if the file service can handle it
// Just take the resource as is if the file service can handle it
if
(
this
.
fileService
.
canHandleResource
(
resource
))
{
if
(
this
.
fileService
.
canHandleResource
(
resource
))
{
...
@@ -582,16 +583,8 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
...
@@ -582,16 +583,8 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
}
}
// Try to place where last active file was if any
// Try to place where last active file was if any
const
defaultFilePath
=
this
.
fileDialogService
.
defaultFilePath
();
// Otherwise fallback to user home
if
(
defaultFilePath
)
{
return
joinPath
(
this
.
fileDialogService
.
defaultFilePath
()
||
(
await
this
.
remotePathService
.
userHome
),
suggestedFilename
);
return
joinPath
(
defaultFilePath
,
suggestedFilename
);
}
// Finally fallback to suggest just the file name
// Since we do not have a default file path to
// put, we use path.resolve() to make sure the path
// is absolute.
return
toLocalResource
(
resource
.
with
({
path
:
resolve
(
suggestedFilename
)
}),
remoteAuthority
);
}
}
//#endregion
//#endregion
...
...
src/vs/workbench/services/textfile/electron-browser/nativeTextFileService.ts
浏览文件 @
fef9498f
...
@@ -38,6 +38,7 @@ import { IFilesConfigurationService } from 'vs/workbench/services/filesConfigura
...
@@ -38,6 +38,7 @@ import { IFilesConfigurationService } from 'vs/workbench/services/filesConfigura
import
{
ITextModelService
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
ITextModelService
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
ICodeEditorService
}
from
'
vs/editor/browser/services/codeEditorService
'
;
import
{
ICodeEditorService
}
from
'
vs/editor/browser/services/codeEditorService
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IRemotePathService
}
from
'
vs/workbench/services/path/common/remotePathService
'
;
export
class
NativeTextFileService
extends
AbstractTextFileService
{
export
class
NativeTextFileService
extends
AbstractTextFileService
{
...
@@ -55,9 +56,10 @@ export class NativeTextFileService extends AbstractTextFileService {
...
@@ -55,9 +56,10 @@ export class NativeTextFileService extends AbstractTextFileService {
@
IFilesConfigurationService
filesConfigurationService
:
IFilesConfigurationService
,
@
IFilesConfigurationService
filesConfigurationService
:
IFilesConfigurationService
,
@
ITextModelService
textModelService
:
ITextModelService
,
@
ITextModelService
textModelService
:
ITextModelService
,
@
ICodeEditorService
codeEditorService
:
ICodeEditorService
,
@
ICodeEditorService
codeEditorService
:
ICodeEditorService
,
@
INotificationService
notificationService
:
INotificationService
@
INotificationService
notificationService
:
INotificationService
,
@
IRemotePathService
remotePathService
:
IRemotePathService
)
{
)
{
super
(
fileService
,
untitledTextEditorService
,
lifecycleService
,
instantiationService
,
modelService
,
environmentService
,
dialogService
,
fileDialogService
,
textResourceConfigurationService
,
filesConfigurationService
,
textModelService
,
codeEditorService
,
notificationService
);
super
(
fileService
,
untitledTextEditorService
,
lifecycleService
,
instantiationService
,
modelService
,
environmentService
,
dialogService
,
fileDialogService
,
textResourceConfigurationService
,
filesConfigurationService
,
textModelService
,
codeEditorService
,
notificationService
,
remotePathService
);
}
}
private
_encoding
:
EncodingOracle
|
undefined
;
private
_encoding
:
EncodingOracle
|
undefined
;
...
...
src/vs/workbench/test/browser/workbenchTestServices.ts
浏览文件 @
fef9498f
...
@@ -92,6 +92,7 @@ export import TestTextResourcePropertiesService = CommonWorkbenchTestServices.Te
...
@@ -92,6 +92,7 @@ export import TestTextResourcePropertiesService = CommonWorkbenchTestServices.Te
export
import
TestContextService
=
CommonWorkbenchTestServices
.
TestContextService
;
export
import
TestContextService
=
CommonWorkbenchTestServices
.
TestContextService
;
export
import
TestStorageService
=
CommonWorkbenchTestServices
.
TestStorageService
;
export
import
TestStorageService
=
CommonWorkbenchTestServices
.
TestStorageService
;
export
import
TestWorkingCopyService
=
CommonWorkbenchTestServices
.
TestWorkingCopyService
;
export
import
TestWorkingCopyService
=
CommonWorkbenchTestServices
.
TestWorkingCopyService
;
import
{
IRemotePathService
}
from
'
vs/workbench/services/path/common/remotePathService
'
;
export
function
createFileInput
(
instantiationService
:
IInstantiationService
,
resource
:
URI
):
FileEditorInput
{
export
function
createFileInput
(
instantiationService
:
IInstantiationService
,
resource
:
URI
):
FileEditorInput
{
return
instantiationService
.
createInstance
(
FileEditorInput
,
resource
,
undefined
,
undefined
);
return
instantiationService
.
createInstance
(
FileEditorInput
,
resource
,
undefined
,
undefined
);
...
@@ -118,7 +119,8 @@ export class TestTextFileService extends BrowserTextFileService {
...
@@ -118,7 +119,8 @@ export class TestTextFileService extends BrowserTextFileService {
@
IFilesConfigurationService
filesConfigurationService
:
IFilesConfigurationService
,
@
IFilesConfigurationService
filesConfigurationService
:
IFilesConfigurationService
,
@
ITextModelService
textModelService
:
ITextModelService
,
@
ITextModelService
textModelService
:
ITextModelService
,
@
ICodeEditorService
codeEditorService
:
ICodeEditorService
,
@
ICodeEditorService
codeEditorService
:
ICodeEditorService
,
@
INotificationService
notificationService
:
INotificationService
@
INotificationService
notificationService
:
INotificationService
,
@
IRemotePathService
remotePathService
:
IRemotePathService
)
{
)
{
super
(
super
(
fileService
,
fileService
,
...
@@ -133,7 +135,8 @@ export class TestTextFileService extends BrowserTextFileService {
...
@@ -133,7 +135,8 @@ export class TestTextFileService extends BrowserTextFileService {
filesConfigurationService
,
filesConfigurationService
,
textModelService
,
textModelService
,
codeEditorService
,
codeEditorService
,
notificationService
notificationService
,
remotePathService
);
);
}
}
...
...
src/vs/workbench/test/electron-browser/workbenchTestServices.ts
浏览文件 @
fef9498f
...
@@ -29,6 +29,7 @@ import { createTextBufferFactoryFromStream } from 'vs/editor/common/model/textMo
...
@@ -29,6 +29,7 @@ import { createTextBufferFactoryFromStream } from 'vs/editor/common/model/textMo
import
{
IOpenedWindow
,
IOpenEmptyWindowOptions
,
IWindowOpenable
,
IOpenWindowOptions
,
IWindowConfiguration
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IOpenedWindow
,
IOpenEmptyWindowOptions
,
IWindowOpenable
,
IOpenWindowOptions
,
IWindowConfiguration
}
from
'
vs/platform/windows/common/windows
'
;
import
{
parseArgs
,
OPTIONS
}
from
'
vs/platform/environment/node/argv
'
;
import
{
parseArgs
,
OPTIONS
}
from
'
vs/platform/environment/node/argv
'
;
import
{
LogLevel
}
from
'
vs/platform/log/common/log
'
;
import
{
LogLevel
}
from
'
vs/platform/log/common/log
'
;
import
{
IRemotePathService
}
from
'
vs/workbench/services/path/common/remotePathService
'
;
export
const
TestWindowConfiguration
:
IWindowConfiguration
=
{
export
const
TestWindowConfiguration
:
IWindowConfiguration
=
{
windowId
:
0
,
windowId
:
0
,
...
@@ -61,7 +62,8 @@ export class TestTextFileService extends NativeTextFileService {
...
@@ -61,7 +62,8 @@ export class TestTextFileService extends NativeTextFileService {
@
IFilesConfigurationService
filesConfigurationService
:
IFilesConfigurationService
,
@
IFilesConfigurationService
filesConfigurationService
:
IFilesConfigurationService
,
@
ITextModelService
textModelService
:
ITextModelService
,
@
ITextModelService
textModelService
:
ITextModelService
,
@
ICodeEditorService
codeEditorService
:
ICodeEditorService
,
@
ICodeEditorService
codeEditorService
:
ICodeEditorService
,
@
INotificationService
notificationService
:
INotificationService
@
INotificationService
notificationService
:
INotificationService
,
@
IRemotePathService
remotePathService
:
IRemotePathService
)
{
)
{
super
(
super
(
fileService
,
fileService
,
...
@@ -77,7 +79,8 @@ export class TestTextFileService extends NativeTextFileService {
...
@@ -77,7 +79,8 @@ export class TestTextFileService extends NativeTextFileService {
filesConfigurationService
,
filesConfigurationService
,
textModelService
,
textModelService
,
codeEditorService
,
codeEditorService
,
notificationService
notificationService
,
remotePathService
);
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录