@@ -8,23 +8,23 @@ import {MainInplaceReplaceSupport, ReplaceSupport, IBracketElectricCharacterCont
88import { score } from 'vs/editor/common/modes/languageSelector' ;
99import { Remotable , IThreadService } from 'vs/platform/thread/common/thread' ;
1010import * as errors from 'vs/base/common/errors' ;
11- import { PluginHostFileSystemEventService } from 'vs/workbench/api/common/pluginHostFileSystemEventService ' ;
12- import { PluginHostModelService , setWordDefinitionFor } from 'vs/workbench/api/common/pluginHostDocuments ' ;
13- import { PluginHostConfiguration } from 'vs/workbench/api/common/pluginHostConfiguration ' ;
14- import { PluginHostDiagnostics } from 'vs/workbench/api/common/pluginHostDiagnostics ' ;
15- import { PluginHostWorkspace } from 'vs/workbench/api/common/pluginHostWorkspace ' ;
16- import { PluginHostQuickOpen } from 'vs/workbench/api/browser/pluginHostQuickOpen ' ;
17- import { PluginHostStatusBar } from 'vs/workbench/api/browser/pluginHostStatusBar ' ;
18- import { PluginHostCommands } from 'vs/workbench/api/common/pluginHostCommands ' ;
11+ import { ExtHostFileSystemEventService } from 'vs/workbench/api/common/extHostFileSystemEventService ' ;
12+ import { ExtHostModelService , setWordDefinitionFor } from 'vs/workbench/api/common/extHostDocuments ' ;
13+ import { ExtHostConfiguration } from 'vs/workbench/api/common/extHostConfiguration ' ;
14+ import { ExtHostDiagnostics } from 'vs/workbench/api/common/extHostDiagnostics ' ;
15+ import { ExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace ' ;
16+ import { ExtHostQuickOpen } from 'vs/workbench/api/browser/extHostQuickOpen ' ;
17+ import { ExtHostStatusBar } from 'vs/workbench/api/browser/extHostStatusBar ' ;
18+ import { ExtHostCommands } from 'vs/workbench/api/common/extHostCommands ' ;
1919import { ExtHostOutputService } from 'vs/workbench/api/common/extHostOutputService' ;
20- import { PluginHostMessageService } from 'vs/workbench/api/common/pluginHostMessageService' ;
21- import { PluginHostTelemetryService } from 'vs/workbench/api/common/pluginHostTelemetry' ;
22- import { PluginHostEditors } from 'vs/workbench/api/common/pluginHostEditors' ;
20+ import { ExtHostMessageService } from 'vs/workbench/api/common/extHostMessageService' ;
21+ import { ExtHostEditors } from 'vs/workbench/api/common/extHostEditors' ;
2322import { ExtHostLanguages } from 'vs/workbench/api/common/extHostLanguages' ;
2423import { ExtHostLanguageFeatures } from 'vs/workbench/api/common/extHostLanguageFeatures' ;
2524import { ExtHostApiCommands } from 'vs/workbench/api/common/extHostApiCommands' ;
26- import * as extHostTypes from 'vs/workbench/api/common/pluginHostTypes ' ;
25+ import * as extHostTypes from 'vs/workbench/api/common/extHostTypes ' ;
2726import 'vs/workbench/api/common/pluginHostTypes.marshalling' ;
27+ import * as TypeConverters from 'vs/workbench/api/common/extHostTypeConverters' ;
2828import { wrapAsWinJSPromise } from 'vs/base/common/async' ;
2929import Modes = require( 'vs/editor/common/modes' ) ;
3030import { IModelService } from 'vs/editor/common/services/modelService' ;
@@ -39,7 +39,6 @@ import {IPluginService, IPluginDescription} from 'vs/platform/plugins/common/plu
3939import { PluginsRegistry } from 'vs/platform/plugins/common/pluginsRegistry' ;
4040import { relative } from 'path' ;
4141import { TPromise } from 'vs/base/common/winjs.base' ;
42- import * as TypeConverters from 'vs/workbench/api/common/pluginHostTypeConverters' ;
4342import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
4443import { CancellationTokenSource } from 'vs/base/common/cancellation' ;
4544import vscode = require( 'vscode' ) ;
@@ -50,11 +49,11 @@ import * as paths from 'vs/base/common/paths';
5049 * This class implements the API described in vscode.d.ts,
5150 * for the case of the extensionHost host process
5251 */
53- export class PluginHostAPIImplementation {
52+ export class ExtHostAPIImplementation {
5453
5554 private static _LAST_REGISTER_TOKEN = 0 ;
5655 private static generateDisposeToken ( ) : string {
57- return String ( ++ PluginHostAPIImplementation . _LAST_REGISTER_TOKEN ) ;
56+ return String ( ++ ExtHostAPIImplementation . _LAST_REGISTER_TOKEN ) ;
5857 }
5958
6059 private _threadService : IThreadService ;
@@ -137,7 +136,7 @@ export class PluginHostAPIImplementation {
137136 this . _proxy . onUnexpectedPluginHostError ( errors . transformErrorForSerialization ( err ) ) ;
138137 } ) ;
139138
140- const pluginHostCommands = this . _threadService . getRemotable ( PluginHostCommands ) ;
139+ const pluginHostCommands = this . _threadService . getRemotable ( ExtHostCommands ) ;
141140 this . commands = {
142141 registerCommand < T > ( id : string , command : < T > ( ...args : any [ ] ) => T | Thenable < T > , thisArgs ?: any ) : vscode . Disposable {
143142 return pluginHostCommands . registerCommand ( id , command , thisArgs ) ;
@@ -153,11 +152,10 @@ export class PluginHostAPIImplementation {
153152 }
154153 } ;
155154
156- const pluginHostEditors = this . _threadService . getRemotable ( PluginHostEditors ) ;
157- const pluginHostMessageService = new PluginHostMessageService ( this . _threadService , this . commands ) ;
158- const pluginHostQuickOpen = new PluginHostQuickOpen ( this . _threadService ) ;
159- const pluginHostStatusBar = new PluginHostStatusBar ( this . _threadService ) ;
160- const pluginHostTelemetryService = new PluginHostTelemetryService ( threadService ) ;
155+ const pluginHostEditors = this . _threadService . getRemotable ( ExtHostEditors ) ;
156+ const pluginHostMessageService = new ExtHostMessageService ( this . _threadService , this . commands ) ;
157+ const pluginHostQuickOpen = new ExtHostQuickOpen ( this . _threadService ) ;
158+ const pluginHostStatusBar = new ExtHostStatusBar ( this . _threadService ) ;
161159 const extHostOutputService = new ExtHostOutputService ( this . _threadService ) ;
162160 this . window = {
163161 get activeTextEditor ( ) {
@@ -206,9 +204,9 @@ export class PluginHostAPIImplementation {
206204
207205 //
208206 const workspacePath = contextService . getWorkspace ( ) ? contextService . getWorkspace ( ) . resource . fsPath : undefined ;
209- const pluginHostFileSystemEvent = threadService . getRemotable ( PluginHostFileSystemEventService ) ;
210- const pluginHostWorkspace = new PluginHostWorkspace ( this . _threadService , workspacePath ) ;
211- const pluginHostDocuments = this . _threadService . getRemotable ( PluginHostModelService ) ;
207+ const pluginHostFileSystemEvent = threadService . getRemotable ( ExtHostFileSystemEventService ) ;
208+ const pluginHostWorkspace = new ExtHostWorkspace ( this . _threadService , workspacePath ) ;
209+ const pluginHostDocuments = this . _threadService . getRemotable ( ExtHostModelService ) ;
212210 this . workspace = Object . freeze ( {
213211 get rootPath ( ) {
214212 return pluginHostWorkspace . getPath ( ) ;
@@ -265,9 +263,9 @@ export class PluginHostAPIImplementation {
265263
266264 //
267265 const languages = new ExtHostLanguages ( this . _threadService ) ;
268- const pluginHostDiagnostics = new PluginHostDiagnostics ( this . _threadService ) ;
266+ const pluginHostDiagnostics = new ExtHostDiagnostics ( this . _threadService ) ;
269267 const languageFeatures = threadService . getRemotable ( ExtHostLanguageFeatures ) ;
270- const languageFeatureCommand = new ExtHostApiCommands ( threadService . getRemotable ( PluginHostCommands ) ) ;
268+ const languageFeatureCommand = new ExtHostApiCommands ( threadService . getRemotable ( ExtHostCommands ) ) ;
271269
272270 this . languages = {
273271 createDiagnosticCollection ( name ?: string ) : vscode . DiagnosticCollection {
@@ -326,7 +324,7 @@ export class PluginHostAPIImplementation {
326324 }
327325 } ;
328326
329- var pluginHostConfiguration = threadService . getRemotable ( PluginHostConfiguration ) ;
327+ var pluginHostConfiguration = threadService . getRemotable ( ExtHostConfiguration ) ;
330328
331329 //
332330 this . extensions = {
@@ -339,7 +337,6 @@ export class PluginHostAPIImplementation {
339337 get all ( ) :Extension < any > [ ] {
340338 return PluginsRegistry . getAllPluginDescriptions ( ) . map ( ( desc ) => new Extension ( pluginService , desc ) ) ;
341339 }
342- // getTelemetryInfo: pluginHostTelemetryService.getTelemetryInfo.bind(pluginHostTelemetryService)
343340 }
344341
345342 // Intentionally calling a function for typechecking purposes
@@ -426,31 +423,31 @@ export class PluginHostAPIImplementation {
426423 }
427424
428425 private Modes_CommentsSupport_register ( modeId : string , commentsSupport : ICommentsSupportContribution ) : IDisposable {
429- let disposeToken = PluginHostAPIImplementation . generateDisposeToken ( ) ;
426+ let disposeToken = ExtHostAPIImplementation . generateDisposeToken ( ) ;
430427 this . _proxy . Modes_CommentsSupport_register ( disposeToken , modeId , commentsSupport ) ;
431428 return this . _disposableFromToken ( disposeToken ) ;
432429 }
433430
434431 private Modes_TokenTypeClassificationSupport_register ( modeId : string , tokenTypeClassificationSupport :ITokenTypeClassificationSupportContribution ) : IDisposable {
435- let disposeToken = PluginHostAPIImplementation . generateDisposeToken ( ) ;
432+ let disposeToken = ExtHostAPIImplementation . generateDisposeToken ( ) ;
436433 this . _proxy . Modes_TokenTypeClassificationSupport_register ( disposeToken , modeId , tokenTypeClassificationSupport ) ;
437434 return this . _disposableFromToken ( disposeToken ) ;
438435 }
439436
440437 private Modes_ElectricCharacterSupport_register ( modeId : string , electricCharacterSupport :IBracketElectricCharacterContribution ) : IDisposable {
441- let disposeToken = PluginHostAPIImplementation . generateDisposeToken ( ) ;
438+ let disposeToken = ExtHostAPIImplementation . generateDisposeToken ( ) ;
442439 this . _proxy . Modes_ElectricCharacterSupport_register ( disposeToken , modeId , electricCharacterSupport ) ;
443440 return this . _disposableFromToken ( disposeToken ) ;
444441 }
445442
446443 private Modes_CharacterPairSupport_register ( modeId : string , characterPairSupport :Modes . ICharacterPairContribution ) : IDisposable {
447- let disposeToken = PluginHostAPIImplementation . generateDisposeToken ( ) ;
444+ let disposeToken = ExtHostAPIImplementation . generateDisposeToken ( ) ;
448445 this . _proxy . Modes_CharacterPairSupport_register ( disposeToken , modeId , characterPairSupport ) ;
449446 return this . _disposableFromToken ( disposeToken ) ;
450447 }
451448
452449 private Modes_OnEnterSupport_register ( modeId : string , opts : IOnEnterSupportOptions ) : IDisposable {
453- let disposeToken = PluginHostAPIImplementation . generateDisposeToken ( ) ;
450+ let disposeToken = ExtHostAPIImplementation . generateDisposeToken ( ) ;
454451 this . _proxy . Modes_OnEnterSupport_register ( disposeToken , modeId , opts ) ;
455452 return this . _disposableFromToken ( disposeToken ) ;
456453 }
0 commit comments