Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
220a10c2
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,发现更多精彩内容 >>
提交
220a10c2
编写于
3月 02, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move ITextSource2 out of editorCommon
上级
bff93542
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
64 addition
and
92 deletion
+64
-92
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+0
-31
src/vs/editor/common/model/model.ts
src/vs/editor/common/model/model.ts
+2
-41
src/vs/editor/common/model/textModel.ts
src/vs/editor/common/model/textModel.ts
+8
-7
src/vs/editor/common/model/textSource.ts
src/vs/editor/common/model/textSource.ts
+35
-0
src/vs/editor/common/services/modelService.ts
src/vs/editor/common/services/modelService.ts
+2
-1
src/vs/editor/common/services/modelServiceImpl.ts
src/vs/editor/common/services/modelServiceImpl.ts
+4
-3
src/vs/editor/node/model/modelBuilder.ts
src/vs/editor/node/model/modelBuilder.ts
+1
-1
src/vs/editor/test/node/model/modelBuilder.test.ts
src/vs/editor/test/node/model/modelBuilder.test.ts
+2
-1
src/vs/workbench/common/editor/textEditorModel.ts
src/vs/workbench/common/editor/textEditorModel.ts
+2
-1
src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts
...ts/welcome/walkThrough/node/walkThroughContentProvider.ts
+2
-1
src/vs/workbench/services/backup/common/backup.ts
src/vs/workbench/services/backup/common/backup.ts
+1
-1
src/vs/workbench/services/backup/node/backupFileService.ts
src/vs/workbench/services/backup/node/backupFileService.ts
+1
-1
src/vs/workbench/services/textfile/common/textFileEditorModel.ts
...workbench/services/textfile/common/textFileEditorModel.ts
+2
-1
src/vs/workbench/services/textfile/common/textfiles.ts
src/vs/workbench/services/textfile/common/textfiles.ts
+1
-1
src/vs/workbench/test/workbenchTestServices.ts
src/vs/workbench/test/workbenchTestServices.ts
+1
-1
未找到文件。
src/vs/editor/common/editorCommon.ts
浏览文件 @
220a10c2
...
...
@@ -2488,37 +2488,6 @@ export interface ITextSource {
readonly
isBasicASCII
:
boolean
;
}
/**
* The text source
* @internal
*/
export
interface
ITextSource2
{
/**
* The entire text length.
*/
readonly
length
:
number
;
/**
* The text split into lines.
*/
readonly
lines
:
string
[];
/**
* The BOM (leading character sequence of the file).
*/
readonly
BOM
:
string
;
/**
* The number of lines ending with '\r\n'
*/
readonly
totalCRCount
:
number
;
/**
* The text contains Unicode characters classified as "R" or "AL".
*/
readonly
containsRTL
:
boolean
;
/**
* The text contains only characters inside the ASCII range 32-126 or \t \r \n
*/
readonly
isBasicASCII
:
boolean
;
}
/**
* The raw text backing a model.
* @internal
...
...
src/vs/editor/common/model/model.ts
浏览文件 @
220a10c2
...
...
@@ -20,19 +20,6 @@ import { LanguageIdentifier } from 'vs/editor/common/modes';
var
MODEL_ID
=
0
;
var
aliveModels
:
{
[
modelId
:
string
]:
boolean
;
}
=
{};
// var LAST_CNT = 0;
// setInterval(() => {
// var cnt = Object.keys(aliveModels).length;
// if (cnt === LAST_CNT) {
// return;
// }
// console.warn('ALIVE MODELS:');
// console.log(Object.keys(aliveModels).join('\n'));
// LAST_CNT = cnt;
// }, 100);
export
class
Model
extends
EditableTextModel
implements
IModel
{
public
onDidChangeDecorations
(
listener
:
(
e
:
IModelDecorationsChangedEvent
)
=>
void
):
IDisposable
{
...
...
@@ -57,24 +44,11 @@ export class Model extends EditableTextModel implements IModel {
return
new
Model
(
rawText
,
languageIdentifier
,
uri
);
}
public
id
:
string
;
public
readonly
id
:
string
;
private
_associatedResource
:
URI
;
private
readonly
_associatedResource
:
URI
;
private
_attachedEditorCount
:
number
;
/**
* Instantiates a new model
* @param rawText
* The raw text buffer. It may start with a UTF-16 BOM, which can be
* optionally preserved when doing a getValue call. The lines may be
* separated by different EOL combinations, such as \n or \r\n. These
* can also be preserved when doing a getValue call.
* @param mode
* The language service name this model is bound to.
* @param associatedResource
* The resource associated with this model. If the value is not provided an
* unique in memory URL is constructed as the associated resource.
*/
constructor
(
rawText
:
IRawText
,
languageIdentifier
:
LanguageIdentifier
,
associatedResource
:
URI
=
null
)
{
super
([
EventType
.
ModelDispose
],
rawText
,
languageIdentifier
);
...
...
@@ -88,15 +62,7 @@ export class Model extends EditableTextModel implements IModel {
this
.
_associatedResource
=
associatedResource
;
}
if
(
aliveModels
[
String
(
this
.
_associatedResource
)])
{
throw
new
Error
(
'
Cannot instantiate a second Model with the same URI
'
);
}
this
.
_attachedEditorCount
=
0
;
aliveModels
[
String
(
this
.
_associatedResource
)]
=
true
;
// console.log('ALIVE MODELS: ' + Object.keys(aliveModels).join('\n'));
}
public
destroy
():
void
{
...
...
@@ -105,24 +71,19 @@ export class Model extends EditableTextModel implements IModel {
public
dispose
():
void
{
this
.
_isDisposing
=
true
;
delete
aliveModels
[
String
(
this
.
_associatedResource
)];
this
.
emit
(
EventType
.
ModelDispose
);
super
.
dispose
();
this
.
_isDisposing
=
false
;
// console.log('ALIVE MODELS: ' + Object.keys(aliveModels).join('\n'));
}
public
onBeforeAttached
():
void
{
this
.
_attachedEditorCount
++
;
// Warm up tokens for the editor
this
.
_warmUpTokens
();
}
public
onBeforeDetached
():
void
{
this
.
_attachedEditorCount
--
;
// Intentional empty (for now)
}
protected
_shouldAutoTokenize
():
boolean
{
...
...
src/vs/editor/common/model/textModel.ts
浏览文件 @
220a10c2
...
...
@@ -15,6 +15,7 @@ import { DEFAULT_INDENTATION, DEFAULT_TRIM_AUTO_WHITESPACE } from 'vs/editor/com
import
{
PrefixSumComputer
}
from
'
vs/editor/common/viewModel/prefixSumComputer
'
;
import
{
IndentRange
,
computeRanges
}
from
'
vs/editor/common/model/indentRanges
'
;
import
{
TextModelSearch
,
SearchParams
}
from
'
vs/editor/common/model/textModelSearch
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
const
LIMIT_FIND_COUNT
=
999
;
export
const
LONG_LINE_BOUNDARY
=
1000
;
...
...
@@ -749,7 +750,7 @@ export class TextModel extends OrderGuaranteeEventEmitter implements editorCommo
}
}
public
static
toTextSource
(
rawText
:
string
):
editorCommon
.
ITextSource2
{
public
static
toTextSource
(
rawText
:
string
):
ITextSource2
{
// Count the number of lines that end with \r\n
let
carriageReturnCnt
=
0
;
let
lastCarriageReturnIndex
=
-
1
;
...
...
@@ -785,7 +786,7 @@ export class TextModel extends OrderGuaranteeEventEmitter implements editorCommo
* if text source contains more lines ending with '\r\n', returns '\r\n'.
* Otherwise returns '\n'. More lines end with '\n'.
*/
public
static
getEndOfLine
(
textSource
:
editorCommon
.
ITextSource2
):
string
{
public
static
getEndOfLine
(
textSource
:
ITextSource2
):
string
{
const
lineFeedCnt
=
textSource
.
lines
.
length
-
1
;
if
(
lineFeedCnt
===
0
)
{
// This is an empty file or a file with precisely one line
...
...
@@ -804,7 +805,7 @@ export class TextModel extends OrderGuaranteeEventEmitter implements editorCommo
return
TextModel
.
toRawTextFromTextSource
(
textSource
,
opts
);
}
public
static
toRawTextFromTextSource
(
textSource
:
editorCommon
.
ITextSource2
,
opts
:
editorCommon
.
ITextModelCreationOptions
):
editorCommon
.
IRawText
{
public
static
toRawTextFromTextSource
(
textSource
:
ITextSource2
,
opts
:
editorCommon
.
ITextModelCreationOptions
):
editorCommon
.
IRawText
{
let
EOL
=
TextModel
.
getEndOfLine
(
textSource
);
if
(
!
EOL
)
{
// This is an empty file or a file with precisely one line
...
...
@@ -897,7 +898,7 @@ export class TextModel extends OrderGuaranteeEventEmitter implements editorCommo
export
class
RawText
{
public
static
toRawText
(
textSourceOrString
:
editorCommon
.
ITextSource2
|
string
,
opts
:
editorCommon
.
ITextModelCreationOptions
):
editorCommon
.
IRawText
{
public
static
toRawText
(
textSourceOrString
:
ITextSource2
|
string
,
opts
:
editorCommon
.
ITextModelCreationOptions
):
editorCommon
.
IRawText
{
if
(
typeof
textSourceOrString
===
'
string
'
)
{
return
RawText
.
fromString
(
textSourceOrString
,
opts
);
}
else
{
...
...
@@ -905,7 +906,7 @@ export class RawText {
}
}
public
static
toRawTextWithModelOptions
(
textSourceOrString
:
editorCommon
.
ITextSource2
|
string
,
model
:
editorCommon
.
IModel
):
editorCommon
.
IRawText
{
public
static
toRawTextWithModelOptions
(
textSourceOrString
:
ITextSource2
|
string
,
model
:
editorCommon
.
IModel
):
editorCommon
.
IRawText
{
if
(
typeof
textSourceOrString
===
'
string
'
)
{
return
RawText
.
fromStringWithModelOptions
(
textSourceOrString
,
model
);
}
else
{
...
...
@@ -917,7 +918,7 @@ export class RawText {
return
TextModel
.
toRawText
(
rawText
,
opts
);
}
public
static
fromTextSource
(
textSource
:
editorCommon
.
ITextSource2
,
opts
:
editorCommon
.
ITextModelCreationOptions
):
editorCommon
.
IRawText
{
public
static
fromTextSource
(
textSource
:
ITextSource2
,
opts
:
editorCommon
.
ITextModelCreationOptions
):
editorCommon
.
IRawText
{
return
TextModel
.
toRawTextFromTextSource
(
textSource
,
opts
);
}
...
...
@@ -932,7 +933,7 @@ export class RawText {
});
}
public
static
fromTextSourceWithModelOptions
(
textSource
:
editorCommon
.
ITextSource2
,
model
:
editorCommon
.
IModel
):
editorCommon
.
IRawText
{
public
static
fromTextSourceWithModelOptions
(
textSource
:
ITextSource2
,
model
:
editorCommon
.
IModel
):
editorCommon
.
IRawText
{
let
opts
=
model
.
getOptions
();
return
TextModel
.
toRawTextFromTextSource
(
textSource
,
{
tabSize
:
opts
.
tabSize
,
...
...
src/vs/editor/common/model/textSource.ts
0 → 100644
浏览文件 @
220a10c2
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
/**
* The text source
*/
export
interface
ITextSource2
{
/**
* The entire text length.
*/
readonly
length
:
number
;
/**
* The text split into lines.
*/
readonly
lines
:
string
[];
/**
* The BOM (leading character sequence of the file).
*/
readonly
BOM
:
string
;
/**
* The number of lines ending with '\r\n'
*/
readonly
totalCRCount
:
number
;
/**
* The text contains Unicode characters classified as "R" or "AL".
*/
readonly
containsRTL
:
boolean
;
/**
* The text contains only characters inside the ASCII range 32-126 or \t \r \n
*/
readonly
isBasicASCII
:
boolean
;
}
src/vs/editor/common/services/modelService.ts
浏览文件 @
220a10c2
...
...
@@ -8,8 +8,9 @@ import Event from 'vs/base/common/event';
import
URI
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IModel
,
IText
Source2
,
IText
ModelCreationOptions
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IModel
,
ITextModelCreationOptions
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IMode
}
from
'
vs/editor/common/modes
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
export
var
IModelService
=
createDecorator
<
IModelService
>
(
'
modelService
'
);
...
...
src/vs/editor/common/services/modelServiceImpl.ts
浏览文件 @
220a10c2
...
...
@@ -24,6 +24,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import
{
DEFAULT_INDENTATION
,
DEFAULT_TRIM_AUTO_WHITESPACE
}
from
'
vs/editor/common/config/defaultConfig
'
;
import
{
PLAINTEXT_LANGUAGE_IDENTIFIER
}
from
'
vs/editor/common/modes/modesRegistry
'
;
import
{
RawText
}
from
'
vs/editor/common/model/textModel
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
function
MODEL_ID
(
resource
:
URI
):
string
{
return
resource
.
toString
();
...
...
@@ -338,7 +339,7 @@ export class ModelServiceImpl implements IModelService {
// --- begin IModelService
private
_createModelData
(
value
:
string
|
editorCommon
.
ITextSource2
,
languageIdentifier
:
LanguageIdentifier
,
resource
:
URI
):
ModelData
{
private
_createModelData
(
value
:
string
|
ITextSource2
,
languageIdentifier
:
LanguageIdentifier
,
resource
:
URI
):
ModelData
{
// create & save the model
const
options
=
this
.
getCreationOptions
(
languageIdentifier
.
language
);
...
...
@@ -357,7 +358,7 @@ export class ModelServiceImpl implements IModelService {
return
modelData
;
}
public
updateModel
(
model
:
editorCommon
.
IModel
,
value
:
string
|
editorCommon
.
ITextSource2
):
void
{
public
updateModel
(
model
:
editorCommon
.
IModel
,
value
:
string
|
ITextSource2
):
void
{
let
options
=
this
.
getCreationOptions
(
model
.
getLanguageIdentifier
().
language
);
let
rawText
:
editorCommon
.
IRawText
=
RawText
.
toRawText
(
value
,
options
);
...
...
@@ -370,7 +371,7 @@ export class ModelServiceImpl implements IModelService {
model
.
setValueFromRawText
(
rawText
);
}
public
createModel
(
value
:
string
|
editorCommon
.
ITextSource2
,
modeOrPromise
:
TPromise
<
IMode
>
|
IMode
,
resource
:
URI
):
editorCommon
.
IModel
{
public
createModel
(
value
:
string
|
ITextSource2
,
modeOrPromise
:
TPromise
<
IMode
>
|
IMode
,
resource
:
URI
):
editorCommon
.
IModel
{
let
modelData
:
ModelData
;
if
(
!
modeOrPromise
||
TPromise
.
is
(
modeOrPromise
))
{
...
...
src/vs/editor/node/model/modelBuilder.ts
浏览文件 @
220a10c2
...
...
@@ -6,10 +6,10 @@
import
{
IStringStream
}
from
'
vs/platform/files/common/files
'
;
import
*
as
crypto
from
'
crypto
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/editorCommon
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
CharCode
}
from
'
vs/base/common/charCode
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
export
interface
ModelBuilderResult
{
readonly
hash
:
string
;
...
...
src/vs/editor/test/node/model/modelBuilder.test.ts
浏览文件 @
220a10c2
...
...
@@ -6,9 +6,10 @@
import
*
as
assert
from
'
assert
'
;
import
{
ModelBuilder
,
computeHash
}
from
'
vs/editor/node/model/modelBuilder
'
;
import
{
ITextModelCreationOptions
,
ITextSource2
}
from
'
vs/editor/common/editorCommon
'
;
import
{
ITextModelCreationOptions
}
from
'
vs/editor/common/editorCommon
'
;
import
{
TextModel
}
from
'
vs/editor/common/model/textModel
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
export
function
testModelBuilder
(
chunks
:
string
[],
opts
:
ITextModelCreationOptions
=
TextModel
.
DEFAULT_CREATION_OPTIONS
):
string
{
let
expectedTextSource
=
TextModel
.
toTextSource
(
chunks
.
join
(
''
));
...
...
src/vs/workbench/common/editor/textEditorModel.ts
浏览文件 @
220a10c2
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
EndOfLinePreference
,
IModel
,
ITextSource2
}
from
'
vs/editor/common/editorCommon
'
;
import
{
EndOfLinePreference
,
IModel
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IMode
}
from
'
vs/editor/common/modes
'
;
import
{
EditorModel
}
from
'
vs/workbench/common/editor
'
;
import
URI
from
'
vs/base/common/uri
'
;
...
...
@@ -13,6 +13,7 @@ import { ITextEditorModel } from 'vs/editor/common/services/resolverService';
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
/**
* The base text editor model leverages the code editor model. This class is only intended to be subclassed and not instantiated.
...
...
src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts
浏览文件 @
220a10c2
...
...
@@ -10,11 +10,12 @@ import URI from 'vs/base/common/uri';
import
{
ITextModelResolverService
,
ITextModelContentProvider
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
IModel
,
ITextSource2
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IModel
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
marked
}
from
'
vs/base/common/marked/marked
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
export
class
WalkThroughContentProvider
implements
ITextModelContentProvider
,
IWorkbenchContribution
{
...
...
src/vs/workbench/services/backup/common/backup.ts
浏览文件 @
220a10c2
...
...
@@ -8,8 +8,8 @@
import
Uri
from
'
vs/base/common/uri
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IResolveContentOptions
,
IUpdateContentOptions
}
from
'
vs/platform/files/common/files
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
export
const
IBackupFileService
=
createDecorator
<
IBackupFileService
>
(
'
backupFileService
'
);
...
...
src/vs/workbench/services/backup/node/backupFileService.ts
浏览文件 @
220a10c2
...
...
@@ -17,9 +17,9 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
readToMatchingString
}
from
'
vs/base/node/stream
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/editorCommon
'
;
import
{
TextModel
}
from
'
vs/editor/common/model/textModel
'
;
import
{
IWindowService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
export
interface
IBackupFilesModel
{
resolve
(
backupRoot
:
string
):
TPromise
<
IBackupFilesModel
>
;
...
...
src/vs/workbench/services/textfile/common/textFileEditorModel.ts
浏览文件 @
220a10c2
...
...
@@ -16,7 +16,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import
paths
=
require
(
'
vs/base/common/paths
'
);
import
diagnostics
=
require
(
'
vs/base/common/diagnostics
'
);
import
types
=
require
(
'
vs/base/common/types
'
);
import
{
IModelContentChangedEvent
,
ITextSource2
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IModelContentChangedEvent
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IMode
}
from
'
vs/editor/common/modes
'
;
import
{
ILifecycleService
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
ITextFileService
,
IAutoSaveConfiguration
,
ModelState
,
ITextFileEditorModel
,
IModelSaveOptions
,
ISaveErrorHandler
,
ISaveParticipant
,
StateChange
,
SaveReason
,
IRawTextContent
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
...
...
@@ -31,6 +31,7 @@ import { IModelService } from 'vs/editor/common/services/modelService';
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
anonymize
}
from
'
vs/platform/telemetry/common/telemetryUtils
'
;
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
/**
* The text file editor model listens to changes to its underlying code editor model and saves these changes through the file service back to the disk.
...
...
src/vs/workbench/services/textfile/common/textfiles.ts
浏览文件 @
220a10c2
...
...
@@ -7,12 +7,12 @@
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
Event
from
'
vs/base/common/event
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IEncodingSupport
,
ConfirmResult
}
from
'
vs/workbench/common/editor
'
;
import
{
IBaseStat
,
IResolveContentOptions
}
from
'
vs/platform/files/common/files
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ITextEditorModel
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/model/textSource
'
;
/**
* The save error handler can be installed on the text text file editor model to install code that executes when save errors occur.
...
...
src/vs/workbench/test/workbenchTestServices.ts
浏览文件 @
220a10c2
...
...
@@ -49,7 +49,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
TestConfigurationService
}
from
'
vs/platform/configuration/test/common/testConfigurationService
'
;
import
{
IWindowsService
,
IWindowService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
TestWorkspace
}
from
'
vs/platform/workspace/test/common/testWorkspace
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/
editorCommon
'
;
import
{
ITextSource2
}
from
'
vs/editor/common/
model/textSource
'
;
export
function
createFileInput
(
instantiationService
:
IInstantiationService
,
resource
:
URI
):
FileEditorInput
{
return
instantiationService
.
createInstance
(
FileEditorInput
,
resource
,
void
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录