Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ee499ab7
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,体验更适合开发者的 AI 搜索 >>
提交
ee499ab7
编写于
2月 19, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make AbstractMode as thin as possible
上级
c78b8a2f
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
48 addition
and
69 deletion
+48
-69
src/vs/editor/common/modes/abstractMode.ts
src/vs/editor/common/modes/abstractMode.ts
+9
-24
src/vs/editor/common/modes/monarch/monarch.ts
src/vs/editor/common/modes/monarch/monarch.ts
+3
-7
src/vs/languages/css/common/css.ts
src/vs/languages/css/common/css.ts
+4
-2
src/vs/languages/handlebars/common/handlebars.ts
src/vs/languages/handlebars/common/handlebars.ts
+1
-3
src/vs/languages/html/common/html.ts
src/vs/languages/html/common/html.ts
+2
-4
src/vs/languages/json/common/json.ts
src/vs/languages/json/common/json.ts
+4
-2
src/vs/languages/less/common/less.ts
src/vs/languages/less/common/less.ts
+4
-2
src/vs/languages/markdown/common/markdown.ts
src/vs/languages/markdown/common/markdown.ts
+4
-2
src/vs/languages/php/common/php.ts
src/vs/languages/php/common/php.ts
+2
-6
src/vs/languages/plaintext/common/plaintext.ts
src/vs/languages/plaintext/common/plaintext.ts
+2
-6
src/vs/languages/razor/common/razor.ts
src/vs/languages/razor/common/razor.ts
+1
-3
src/vs/languages/sass/common/sass.ts
src/vs/languages/sass/common/sass.ts
+4
-2
src/vs/languages/typescript/common/typescriptMode.ts
src/vs/languages/typescript/common/typescriptMode.ts
+6
-2
src/vs/workbench/parts/output/common/outputMode.ts
src/vs/workbench/parts/output/common/outputMode.ts
+2
-4
未找到文件。
src/vs/editor/common/modes/abstractMode.ts
浏览文件 @
ee499ab7
...
...
@@ -12,7 +12,6 @@ import EditorCommon = require('vs/editor/common/editorCommon');
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThreadService
}
from
'
vs/platform/thread/common/thread
'
;
import
{
AsyncDescriptor2
,
createAsyncDescriptor2
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
...
...
@@ -81,28 +80,20 @@ export class ModeWorkerManager<W> {
}
}
export
abstract
class
AbstractMode
<
W
>
implements
Modes
.
IMode
{
export
abstract
class
AbstractMode
implements
Modes
.
IMode
{
_instantiationService
:
IInstantiationService
;
_threadService
:
IThreadService
;
private
_descriptor
:
Modes
.
IModeDescriptor
;
private
_eventEmitter
=
new
EventEmitter
();
private
_modeId
:
string
;
private
_eventEmitter
:
EventEmitter
;
private
_simplifiedMode
:
Modes
.
IMode
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
instantiationService
:
IInstantiationService
,
threadService
:
IThreadService
)
{
this
.
_instantiationService
=
instantiationService
;
this
.
_threadService
=
threadService
;
this
.
_descriptor
=
descriptor
;
constructor
(
modeId
:
string
)
{
this
.
_modeId
=
modeId
;
this
.
_eventEmitter
=
new
EventEmitter
();
this
.
_simplifiedMode
=
null
;
}
public
getId
():
string
{
return
this
.
_
descriptor
.
i
d
;
return
this
.
_
modeI
d
;
}
public
toSimplifiedMode
():
Modes
.
IMode
{
...
...
@@ -112,8 +103,6 @@ export abstract class AbstractMode<W> implements Modes.IMode {
return
this
.
_simplifiedMode
;
}
// START mics interface implementations
public
addSupportChangedListener
(
callback
:
(
e
:
EditorCommon
.
IModeSupportChangedEvent
)
=>
void
)
:
IDisposable
{
return
this
.
_eventEmitter
.
addListener2
(
'
modeSupportChanged
'
,
callback
);
}
...
...
@@ -132,8 +121,6 @@ export abstract class AbstractMode<W> implements Modes.IMode {
}
};
}
// END
}
class
SimplifiedMode
implements
Modes
.
IMode
{
...
...
@@ -265,17 +252,15 @@ export var isDigit:(character:string, base:number)=>boolean = (function () {
};
})();
export
class
FrankensteinMode
extends
AbstractMode
<
void
>
{
export
class
FrankensteinMode
extends
AbstractMode
{
public
suggestSupport
:
Modes
.
ISuggestSupport
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThreadService
threadService
:
IThreadService
,
@
IEditorWorkerService
editorWorkerService
:
IEditorWorkerService
)
{
super
(
descriptor
,
instantiationService
,
threadService
);
super
(
descriptor
.
id
);
this
.
suggestSupport
=
new
TextualSuggestSupport
(
this
.
getId
(),
editorWorkerService
);
}
...
...
src/vs/editor/common/modes/monarch/monarch.ts
浏览文件 @
ee499ab7
...
...
@@ -14,8 +14,6 @@ import {ILexer} from 'vs/editor/common/modes/monarch/monarchCommon';
import
Modes
=
require
(
'
vs/editor/common/modes
'
);
import
MonarchDefinition
=
require
(
'
vs/editor/common/modes/monarch/monarchDefinition
'
);
import
{
createTokenizationSupport
}
from
'
vs/editor/common/modes/monarch/monarchLexer
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThreadService
}
from
'
vs/platform/thread/common/thread
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
...
...
@@ -24,22 +22,20 @@ import {IEditorWorkerService} from 'vs/editor/common/services/editorWorkerServic
/**
* The MonarchMode creates a Monaco language mode given a certain language description
*/
export
class
MonarchMode
<
W
>
extends
AbstractMode
<
W
>
{
export
class
MonarchMode
extends
AbstractMode
{
public
suggestSupport
:
Modes
.
ISuggestSupport
;
public
tokenizationSupport
:
Modes
.
ITokenizationSupport
;
public
richEditSupport
:
Modes
.
IRichEditSupport
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
modeId
:
string
,
lexer
:
ILexer
,
instantiationService
:
IInstantiationService
,
threadService
:
IThreadService
,
modeService
:
IModeService
,
modelService
:
IModelService
,
editorWorkerService
:
IEditorWorkerService
)
{
super
(
descriptor
,
instantiationService
,
threadService
);
super
(
modeId
);
this
.
tokenizationSupport
=
createTokenizationSupport
(
modeService
,
this
,
lexer
);
...
...
src/vs/languages/css/common/css.ts
浏览文件 @
ee499ab7
...
...
@@ -278,7 +278,7 @@ export class State extends AbstractState {
}
}
export
class
CSSMode
extends
AbstractMode
<
cssWorker
.
CSSWorker
>
{
export
class
CSSMode
extends
AbstractMode
{
public
tokenizationSupport
:
Modes
.
ITokenizationSupport
;
public
richEditSupport
:
Modes
.
IRichEditSupport
;
...
...
@@ -294,14 +294,16 @@ export class CSSMode extends AbstractMode<cssWorker.CSSWorker> {
public
quickFixSupport
:
Modes
.
IQuickFixSupport
;
private
_modeWorkerManager
:
ModeWorkerManager
<
cssWorker
.
CSSWorker
>
;
private
_threadService
:
IThreadService
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThreadService
threadService
:
IThreadService
)
{
super
(
descriptor
,
instantiationService
,
threadService
);
super
(
descriptor
.
id
);
this
.
_modeWorkerManager
=
new
ModeWorkerManager
<
cssWorker
.
CSSWorker
>
(
descriptor
,
'
vs/languages/css/common/cssWorker
'
,
'
CSSWorker
'
,
null
,
instantiationService
);
this
.
_threadService
=
threadService
;
this
.
tokenizationSupport
=
new
TokenizationSupport
(
this
,
{
getInitialState
:
()
=>
new
State
(
this
,
States
.
Selector
,
false
,
null
,
false
,
0
)
...
...
src/vs/languages/handlebars/common/handlebars.ts
浏览文件 @
ee499ab7
...
...
@@ -9,7 +9,6 @@ import htmlMode = require('vs/languages/html/common/html');
import
handlebarsTokenTypes
=
require
(
'
vs/languages/handlebars/common/handlebarsTokenTypes
'
);
import
htmlWorker
=
require
(
'
vs/languages/html/common/htmlWorker
'
);
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThreadService
}
from
'
vs/platform/thread/common/thread
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
import
{
createWordRegExp
}
from
'
vs/editor/common/modes/abstractMode
'
;
...
...
@@ -109,10 +108,9 @@ export class HandlebarsMode extends htmlMode.HTMLMode<htmlWorker.HTMLWorker> {
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThreadService
threadService
:
IThreadService
,
@
IModeService
modeService
:
IModeService
)
{
super
(
descriptor
,
instantiationService
,
threadService
,
modeService
);
super
(
descriptor
,
instantiationService
,
modeService
);
this
.
formattingSupport
=
null
;
}
...
...
src/vs/languages/html/common/html.ts
浏览文件 @
ee499ab7
...
...
@@ -14,7 +14,6 @@ import { AbstractState } from 'vs/editor/common/modes/abstractState';
import
{
OneWorkerAttr
}
from
'
vs/platform/thread/common/threadService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThreadService
}
from
'
vs/platform/thread/common/thread
'
;
import
*
as
htmlTokenTypes
from
'
vs/languages/html/common/htmlTokenTypes
'
;
import
{
EMPTY_ELEMENTS
}
from
'
vs/languages/html/common/htmlEmptyTagsShared
'
;
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
...
...
@@ -269,7 +268,7 @@ export class State extends AbstractState {
}
}
export
class
HTMLMode
<
W
extends
htmlWorker
.
HTMLWorker
>
extends
AbstractMode
<
W
>
implements
ITokenizationCustomization
{
export
class
HTMLMode
<
W
extends
htmlWorker
.
HTMLWorker
>
extends
AbstractMode
implements
ITokenizationCustomization
{
public
tokenizationSupport
:
Modes
.
ITokenizationSupport
;
public
richEditSupport
:
Modes
.
IRichEditSupport
;
...
...
@@ -288,10 +287,9 @@ export class HTMLMode<W extends htmlWorker.HTMLWorker> extends AbstractMode<W> i
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThreadService
threadService
:
IThreadService
,
@
IModeService
modeService
:
IModeService
)
{
super
(
descriptor
,
instantiationService
,
threadService
);
super
(
descriptor
.
id
);
this
.
_modeWorkerManager
=
this
.
_createModeWorkerManager
(
descriptor
,
instantiationService
);
this
.
modeService
=
modeService
;
...
...
src/vs/languages/json/common/json.ts
浏览文件 @
ee499ab7
...
...
@@ -20,7 +20,7 @@ import {IInstantiationService} from 'vs/platform/instantiation/common/instantiat
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
import
{
SuggestSupport
}
from
'
vs/editor/common/modes/supports/suggestSupport
'
;
export
class
JSONMode
extends
AbstractMode
<
jsonWorker
.
JSONWorker
>
implements
Modes
.
IExtraInfoSupport
,
Modes
.
IOutlineSupport
,
IThreadSynchronizableObject
<
ISchemaContributions
>
{
export
class
JSONMode
extends
AbstractMode
implements
Modes
.
IExtraInfoSupport
,
Modes
.
IOutlineSupport
,
IThreadSynchronizableObject
<
ISchemaContributions
>
{
public
tokenizationSupport
:
Modes
.
ITokenizationSupport
;
public
richEditSupport
:
Modes
.
IRichEditSupport
;
...
...
@@ -34,14 +34,16 @@ export class JSONMode extends AbstractMode<jsonWorker.JSONWorker> implements Mod
public
outlineGroupLabel
:
{
[
name
:
string
]:
string
;
};
private
_modeWorkerManager
:
ModeWorkerManager
<
jsonWorker
.
JSONWorker
>
;
private
_threadService
:
IThreadService
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThreadService
threadService
:
IThreadService
)
{
super
(
descriptor
,
instantiationService
,
threadService
);
super
(
descriptor
.
id
);
this
.
_modeWorkerManager
=
new
ModeWorkerManager
<
jsonWorker
.
JSONWorker
>
(
descriptor
,
'
vs/languages/json/common/jsonWorker
'
,
'
JSONWorker
'
,
null
,
instantiationService
);
this
.
_threadService
=
threadService
;
this
.
tokenizationSupport
=
tokenization
.
createTokenizationSupport
(
this
,
true
);
...
...
src/vs/languages/less/common/less.ts
浏览文件 @
ee499ab7
...
...
@@ -176,7 +176,7 @@ export var language: Types.ILanguage = <Types.ILanguage> {
}
};
export
class
LESSMode
extends
Monarch
.
MonarchMode
<
lessWorker
.
LessWorker
>
implements
Modes
.
IExtraInfoSupport
,
Modes
.
IOutlineSupport
{
export
class
LESSMode
extends
Monarch
.
MonarchMode
implements
Modes
.
IExtraInfoSupport
,
Modes
.
IOutlineSupport
{
public
inplaceReplaceSupport
:
Modes
.
IInplaceReplaceSupport
;
public
configSupport
:
Modes
.
IConfigurationSupport
;
...
...
@@ -189,6 +189,7 @@ export class LESSMode extends Monarch.MonarchMode<lessWorker.LessWorker> impleme
private
modeService
:
IModeService
;
private
_modeWorkerManager
:
ModeWorkerManager
<
lessWorker
.
LessWorker
>
;
private
_threadService
:
IThreadService
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
...
...
@@ -198,8 +199,9 @@ export class LESSMode extends Monarch.MonarchMode<lessWorker.LessWorker> impleme
@
IModelService
modelService
:
IModelService
,
@
IEditorWorkerService
editorWorkerService
:
IEditorWorkerService
)
{
super
(
descriptor
,
Compile
.
compile
(
language
),
instantiationService
,
threadService
,
modeService
,
modelService
,
editorWorkerService
);
super
(
descriptor
.
id
,
Compile
.
compile
(
language
)
,
modeService
,
modelService
,
editorWorkerService
);
this
.
_modeWorkerManager
=
new
ModeWorkerManager
<
lessWorker
.
LessWorker
>
(
descriptor
,
'
vs/languages/less/common/lessWorker
'
,
'
LessWorker
'
,
'
vs/languages/css/common/cssWorker
'
,
instantiationService
);
this
.
_threadService
=
threadService
;
this
.
modeService
=
modeService
;
...
...
src/vs/languages/markdown/common/markdown.ts
浏览文件 @
ee499ab7
...
...
@@ -206,12 +206,13 @@ export const language =
}
};
export
class
MarkdownMode
extends
Monarch
.
MonarchMode
<
MarkdownWorker
.
MarkdownWorker
>
implements
Modes
.
IEmitOutputSupport
{
export
class
MarkdownMode
extends
Monarch
.
MonarchMode
implements
Modes
.
IEmitOutputSupport
{
public
emitOutputSupport
:
Modes
.
IEmitOutputSupport
;
public
configSupport
:
Modes
.
IConfigurationSupport
;
private
_modeWorkerManager
:
ModeWorkerManager
<
MarkdownWorker
.
MarkdownWorker
>
;
private
_threadService
:
IThreadService
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
...
...
@@ -222,8 +223,9 @@ export class MarkdownMode extends Monarch.MonarchMode<MarkdownWorker.MarkdownWor
@
IWorkspaceContextService
workspaceContextService
:
IWorkspaceContextService
,
@
IEditorWorkerService
editorWorkerService
:
IEditorWorkerService
)
{
super
(
descriptor
,
Compile
.
compile
(
language
),
instantiationService
,
threadService
,
modeService
,
modelService
,
editorWorkerService
);
super
(
descriptor
.
id
,
Compile
.
compile
(
language
)
,
modeService
,
modelService
,
editorWorkerService
);
this
.
_modeWorkerManager
=
new
ModeWorkerManager
<
MarkdownWorker
.
MarkdownWorker
>
(
descriptor
,
'
vs/languages/markdown/common/markdownWorker
'
,
'
MarkdownWorker
'
,
null
,
instantiationService
);
this
.
_threadService
=
threadService
;
this
.
emitOutputSupport
=
this
;
this
.
configSupport
=
this
;
...
...
src/vs/languages/php/common/php.ts
浏览文件 @
ee499ab7
...
...
@@ -10,8 +10,6 @@ import Modes = require('vs/editor/common/modes');
import
{
AbstractMode
,
isDigit
,
createWordRegExp
}
from
'
vs/editor/common/modes/abstractMode
'
;
import
{
AbstractState
}
from
'
vs/editor/common/modes/abstractState
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThreadService
}
from
'
vs/platform/thread/common/thread
'
;
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
import
{
TokenizationSupport
,
ILeavingNestedModeData
,
ITokenizationCustomization
}
from
'
vs/editor/common/modes/supports/tokenizationSupport
'
;
import
{
TextualSuggestSupport
}
from
'
vs/editor/common/modes/supports/suggestSupport
'
;
...
...
@@ -458,7 +456,7 @@ export class PHPEnterHTMLState extends PHPState {
}
export
class
PHPMode
extends
AbstractMode
<
void
>
implements
ITokenizationCustomization
{
export
class
PHPMode
extends
AbstractMode
implements
ITokenizationCustomization
{
public
tokenizationSupport
:
Modes
.
ITokenizationSupport
;
public
richEditSupport
:
Modes
.
IRichEditSupport
;
...
...
@@ -468,12 +466,10 @@ export class PHPMode extends AbstractMode<void> implements ITokenizationCustomiz
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThreadService
threadService
:
IThreadService
,
@
IModeService
modeService
:
IModeService
,
@
IEditorWorkerService
editorWorkerService
:
IEditorWorkerService
)
{
super
(
descriptor
,
instantiationService
,
threadService
);
super
(
descriptor
.
id
);
this
.
modeService
=
modeService
;
this
.
tokenizationSupport
=
new
TokenizationSupport
(
this
,
this
,
true
,
false
);
...
...
src/vs/languages/plaintext/common/plaintext.ts
浏览文件 @
ee499ab7
...
...
@@ -7,8 +7,6 @@
import
Modes
=
require
(
'
vs/editor/common/modes
'
);
import
{
AbstractMode
}
from
'
vs/editor/common/modes/abstractMode
'
;
import
{
AbstractState
}
from
'
vs/editor/common/modes/abstractState
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThreadService
}
from
'
vs/platform/thread/common/thread
'
;
import
{
TokenizationSupport
}
from
'
vs/editor/common/modes/supports/tokenizationSupport
'
;
import
{
TextualSuggestSupport
}
from
'
vs/editor/common/modes/supports/suggestSupport
'
;
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
...
...
@@ -38,18 +36,16 @@ class State extends AbstractState {
}
}
export
class
Mode
extends
AbstractMode
<
void
>
{
export
class
Mode
extends
AbstractMode
{
public
suggestSupport
:
Modes
.
ISuggestSupport
;
public
tokenizationSupport
:
Modes
.
ITokenizationSupport
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThreadService
threadService
:
IThreadService
,
@
IEditorWorkerService
editorWorkerService
:
IEditorWorkerService
)
{
super
(
descriptor
,
instantiationService
,
threadService
);
super
(
descriptor
.
id
);
this
.
tokenizationSupport
=
new
TokenizationSupport
(
this
,
{
getInitialState
:
()
=>
new
State
(
this
)
},
false
,
false
);
...
...
src/vs/languages/razor/common/razor.ts
浏览文件 @
ee499ab7
...
...
@@ -11,7 +11,6 @@ import {createWordRegExp, ModeWorkerManager} from 'vs/editor/common/modes/abstra
import
razorTokenTypes
=
require
(
'
vs/languages/razor/common/razorTokenTypes
'
);
import
{
RAZORWorker
}
from
'
vs/languages/razor/common/razorWorker
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThreadService
}
from
'
vs/platform/thread/common/thread
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
import
{
ILeavingNestedModeData
}
from
'
vs/editor/common/modes/supports/tokenizationSupport
'
;
...
...
@@ -58,10 +57,9 @@ export class RAZORMode extends htmlMode.HTMLMode<RAZORWorker> {
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThreadService
threadService
:
IThreadService
,
@
IModeService
modeService
:
IModeService
)
{
super
(
descriptor
,
instantiationService
,
threadService
,
modeService
);
super
(
descriptor
,
instantiationService
,
modeService
);
this
.
formattingSupport
=
null
;
}
...
...
src/vs/languages/sass/common/sass.ts
浏览文件 @
ee499ab7
...
...
@@ -278,7 +278,7 @@ export var language = <Types.ILanguage>{
}
};
export
class
SASSMode
extends
Monarch
.
MonarchMode
<
sassWorker
.
SassWorker
>
implements
Modes
.
IExtraInfoSupport
,
Modes
.
IOutlineSupport
{
export
class
SASSMode
extends
Monarch
.
MonarchMode
implements
Modes
.
IExtraInfoSupport
,
Modes
.
IOutlineSupport
{
public
inplaceReplaceSupport
:
Modes
.
IInplaceReplaceSupport
;
public
configSupport
:
Modes
.
IConfigurationSupport
;
...
...
@@ -291,6 +291,7 @@ export class SASSMode extends Monarch.MonarchMode<sassWorker.SassWorker> impleme
private
modeService
:
IModeService
;
private
_modeWorkerManager
:
ModeWorkerManager
<
sassWorker
.
SassWorker
>
;
private
_threadService
:
IThreadService
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
...
...
@@ -300,8 +301,9 @@ export class SASSMode extends Monarch.MonarchMode<sassWorker.SassWorker> impleme
@
IModelService
modelService
:
IModelService
,
@
IEditorWorkerService
editorWorkerService
:
IEditorWorkerService
)
{
super
(
descriptor
,
Compile
.
compile
(
language
),
instantiationService
,
threadService
,
modeService
,
modelService
,
editorWorkerService
);
super
(
descriptor
.
id
,
Compile
.
compile
(
language
)
,
modeService
,
modelService
,
editorWorkerService
);
this
.
_modeWorkerManager
=
new
ModeWorkerManager
<
sassWorker
.
SassWorker
>
(
descriptor
,
'
vs/languages/sass/common/sassWorker
'
,
'
SassWorker
'
,
'
vs/languages/css/common/cssWorker
'
,
instantiationService
);
this
.
_threadService
=
threadService
;
this
.
modeService
=
modeService
;
...
...
src/vs/languages/typescript/common/typescriptMode.ts
浏览文件 @
ee499ab7
...
...
@@ -128,7 +128,7 @@ class SemanticValidator {
}
}
export
class
TypeScriptMode
<
W
extends
typescriptWorker
.
TypeScriptWorker2
>
extends
AbstractMode
<
W
>
implements
lifecycle
.
IDisposable
{
export
class
TypeScriptMode
<
W
extends
typescriptWorker
.
TypeScriptWorker2
>
extends
AbstractMode
implements
lifecycle
.
IDisposable
{
public
tokenizationSupport
:
Modes
.
ITokenizationSupport
;
public
richEditSupport
:
Modes
.
IRichEditSupport
;
...
...
@@ -151,6 +151,8 @@ export class TypeScriptMode<W extends typescriptWorker.TypeScriptWorker2> extend
private
_projectResolver
:
WinJS
.
TPromise
<
typescript
.
IProjectResolver2
>
;
private
_semanticValidator
:
SemanticValidator
;
private
_modeWorkerManager
:
ModeWorkerManager
<
W
>
;
private
_threadService
:
IThreadService
;
private
_instantiationService
:
IInstantiationService
;
constructor
(
descriptor
:
Modes
.
IModeDescriptor
,
...
...
@@ -158,7 +160,9 @@ export class TypeScriptMode<W extends typescriptWorker.TypeScriptWorker2> extend
@
IThreadService
threadService
:
IThreadService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
)
{
super
(
descriptor
,
instantiationService
,
threadService
);
super
(
descriptor
.
id
);
this
.
_threadService
=
threadService
;
this
.
_instantiationService
=
instantiationService
;
this
.
_telemetryService
=
telemetryService
;
this
.
_modeWorkerManager
=
this
.
_createModeWorkerManager
(
descriptor
,
instantiationService
);
...
...
src/vs/workbench/parts/output/common/outputMode.ts
浏览文件 @
ee499ab7
...
...
@@ -9,7 +9,6 @@ import types = require('vs/editor/common/modes/monarch/monarchTypes');
import
{
compile
}
from
'
vs/editor/common/modes/monarch/monarchCompile
'
;
import
{
IModeDescriptor
}
from
'
vs/editor/common/modes
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IThreadService
}
from
'
vs/platform/thread/common/thread
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
OutputWorker
}
from
'
vs/workbench/parts/output/common/outputWorker
'
;
...
...
@@ -44,7 +43,7 @@ export const language: types.ILanguage = {
}
};
export
class
OutputMode
extends
MonarchMode
<
OutputWorker
>
{
export
class
OutputMode
extends
MonarchMode
{
public
linkSupport
:
Modes
.
ILinkSupport
;
...
...
@@ -53,12 +52,11 @@ export class OutputMode extends MonarchMode<OutputWorker> {
constructor
(
descriptor
:
IModeDescriptor
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IThreadService
threadService
:
IThreadService
,
@
IModeService
modeService
:
IModeService
,
@
IModelService
modelService
:
IModelService
,
@
IEditorWorkerService
editorWorkerService
:
IEditorWorkerService
)
{
super
(
descriptor
,
compile
(
language
),
instantiationService
,
threadService
,
modeService
,
modelService
,
editorWorkerService
);
super
(
descriptor
.
id
,
compile
(
language
)
,
modeService
,
modelService
,
editorWorkerService
);
this
.
_modeWorkerManager
=
new
ModeWorkerManager
<
OutputWorker
>
(
descriptor
,
'
vs/workbench/parts/output/common/outputWorker
'
,
'
OutputWorker
'
,
null
,
instantiationService
);
this
.
linkSupport
=
this
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录