Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
bdaa72b8
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 搜索 >>
提交
bdaa72b8
编写于
7月 12, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ext host - extend *Shape classes
上级
581c260f
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
80 addition
and
43 deletion
+80
-43
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+4
-4
src/vs/workbench/api/node/extHostCommands.ts
src/vs/workbench/api/node/extHostCommands.ts
+3
-2
src/vs/workbench/api/node/extHostConfiguration.ts
src/vs/workbench/api/node/extHostConfiguration.ts
+3
-1
src/vs/workbench/api/node/extHostDiagnostics.ts
src/vs/workbench/api/node/extHostDiagnostics.ts
+3
-2
src/vs/workbench/api/node/extHostDocuments.ts
src/vs/workbench/api/node/extHostDocuments.ts
+3
-2
src/vs/workbench/api/node/extHostEditors.ts
src/vs/workbench/api/node/extHostEditors.ts
+3
-2
src/vs/workbench/api/node/extHostFileSystemEventService.ts
src/vs/workbench/api/node/extHostFileSystemEventService.ts
+3
-2
src/vs/workbench/api/node/extHostLanguageFeatures.ts
src/vs/workbench/api/node/extHostLanguageFeatures.ts
+3
-2
src/vs/workbench/api/node/extHostQuickOpen.ts
src/vs/workbench/api/node/extHostQuickOpen.ts
+3
-2
src/vs/workbench/api/node/mainThreadCommands.ts
src/vs/workbench/api/node/mainThreadCommands.ts
+3
-2
src/vs/workbench/api/node/mainThreadConfiguration.ts
src/vs/workbench/api/node/mainThreadConfiguration.ts
+3
-2
src/vs/workbench/api/node/mainThreadDiagnostics.ts
src/vs/workbench/api/node/mainThreadDiagnostics.ts
+3
-1
src/vs/workbench/api/node/mainThreadDocuments.ts
src/vs/workbench/api/node/mainThreadDocuments.ts
+3
-2
src/vs/workbench/api/node/mainThreadEditors.ts
src/vs/workbench/api/node/mainThreadEditors.ts
+3
-2
src/vs/workbench/api/node/mainThreadErrors.ts
src/vs/workbench/api/node/mainThreadErrors.ts
+2
-1
src/vs/workbench/api/node/mainThreadLanguageFeatures.ts
src/vs/workbench/api/node/mainThreadLanguageFeatures.ts
+3
-2
src/vs/workbench/api/node/mainThreadLanguages.ts
src/vs/workbench/api/node/mainThreadLanguages.ts
+3
-1
src/vs/workbench/api/node/mainThreadMessageService.ts
src/vs/workbench/api/node/mainThreadMessageService.ts
+3
-1
src/vs/workbench/api/node/mainThreadOutputService.ts
src/vs/workbench/api/node/mainThreadOutputService.ts
+3
-1
src/vs/workbench/api/node/mainThreadQuickOpen.ts
src/vs/workbench/api/node/mainThreadQuickOpen.ts
+7
-3
src/vs/workbench/api/node/mainThreadStatusBar.ts
src/vs/workbench/api/node/mainThreadStatusBar.ts
+3
-1
src/vs/workbench/api/node/mainThreadStorage.ts
src/vs/workbench/api/node/mainThreadStorage.ts
+3
-1
src/vs/workbench/api/node/mainThreadTelemetry.ts
src/vs/workbench/api/node/mainThreadTelemetry.ts
+3
-1
src/vs/workbench/api/node/mainThreadWorkspace.ts
src/vs/workbench/api/node/mainThreadWorkspace.ts
+7
-3
未找到文件。
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
bdaa72b8
...
...
@@ -181,10 +181,10 @@ export abstract class MainThreadWorkspaceShape {
}
export
abstract
class
MainProcessExtensionServiceShape
{
public
$onExtensionHostReady
(
extensionDescriptions
:
IExtensionDescription
[],
messages
:
IMessage
[]):
TPromise
<
void
>
{
throw
ni
();
}
public
$localShowMessage
(
severity
:
Severity
,
msg
:
string
):
void
{
throw
ni
();
}
public
$onExtensionActivated
(
extensionId
:
string
):
void
{
throw
ni
();
}
public
$onExtensionActivationFailed
(
extensionId
:
string
):
void
{
throw
ni
();
}
$onExtensionHostReady
(
extensionDescriptions
:
IExtensionDescription
[],
messages
:
IMessage
[]):
TPromise
<
void
>
{
throw
ni
();
}
$localShowMessage
(
severity
:
Severity
,
msg
:
string
):
void
{
throw
ni
();
}
$onExtensionActivated
(
extensionId
:
string
):
void
{
throw
ni
();
}
$onExtensionActivationFailed
(
extensionId
:
string
):
void
{
throw
ni
();
}
}
// -- extension host
...
...
src/vs/workbench/api/node/extHostCommands.ts
浏览文件 @
bdaa72b8
...
...
@@ -12,7 +12,7 @@ import {ExtHostEditors} from 'vs/workbench/api/node/extHostEditors';
import
*
as
extHostTypes
from
'
vs/workbench/api/node/extHostTypes
'
;
import
*
as
extHostTypeConverter
from
'
vs/workbench/api/node/extHostTypeConverters
'
;
import
{
cloneAndChange
}
from
'
vs/base/common/objects
'
;
import
{
MainContext
,
MainThreadCommandsShape
}
from
'
./extHost.protocol
'
;
import
{
MainContext
,
MainThreadCommandsShape
,
ExtHostCommandsShape
}
from
'
./extHost.protocol
'
;
interface
CommandHandler
{
callback
:
Function
;
...
...
@@ -20,7 +20,7 @@ interface CommandHandler {
description
:
ICommandHandlerDescription
;
}
export
class
ExtHostCommands
{
export
class
ExtHostCommands
extends
ExtHostCommandsShape
{
private
_commands
:
{
[
n
:
string
]:
CommandHandler
}
=
Object
.
create
(
null
);
private
_proxy
:
MainThreadCommandsShape
;
...
...
@@ -30,6 +30,7 @@ export class ExtHostCommands {
threadService
:
IThreadService
,
extHostEditors
:
ExtHostEditors
)
{
super
();
this
.
_extHostEditors
=
extHostEditors
;
this
.
_proxy
=
threadService
.
get
(
MainContext
.
MainThreadCommands
);
}
...
...
src/vs/workbench/api/node/extHostConfiguration.ts
浏览文件 @
bdaa72b8
...
...
@@ -8,14 +8,16 @@ import {clone} from 'vs/base/common/objects';
import
{
illegalState
}
from
'
vs/base/common/errors
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
WorkspaceConfiguration
}
from
'
vscode
'
;
import
{
ExtHostConfigurationShape
}
from
'
./extHost.protocol
'
;
export
class
ExtHostConfiguration
{
export
class
ExtHostConfiguration
extends
ExtHostConfigurationShape
{
private
_config
:
any
;
private
_hasConfig
:
boolean
;
private
_onDidChangeConfiguration
:
Emitter
<
void
>
;
constructor
()
{
super
();
this
.
_onDidChangeConfiguration
=
new
Emitter
<
void
>
();
}
...
...
src/vs/workbench/api/node/extHostDiagnostics.ts
浏览文件 @
bdaa72b8
...
...
@@ -9,7 +9,7 @@ import {IMarkerData} from 'vs/platform/markers/common/markers';
import
URI
from
'
vs/base/common/uri
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
*
as
vscode
from
'
vscode
'
;
import
{
MainContext
,
MainThreadDiagnosticsShape
}
from
'
./extHost.protocol
'
;
import
{
MainContext
,
MainThreadDiagnosticsShape
,
ExtHostDiagnosticsShape
}
from
'
./extHost.protocol
'
;
export
class
DiagnosticCollection
implements
vscode
.
DiagnosticCollection
{
...
...
@@ -175,7 +175,7 @@ export class DiagnosticCollection implements vscode.DiagnosticCollection {
}
}
export
class
ExtHostDiagnostics
{
export
class
ExtHostDiagnostics
extends
ExtHostDiagnosticsShape
{
private
static
_idPool
:
number
=
0
;
...
...
@@ -183,6 +183,7 @@ export class ExtHostDiagnostics {
private
_collections
:
DiagnosticCollection
[];
constructor
(
threadService
:
IThreadService
)
{
super
();
this
.
_proxy
=
threadService
.
get
(
MainContext
.
MainThreadDiagnostics
);
this
.
_collections
=
[];
}
...
...
src/vs/workbench/api/node/extHostDocuments.ts
浏览文件 @
bdaa72b8
...
...
@@ -17,7 +17,7 @@ import {TPromise} from 'vs/base/common/winjs.base';
import
*
as
vscode
from
'
vscode
'
;
import
{
asWinJsPromise
}
from
'
vs/base/common/async
'
;
import
{
getWordAtText
,
ensureValidWordDefinition
}
from
'
vs/editor/common/model/wordHelper
'
;
import
{
MainContext
,
MainThreadDocumentsShape
,
IModelAddedData
}
from
'
./extHost.protocol
'
;
import
{
MainContext
,
MainThreadDocumentsShape
,
ExtHostDocumentsShape
,
IModelAddedData
}
from
'
./extHost.protocol
'
;
const
_modeId2WordDefinition
:
{
[
modeId
:
string
]:
RegExp
;
...
...
@@ -31,7 +31,7 @@ function getWordDefinitionFor(modeId: string): RegExp {
return
_modeId2WordDefinition
[
modeId
];
}
export
class
ExtHostDocuments
{
export
class
ExtHostDocuments
extends
ExtHostDocumentsShape
{
private
static
_handlePool
:
number
=
0
;
...
...
@@ -54,6 +54,7 @@ export class ExtHostDocuments {
private
_proxy
:
MainThreadDocumentsShape
;
constructor
(
threadService
:
IThreadService
)
{
super
();
this
.
_proxy
=
threadService
.
get
(
MainContext
.
MainThreadDocuments
);
this
.
_onDidAddDocumentEventEmitter
=
new
Emitter
<
vscode
.
TextDocument
>
();
...
...
src/vs/workbench/api/node/extHostEditors.ts
浏览文件 @
bdaa72b8
...
...
@@ -16,9 +16,9 @@ import {ISingleEditOperation, ISelection} from 'vs/editor/common/editorCommon';
import
{
IResolvedTextEditorConfiguration
}
from
'
vs/workbench/api/node/mainThreadEditorsTracker
'
;
import
*
as
TypeConverters
from
'
./extHostTypeConverters
'
;
import
{
TextDocument
,
TextEditorSelectionChangeEvent
,
TextEditorOptionsChangeEvent
,
TextEditorOptions
,
TextEditorViewColumnChangeEvent
,
ViewColumn
}
from
'
vscode
'
;
import
{
MainContext
,
MainThreadEditorsShape
,
ITextEditorAddData
,
ITextEditorPositionData
}
from
'
./extHost.protocol
'
;
import
{
MainContext
,
MainThreadEditorsShape
,
ExtHostEditorsShape
,
ITextEditorAddData
,
ITextEditorPositionData
}
from
'
./extHost.protocol
'
;
export
class
ExtHostEditors
{
export
class
ExtHostEditors
extends
ExtHostEditorsShape
{
public
onDidChangeTextEditorSelection
:
Event
<
TextEditorSelectionChangeEvent
>
;
private
_onDidChangeTextEditorSelection
:
Emitter
<
TextEditorSelectionChangeEvent
>
;
...
...
@@ -40,6 +40,7 @@ export class ExtHostEditors {
threadService
:
IThreadService
,
extHostDocuments
:
ExtHostDocuments
)
{
super
();
this
.
_onDidChangeTextEditorSelection
=
new
Emitter
<
TextEditorSelectionChangeEvent
>
();
this
.
onDidChangeTextEditorSelection
=
this
.
_onDidChangeTextEditorSelection
.
event
;
...
...
src/vs/workbench/api/node/extHostFileSystemEventService.ts
浏览文件 @
bdaa72b8
...
...
@@ -8,7 +8,7 @@ import Event, {Emitter} from 'vs/base/common/event';
import
{
Disposable
}
from
'
./extHostTypes
'
;
import
{
match
}
from
'
vs/base/common/glob
'
;
import
{
Uri
,
FileSystemWatcher
as
_FileSystemWatcher
}
from
'
vscode
'
;
import
{
FileSystemEvents
}
from
'
./extHost.protocol
'
;
import
{
FileSystemEvents
,
ExtHostFileSystemEventServiceShape
}
from
'
./extHost.protocol
'
;
export
class
FileSystemWatcher
implements
_FileSystemWatcher
{
...
...
@@ -87,11 +87,12 @@ export class FileSystemWatcher implements _FileSystemWatcher {
}
}
export
class
ExtHostFileSystemEventService
{
export
class
ExtHostFileSystemEventService
extends
ExtHostFileSystemEventServiceShape
{
private
_emitter
=
new
Emitter
<
FileSystemEvents
>
();
constructor
()
{
super
();
}
public
createFileSystemWatcher
(
globPattern
:
string
,
ignoreCreateEvents
?:
boolean
,
ignoreChangeEvents
?:
boolean
,
ignoreDeleteEvents
?:
boolean
):
_FileSystemWatcher
{
...
...
src/vs/workbench/api/node/extHostLanguageFeatures.ts
浏览文件 @
bdaa72b8
...
...
@@ -18,7 +18,7 @@ import {ExtHostCommands} from 'vs/workbench/api/node/extHostCommands';
import
{
ExtHostDiagnostics
}
from
'
vs/workbench/api/node/extHostDiagnostics
'
;
import
{
INavigateTypesSupport
,
ITypeBearing
}
from
'
vs/workbench/parts/search/common/search
'
;
import
{
asWinJsPromise
,
ShallowCancelThenPromise
}
from
'
vs/base/common/async
'
;
import
{
MainContext
,
MainThreadLanguageFeaturesShape
}
from
'
./extHost.protocol
'
;
import
{
MainContext
,
MainThreadLanguageFeaturesShape
,
ExtHostLanguageFeaturesShape
}
from
'
./extHost.protocol
'
;
import
{
regExpLeadsToEndlessLoop
}
from
'
vs/base/common/strings
'
;
// --- adapter
...
...
@@ -593,7 +593,7 @@ type Adapter = OutlineAdapter | CodeLensAdapter | DefinitionAdapter | HoverAdapt
|
RangeFormattingAdapter
|
OnTypeFormattingAdapter
|
NavigateTypeAdapter
|
RenameAdapter
|
SuggestAdapter
|
SignatureHelpAdapter
;
export
class
ExtHostLanguageFeatures
{
export
class
ExtHostLanguageFeatures
extends
ExtHostLanguageFeaturesShape
{
private
static
_handlePool
:
number
=
0
;
...
...
@@ -609,6 +609,7 @@ export class ExtHostLanguageFeatures {
commands
:
ExtHostCommands
,
diagnostics
:
ExtHostDiagnostics
)
{
super
();
this
.
_proxy
=
threadService
.
get
(
MainContext
.
MainThreadLanguageFeatures
);
this
.
_documents
=
documents
;
this
.
_commands
=
commands
;
...
...
src/vs/workbench/api/node/extHostQuickOpen.ts
浏览文件 @
bdaa72b8
...
...
@@ -7,17 +7,18 @@
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IThreadService
}
from
'
vs/workbench/services/thread/common/threadService
'
;
import
{
QuickPickOptions
,
QuickPickItem
,
InputBoxOptions
}
from
'
vscode
'
;
import
{
MainContext
,
MainThreadQuickOpenShape
,
MyQuickPickItems
}
from
'
./extHost.protocol
'
;
import
{
MainContext
,
MainThreadQuickOpenShape
,
ExtHostQuickOpenShape
,
MyQuickPickItems
}
from
'
./extHost.protocol
'
;
export
type
Item
=
string
|
QuickPickItem
;
export
class
ExtHostQuickOpen
{
export
class
ExtHostQuickOpen
extends
ExtHostQuickOpenShape
{
private
_proxy
:
MainThreadQuickOpenShape
;
private
_onDidSelectItem
:
(
handle
:
number
)
=>
void
;
private
_validateInput
:
(
input
:
string
)
=>
string
;
constructor
(
threadService
:
IThreadService
)
{
super
();
this
.
_proxy
=
threadService
.
get
(
MainContext
.
MainThreadQuickOpen
);
}
...
...
src/vs/workbench/api/node/mainThreadCommands.ts
浏览文件 @
bdaa72b8
...
...
@@ -7,9 +7,9 @@
import
{
IThreadService
}
from
'
vs/workbench/services/thread/common/threadService
'
;
import
{
ICommandService
,
CommandsRegistry
,
ICommandHandlerDescription
}
from
'
vs/platform/commands/common/commands
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
ExtHostContext
,
ExtHostCommandsShape
}
from
'
./extHost.protocol
'
;
import
{
ExtHostContext
,
MainThreadCommandsShape
,
ExtHostCommandsShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadCommands
{
export
class
MainThreadCommands
extends
MainThreadCommandsShape
{
private
_proxy
:
ExtHostCommandsShape
;
...
...
@@ -17,6 +17,7 @@ export class MainThreadCommands {
@
IThreadService
private
_threadService
:
IThreadService
,
@
ICommandService
private
_commandService
:
ICommandService
)
{
super
();
this
.
_proxy
=
this
.
_threadService
.
get
(
ExtHostContext
.
ExtHostCommands
);
}
...
...
src/vs/workbench/api/node/mainThreadConfiguration.ts
浏览文件 @
bdaa72b8
...
...
@@ -7,9 +7,9 @@
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IThreadService
}
from
'
vs/workbench/services/thread/common/threadService
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ExtHostContext
,
ExtHostConfigurationShape
}
from
'
./extHost.protocol
'
;
import
{
MainThreadConfigurationShape
,
ExtHostContext
,
ExtHostConfigurationShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadConfiguration
{
export
class
MainThreadConfiguration
extends
MainThreadConfigurationShape
{
private
_configurationService
:
IConfigurationService
;
private
_toDispose
:
IDisposable
;
...
...
@@ -19,6 +19,7 @@ export class MainThreadConfiguration {
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IThreadService
threadService
:
IThreadService
)
{
super
();
this
.
_configurationService
=
configurationService
;
this
.
_proxy
=
threadService
.
get
(
ExtHostContext
.
ExtHostConfiguration
);
...
...
src/vs/workbench/api/node/mainThreadDiagnostics.ts
浏览文件 @
bdaa72b8
...
...
@@ -7,12 +7,14 @@
import
{
IMarkerService
,
IMarkerData
}
from
'
vs/platform/markers/common/markers
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
MainThreadDiagnosticsShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadDiagnostics
{
export
class
MainThreadDiagnostics
extends
MainThreadDiagnosticsShape
{
private
_markerService
:
IMarkerService
;
constructor
(@
IMarkerService
markerService
:
IMarkerService
)
{
super
();
this
.
_markerService
=
markerService
;
}
...
...
src/vs/workbench/api/node/mainThreadDocuments.ts
浏览文件 @
bdaa72b8
...
...
@@ -19,9 +19,9 @@ import {IFileService} from 'vs/platform/files/common/files';
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IUntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
ResourceEditorInput
}
from
'
vs/workbench/common/editor/resourceEditorInput
'
;
import
{
ExtHostContext
,
ExtHostDocumentsShape
}
from
'
./extHost.protocol
'
;
import
{
ExtHostContext
,
MainThreadDocumentsShape
,
ExtHostDocumentsShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadDocuments
{
export
class
MainThreadDocuments
extends
MainThreadDocumentsShape
{
private
_modelService
:
IModelService
;
private
_modeService
:
IModeService
;
private
_textFileService
:
ITextFileService
;
...
...
@@ -45,6 +45,7 @@ export class MainThreadDocuments {
@
IFileService
fileService
:
IFileService
,
@
IUntitledEditorService
untitledEditorService
:
IUntitledEditorService
)
{
super
();
this
.
_modelService
=
modelService
;
this
.
_modeService
=
modeService
;
this
.
_textFileService
=
textFileService
;
...
...
src/vs/workbench/api/node/mainThreadEditors.ts
浏览文件 @
bdaa72b8
...
...
@@ -20,9 +20,9 @@ import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
import
{
IEventService
}
from
'
vs/platform/event/common/event
'
;
import
{
equals
as
arrayEquals
}
from
'
vs/base/common/arrays
'
;
import
{
equals
as
objectEquals
}
from
'
vs/base/common/objects
'
;
import
{
ExtHostContext
,
ExtHostEditorsShape
,
ITextEditorPositionData
}
from
'
./extHost.protocol
'
;
import
{
ExtHostContext
,
MainThreadEditorsShape
,
ExtHostEditorsShape
,
ITextEditorPositionData
}
from
'
./extHost.protocol
'
;
export
class
MainThreadEditors
{
export
class
MainThreadEditors
extends
MainThreadEditorsShape
{
private
_proxy
:
ExtHostEditorsShape
;
private
_workbenchEditorService
:
IWorkbenchEditorService
;
...
...
@@ -44,6 +44,7 @@ export class MainThreadEditors {
@
IEventService
eventService
:
IEventService
,
@
IModelService
modelService
:
IModelService
)
{
super
();
this
.
_proxy
=
threadService
.
get
(
ExtHostContext
.
ExtHostEditors
);
this
.
_workbenchEditorService
=
workbenchEditorService
;
this
.
_telemetryService
=
telemetryService
;
...
...
src/vs/workbench/api/node/mainThreadErrors.ts
浏览文件 @
bdaa72b8
...
...
@@ -5,8 +5,9 @@
'
use strict
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
{
MainThreadErrorsShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadErrors
{
export
class
MainThreadErrors
extends
MainThreadErrorsShape
{
public
onUnexpectedExtHostError
(
err
:
any
):
void
{
errors
.
onUnexpectedError
(
err
);
...
...
src/vs/workbench/api/node/mainThreadLanguageFeatures.ts
浏览文件 @
bdaa72b8
...
...
@@ -15,15 +15,16 @@ import {wireCancellationToken} from 'vs/base/common/async';
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
Position
as
EditorPosition
}
from
'
vs/editor/common/core/position
'
;
import
{
Range
as
EditorRange
}
from
'
vs/editor/common/core/range
'
;
import
{
ExtHostContext
,
ExtHostLanguageFeaturesShape
}
from
'
./extHost.protocol
'
;
import
{
ExtHostContext
,
MainThreadLanguageFeaturesShape
,
ExtHostLanguageFeaturesShape
}
from
'
./extHost.protocol
'
;
import
{
LanguageConfigurationRegistry
,
LanguageConfiguration
}
from
'
vs/editor/common/modes/languageConfigurationRegistry
'
;
export
class
MainThreadLanguageFeatures
{
export
class
MainThreadLanguageFeatures
extends
MainThreadLanguageFeaturesShape
{
private
_proxy
:
ExtHostLanguageFeaturesShape
;
private
_registrations
:
{
[
handle
:
number
]:
IDisposable
;
}
=
Object
.
create
(
null
);
constructor
(
@
IThreadService
threadService
:
IThreadService
)
{
super
();
this
.
_proxy
=
threadService
.
get
(
ExtHostContext
.
ExtHostLanguageFeatures
);
}
...
...
src/vs/workbench/api/node/mainThreadLanguages.ts
浏览文件 @
bdaa72b8
...
...
@@ -6,14 +6,16 @@
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
MainThreadLanguagesShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadLanguages
{
export
class
MainThreadLanguages
extends
MainThreadLanguagesShape
{
private
_modeService
:
IModeService
;
constructor
(
@
IModeService
modeService
:
IModeService
)
{
super
();
this
.
_modeService
=
modeService
;
}
...
...
src/vs/workbench/api/node/mainThreadMessageService.ts
浏览文件 @
bdaa72b8
...
...
@@ -9,12 +9,14 @@ import {IMessageService} from 'vs/platform/message/common/message';
import
Severity
from
'
vs/base/common/severity
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
TPromise
as
Promise
}
from
'
vs/base/common/winjs.base
'
;
import
{
MainThreadMessageServiceShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadMessageService
{
export
class
MainThreadMessageService
extends
MainThreadMessageServiceShape
{
private
_messageService
:
IMessageService
;
constructor
(@
IMessageService
messageService
:
IMessageService
)
{
super
();
this
.
_messageService
=
messageService
;
}
...
...
src/vs/workbench/api/node/mainThreadOutputService.ts
浏览文件 @
bdaa72b8
...
...
@@ -9,8 +9,9 @@ import {Registry} from 'vs/platform/platform';
import
{
IOutputService
,
IOutputChannel
,
OUTPUT_PANEL_ID
,
Extensions
,
IOutputChannelRegistry
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
MainThreadOutputServiceShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadOutputService
{
export
class
MainThreadOutputService
extends
MainThreadOutputServiceShape
{
private
_outputService
:
IOutputService
;
private
_partService
:
IPartService
;
...
...
@@ -20,6 +21,7 @@ export class MainThreadOutputService {
@
IPartService
partService
:
IPartService
,
@
IPanelService
panelService
:
IPanelService
)
{
super
();
this
.
_outputService
=
outputService
;
this
.
_partService
=
partService
;
this
.
_panelService
=
panelService
;
...
...
src/vs/workbench/api/node/mainThreadQuickOpen.ts
浏览文件 @
bdaa72b8
...
...
@@ -8,9 +8,9 @@ import {TPromise} from 'vs/base/common/winjs.base';
import
{
IThreadService
}
from
'
vs/workbench/services/thread/common/threadService
'
;
import
{
IQuickOpenService
,
IPickOptions
,
IInputOptions
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
InputBoxOptions
}
from
'
vscode
'
;
import
{
ExtHostContext
,
ExtHostQuickOpenShape
,
MyQuickPickItems
}
from
'
./extHost.protocol
'
;
import
{
ExtHostContext
,
MainThreadQuickOpenShape
,
ExtHostQuickOpenShape
,
MyQuickPickItems
}
from
'
./extHost.protocol
'
;
export
class
MainThreadQuickOpen
{
export
class
MainThreadQuickOpen
extends
MainThreadQuickOpenShape
{
private
_proxy
:
ExtHostQuickOpenShape
;
private
_quickOpenService
:
IQuickOpenService
;
...
...
@@ -19,7 +19,11 @@ export class MainThreadQuickOpen {
private
_contents
:
TPromise
<
MyQuickPickItems
[]
>
;
private
_token
:
number
=
0
;
constructor
(
@
IThreadService
threadService
:
IThreadService
,
@
IQuickOpenService
quickOpenService
:
IQuickOpenService
)
{
constructor
(
@
IThreadService
threadService
:
IThreadService
,
@
IQuickOpenService
quickOpenService
:
IQuickOpenService
)
{
super
();
this
.
_proxy
=
threadService
.
get
(
ExtHostContext
.
ExtHostQuickOpen
);
this
.
_quickOpenService
=
quickOpenService
;
}
...
...
src/vs/workbench/api/node/mainThreadStatusBar.ts
浏览文件 @
bdaa72b8
...
...
@@ -6,13 +6,15 @@
import
{
IStatusbarService
,
StatusbarAlignment
as
MainThreadStatusBarAlignment
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
MainThreadStatusBarShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadStatusBar
{
export
class
MainThreadStatusBar
extends
MainThreadStatusBarShape
{
private
mapIdToDisposable
:
{
[
id
:
number
]:
IDisposable
};
constructor
(
@
IStatusbarService
private
statusbarService
:
IStatusbarService
)
{
super
();
this
.
mapIdToDisposable
=
Object
.
create
(
null
);
}
...
...
src/vs/workbench/api/node/mainThreadStorage.ts
浏览文件 @
bdaa72b8
...
...
@@ -6,12 +6,14 @@
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
MainThreadStorageShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadStorage
{
export
class
MainThreadStorage
extends
MainThreadStorageShape
{
private
_storageService
:
IStorageService
;
constructor
(
@
IStorageService
storageService
:
IStorageService
)
{
super
();
this
.
_storageService
=
storageService
;
}
...
...
src/vs/workbench/api/node/mainThreadTelemetry.ts
浏览文件 @
bdaa72b8
...
...
@@ -6,15 +6,17 @@
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
ITelemetryService
,
ITelemetryInfo
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
MainThreadTelemetryShape
}
from
'
./extHost.protocol
'
;
/**
* Helper always instantiated in the main process to receive telemetry events from remote telemetry services
*/
export
class
MainThreadTelemetry
{
export
class
MainThreadTelemetry
extends
MainThreadTelemetryShape
{
private
_telemetryService
:
ITelemetryService
;
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
)
{
super
();
this
.
_telemetryService
=
telemetryService
;
}
...
...
src/vs/workbench/api/node/mainThreadWorkspace.ts
浏览文件 @
bdaa72b8
...
...
@@ -14,8 +14,9 @@ import {ICommonCodeEditor} from 'vs/editor/common/editorCommon';
import
{
bulkEdit
,
IResourceEdit
}
from
'
vs/editor/common/services/bulkEdit
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Uri
}
from
'
vscode
'
;
import
{
MainThreadWorkspaceShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadWorkspace
{
export
class
MainThreadWorkspace
extends
MainThreadWorkspaceShape
{
private
_activeSearches
:
{
[
id
:
number
]:
TPromise
<
Uri
[]
>
}
=
Object
.
create
(
null
);
private
_searchService
:
ISearchService
;
...
...
@@ -24,11 +25,14 @@ export class MainThreadWorkspace {
private
_editorService
:
IWorkbenchEditorService
;
private
_eventService
:
IEventService
;
constructor
(
@
ISearchService
searchService
:
ISearchService
,
constructor
(
@
ISearchService
searchService
:
ISearchService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
ITextFileService
textFileService
,
@
IWorkbenchEditorService
editorService
,
@
IEventService
eventService
)
{
@
IEventService
eventService
)
{
super
();
this
.
_searchService
=
searchService
;
this
.
_workspace
=
contextService
.
getWorkspace
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录