mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 04:53:33 +01:00
debt - rename PluginHostXYZ to ExtHostXYZ, do the same for filenames
This commit is contained in:
@@ -8,12 +8,12 @@ import URI from 'vs/base/common/uri';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {IDisposable} from 'vs/base/common/lifecycle';
|
||||
import * as vscode from 'vscode';
|
||||
import * as typeConverters from 'vs/workbench/api/common/pluginHostTypeConverters';
|
||||
import * as types from 'vs/workbench/api/common/pluginHostTypes';
|
||||
import * as typeConverters from 'vs/workbench/api/common/extHostTypeConverters';
|
||||
import * as types from 'vs/workbench/api/common/extHostTypes';
|
||||
import {ISingleEditOperation} from 'vs/editor/common/editorCommon';
|
||||
import * as modes from 'vs/editor/common/modes';
|
||||
import {ICommandHandlerDescription} from 'vs/platform/keybinding/common/keybindingService';
|
||||
import {PluginHostCommands} from 'vs/workbench/api/common/pluginHostCommands';
|
||||
import {ExtHostCommands} from 'vs/workbench/api/common/extHostCommands';
|
||||
import {IQuickFix2} from 'vs/editor/contrib/quickFix/common/quickFix';
|
||||
import {IOutline} from 'vs/editor/contrib/quickOpen/common/quickOpen';
|
||||
import {ITypeBearing} from 'vs/workbench/parts/search/common/search'
|
||||
@@ -21,10 +21,10 @@ import {ICodeLensData} from 'vs/editor/contrib/codelens/common/codelens';
|
||||
|
||||
export class ExtHostApiCommands {
|
||||
|
||||
private _commands: PluginHostCommands;
|
||||
private _commands: ExtHostCommands;
|
||||
private _disposables: IDisposable[] = [];
|
||||
|
||||
constructor(commands: PluginHostCommands) {
|
||||
constructor(commands: ExtHostCommands) {
|
||||
this._commands = commands;
|
||||
|
||||
this._register('vscode.executeWorkspaceSymbolProvider', this._executeWorkspaceSymbolProvider, {
|
||||
|
||||
@@ -13,7 +13,7 @@ import {KeybindingsRegistry} from 'vs/platform/keybinding/common/keybindingsRegi
|
||||
import {KeybindingsUtils} from 'vs/platform/keybinding/common/keybindingsUtils';
|
||||
import {IKeybindingService, ICommandHandlerDescription} from 'vs/platform/keybinding/common/keybindingService';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {PluginHostEditors} from 'vs/workbench/api/common/pluginHostEditors';
|
||||
import {ExtHostEditors} from 'vs/workbench/api/common/extHostEditors';
|
||||
import {IMessageService, Severity} from 'vs/platform/message/common/message';
|
||||
import {canSerialize} from 'vs/base/common/marshalling';
|
||||
import {toErrorMessage} from 'vs/base/common/errors';
|
||||
@@ -25,15 +25,15 @@ interface CommandHandler {
|
||||
description: ICommandHandlerDescription;
|
||||
}
|
||||
|
||||
@Remotable.PluginHostContext('PluginHostCommands')
|
||||
export class PluginHostCommands {
|
||||
@Remotable.PluginHostContext('ExtHostCommands')
|
||||
export class ExtHostCommands {
|
||||
|
||||
private _commands: { [n: string]: CommandHandler } = Object.create(null);
|
||||
private _proxy: MainThreadCommands;
|
||||
private _pluginHostEditors: PluginHostEditors;
|
||||
private _pluginHostEditors: ExtHostEditors;
|
||||
|
||||
constructor(@IThreadService threadService: IThreadService) {
|
||||
this._pluginHostEditors = threadService.getRemotable(PluginHostEditors);
|
||||
this._pluginHostEditors = threadService.getRemotable(ExtHostEditors);
|
||||
this._proxy = threadService.getRemotable(MainThreadCommands);
|
||||
}
|
||||
|
||||
@@ -150,12 +150,12 @@ export class MainThreadCommands {
|
||||
|
||||
private _threadService: IThreadService;
|
||||
private _keybindingService: IKeybindingService;
|
||||
private _proxy: PluginHostCommands;
|
||||
private _proxy: ExtHostCommands;
|
||||
|
||||
constructor( @IThreadService threadService: IThreadService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
this._threadService = threadService;
|
||||
this._keybindingService = keybindingService;
|
||||
this._proxy = this._threadService.getRemotable(PluginHostCommands);
|
||||
this._proxy = this._threadService.getRemotable(ExtHostCommands);
|
||||
}
|
||||
|
||||
$registerCommand(id: string): TPromise<any> {
|
||||
@@ -13,8 +13,8 @@ import Event, {Emitter} from 'vs/base/common/event';
|
||||
import {INullService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {WorkspaceConfiguration} from 'vscode';
|
||||
|
||||
@Remotable.PluginHostContext('PluginHostConfiguration')
|
||||
export class PluginHostConfiguration {
|
||||
@Remotable.PluginHostContext('ExtHostConfiguration')
|
||||
export class ExtHostConfiguration {
|
||||
|
||||
private _config: any;
|
||||
private _hasConfig: boolean;
|
||||
@@ -40,17 +40,17 @@ export class PluginHostConfiguration {
|
||||
}
|
||||
|
||||
const config = section
|
||||
? PluginHostConfiguration._lookUp(section, this._config)
|
||||
? ExtHostConfiguration._lookUp(section, this._config)
|
||||
: this._config;
|
||||
|
||||
|
||||
let result = config ? clone(config) : {};
|
||||
// result = Object.freeze(result);
|
||||
result.has = function(key: string): boolean {
|
||||
return typeof PluginHostConfiguration._lookUp(key, config) !== 'undefined';
|
||||
return typeof ExtHostConfiguration._lookUp(key, config) !== 'undefined';
|
||||
}
|
||||
result.get = function <T>(key: string, defaultValue?: T): T {
|
||||
let result = PluginHostConfiguration._lookUp(key, config);
|
||||
let result = ExtHostConfiguration._lookUp(key, config);
|
||||
if (typeof result === 'undefined') {
|
||||
result = defaultValue;
|
||||
}
|
||||
@@ -78,13 +78,13 @@ export class MainThreadConfiguration {
|
||||
|
||||
private _configurationService: IConfigurationService;
|
||||
private _toDispose: IDisposable[];
|
||||
private _proxy: PluginHostConfiguration;
|
||||
private _proxy: ExtHostConfiguration;
|
||||
|
||||
constructor(@IConfigurationService configurationService: IConfigurationService,
|
||||
@IThreadService threadService: IThreadService) {
|
||||
|
||||
this._configurationService = configurationService;
|
||||
this._proxy = threadService.getRemotable(PluginHostConfiguration);
|
||||
this._proxy = threadService.getRemotable(ExtHostConfiguration);
|
||||
|
||||
this._toDispose = [];
|
||||
this._toDispose.push(this._configurationService.addListener2(ConfigurationServiceEventTypes.UPDATED, (e:IConfigurationServiceEvent) => {
|
||||
@@ -141,7 +141,7 @@ class DiagnosticCollection implements vscode.DiagnosticCollection {
|
||||
}
|
||||
}
|
||||
|
||||
export class PluginHostDiagnostics {
|
||||
export class ExtHostDiagnostics {
|
||||
|
||||
private static _idPool: number = 0;
|
||||
private _proxy: MainThreadDiagnostics;
|
||||
@@ -152,7 +152,7 @@ export class PluginHostDiagnostics {
|
||||
|
||||
createDiagnosticCollection(name: string): vscode.DiagnosticCollection {
|
||||
if (!name) {
|
||||
name = '_generated_diagnostic_collection_name_#' + PluginHostDiagnostics._idPool++;
|
||||
name = '_generated_diagnostic_collection_name_#' + ExtHostDiagnostics._idPool++;
|
||||
}
|
||||
return new DiagnosticCollection(name, this._proxy);
|
||||
}
|
||||
@@ -13,11 +13,11 @@ import {Remotable, IThreadService} from 'vs/platform/thread/common/thread';
|
||||
import Event, {Emitter} from 'vs/base/common/event';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import {IDisposable, disposeAll} from 'vs/base/common/lifecycle';
|
||||
import {Range, Position} from 'vs/workbench/api/common/pluginHostTypes';
|
||||
import {Range, Position} from 'vs/workbench/api/common/extHostTypes';
|
||||
import {IEventService} from 'vs/platform/event/common/event';
|
||||
import {IEditorService} from 'vs/platform/editor/common/editor';
|
||||
import {EventType as FileEventType, LocalFileChangeEvent, ITextFileService, ITextFileOperationResult} from 'vs/workbench/parts/files/common/files';
|
||||
import * as TypeConverters from './pluginHostTypeConverters';
|
||||
import * as TypeConverters from './extHostTypeConverters';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import * as vscode from 'vscode';
|
||||
import {WordHelper} from 'vs/editor/common/model/textModelWithTokensHelpers';
|
||||
@@ -45,8 +45,8 @@ export function getWordDefinitionFor(modeId:string):RegExp {
|
||||
return _modeId2WordDefinition[modeId];
|
||||
}
|
||||
|
||||
@Remotable.PluginHostContext('PluginHostModelService')
|
||||
export class PluginHostModelService {
|
||||
@Remotable.PluginHostContext('ExtHostModelService')
|
||||
export class ExtHostModelService {
|
||||
|
||||
private _onDidAddDocumentEventEmitter: Emitter<BaseTextDocument>;
|
||||
public onDidAddDocument: Event<BaseTextDocument>;
|
||||
@@ -60,7 +60,7 @@ export class PluginHostModelService {
|
||||
private _onDidSaveDocumentEventEmitter: Emitter<BaseTextDocument>;
|
||||
public onDidSaveDocument: Event<BaseTextDocument>;
|
||||
|
||||
private _documents: {[modelUri:string]:PluginHostDocument;};
|
||||
private _documents: {[modelUri:string]:ExtHostDocument;};
|
||||
|
||||
private _proxy: MainThreadDocuments;
|
||||
|
||||
@@ -118,7 +118,7 @@ export class PluginHostModelService {
|
||||
}
|
||||
|
||||
public _acceptModelAdd(data:IModelAddedData): void {
|
||||
let document = new PluginHostDocument(this._proxy, data.url, data.value.lines, data.value.EOL, data.modeId, data.versionId, data.isDirty);
|
||||
let document = new ExtHostDocument(this._proxy, data.url, data.value.lines, data.value.EOL, data.modeId, data.versionId, data.isDirty);
|
||||
let key = document.uri.toString();
|
||||
if (this._documents[key]) {
|
||||
throw new Error('Document `' + key + '` already exists.');
|
||||
@@ -405,7 +405,7 @@ export class BaseTextDocument implements vscode.TextDocument {
|
||||
}
|
||||
}
|
||||
|
||||
export class PluginHostDocument extends BaseTextDocument {
|
||||
export class ExtHostDocument extends BaseTextDocument {
|
||||
|
||||
private _proxy: MainThreadDocuments;
|
||||
|
||||
@@ -532,7 +532,7 @@ export class MainThreadDocuments {
|
||||
private _untitledEditorService: IUntitledEditorService;
|
||||
private _toDispose: IDisposable[];
|
||||
private _modelToDisposeMap: {[modelUrl:string]:IDisposable;};
|
||||
private _proxy: PluginHostModelService;
|
||||
private _proxy: ExtHostModelService;
|
||||
private _modelIsSynced: {[modelId:string]:boolean;};
|
||||
|
||||
constructor(
|
||||
@@ -548,7 +548,7 @@ export class MainThreadDocuments {
|
||||
this._editorService = editorService;
|
||||
this._fileService = fileService;
|
||||
this._untitledEditorService = untitledEditorService;
|
||||
this._proxy = threadService.getRemotable(PluginHostModelService);
|
||||
this._proxy = threadService.getRemotable(ExtHostModelService);
|
||||
this._modelIsSynced = {};
|
||||
|
||||
this._toDispose = [];
|
||||
@@ -9,15 +9,15 @@ import Event, {Emitter} from 'vs/base/common/event';
|
||||
import {IDisposable, disposeAll} from 'vs/base/common/lifecycle';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {Remotable, IThreadService} from 'vs/platform/thread/common/thread';
|
||||
import {PluginHostModelService} from 'vs/workbench/api/common/pluginHostDocuments';
|
||||
import {Selection, Range, Position, EditorOptions} from './pluginHostTypes';
|
||||
import {ExtHostModelService} from 'vs/workbench/api/common/extHostDocuments';
|
||||
import {Selection, Range, Position, EditorOptions} from './extHostTypes';
|
||||
import {ISingleEditOperation, ISelection, IRange, IInternalIndentationOptions, IEditor, EditorType, ICommonCodeEditor, ICommonDiffEditor, IDecorationRenderOptions, IRangeWithMessage} from 'vs/editor/common/editorCommon';
|
||||
import {ICodeEditorService} from 'vs/editor/common/services/codeEditorService';
|
||||
import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService';
|
||||
import {IEditor as IPlatformEditor, IResourceInput, Position as EditorPosition} from 'vs/platform/editor/common/editor';
|
||||
import {IModelService} from 'vs/editor/common/services/modelService';
|
||||
import {MainThreadEditorsTracker, TextEditorRevealType, MainThreadTextEditor, ITextEditorConfiguration} from 'vs/workbench/api/common/mainThreadEditors';
|
||||
import * as TypeConverters from './pluginHostTypeConverters';
|
||||
import * as TypeConverters from './extHostTypeConverters';
|
||||
import {TextDocument, TextEditorSelectionChangeEvent, TextEditorOptionsChangeEvent, TextEditorOptions, ViewColumn} from 'vscode';
|
||||
import {EventType} from 'vs/workbench/browser/events';
|
||||
import {IEventService} from 'vs/platform/event/common/event';
|
||||
@@ -30,8 +30,8 @@ export interface ITextEditorAddData {
|
||||
selections: ISelection[];
|
||||
}
|
||||
|
||||
@Remotable.PluginHostContext('PluginHostEditors')
|
||||
export class PluginHostEditors {
|
||||
@Remotable.PluginHostContext('ExtHostEditors')
|
||||
export class ExtHostEditors {
|
||||
|
||||
public onDidChangeTextEditorSelection: Event<TextEditorSelectionChangeEvent>;
|
||||
private _onDidChangeTextEditorSelection: Emitter<TextEditorSelectionChangeEvent>;
|
||||
@@ -39,10 +39,10 @@ export class PluginHostEditors {
|
||||
public onDidChangeTextEditorOptions: Event<TextEditorOptionsChangeEvent>;
|
||||
private _onDidChangeTextEditorOptions: Emitter<TextEditorOptionsChangeEvent>;
|
||||
|
||||
private _editors: { [id: string]: PluginHostTextEditor };
|
||||
private _editors: { [id: string]: ExtHostTextEditor };
|
||||
private _proxy: MainThreadEditors;
|
||||
private _onDidChangeActiveTextEditor: Emitter<vscode.TextEditor>;
|
||||
private _modelService: PluginHostModelService;
|
||||
private _modelService: ExtHostModelService;
|
||||
private _activeEditorId: string;
|
||||
private _visibleEditorIds: string[];
|
||||
|
||||
@@ -55,7 +55,7 @@ export class PluginHostEditors {
|
||||
this._onDidChangeTextEditorOptions = new Emitter<TextEditorOptionsChangeEvent>();
|
||||
this.onDidChangeTextEditorOptions = this._onDidChangeTextEditorOptions.event;
|
||||
|
||||
this._modelService = threadService.getRemotable(PluginHostModelService);
|
||||
this._modelService = threadService.getRemotable(ExtHostModelService);
|
||||
this._proxy = threadService.getRemotable(MainThreadEditors);
|
||||
this._onDidChangeActiveTextEditor = new Emitter<vscode.TextEditor>();
|
||||
this._editors = Object.create(null);
|
||||
@@ -94,7 +94,7 @@ export class PluginHostEditors {
|
||||
|
||||
_acceptTextEditorAdd(data:ITextEditorAddData): void {
|
||||
let document = this._modelService.getDocument(data.document);
|
||||
let newEditor = new PluginHostTextEditor(this._proxy, data.id, document, data.selections.map(TypeConverters.toSelection), data.options);
|
||||
let newEditor = new ExtHostTextEditor(this._proxy, data.id, document, data.selections.map(TypeConverters.toSelection), data.options);
|
||||
this._editors[data.id] = newEditor;
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ function deprecated(name:string, message:string = 'Refer to the documentation fo
|
||||
}
|
||||
}
|
||||
|
||||
class PluginHostTextEditor implements vscode.TextEditor {
|
||||
class ExtHostTextEditor implements vscode.TextEditor {
|
||||
|
||||
private _proxy: MainThreadEditors;
|
||||
private _id: string;
|
||||
@@ -400,7 +400,7 @@ class PluginHostTextEditor implements vscode.TextEditor {
|
||||
|
||||
// ---- util
|
||||
|
||||
private _runOnProxy(callback: () => TPromise<any>, silent:boolean): TPromise<PluginHostTextEditor> {
|
||||
private _runOnProxy(callback: () => TPromise<any>, silent:boolean): TPromise<ExtHostTextEditor> {
|
||||
return callback().then(() => this, err => {
|
||||
if (!silent) {
|
||||
return TPromise.wrapError(silent);
|
||||
@@ -413,7 +413,7 @@ class PluginHostTextEditor implements vscode.TextEditor {
|
||||
@Remotable.MainContext('MainThreadEditors')
|
||||
export class MainThreadEditors {
|
||||
|
||||
private _proxy: PluginHostEditors;
|
||||
private _proxy: ExtHostEditors;
|
||||
private _workbenchEditorService: IWorkbenchEditorService;
|
||||
private _editorTracker: MainThreadEditorsTracker;
|
||||
private _toDispose: IDisposable[];
|
||||
@@ -429,7 +429,7 @@ export class MainThreadEditors {
|
||||
@IEventService eventService:IEventService,
|
||||
@IModelService modelService:IModelService
|
||||
) {
|
||||
this._proxy = threadService.getRemotable(PluginHostEditors);
|
||||
this._proxy = threadService.getRemotable(ExtHostEditors);
|
||||
this._workbenchEditorService = workbenchEditorService;
|
||||
this._toDispose = [];
|
||||
this._textEditorsListenersMap = Object.create(null);
|
||||
@@ -8,7 +8,7 @@ import {FileChangesEvent, FileChangeType} from 'vs/platform/files/common/files';
|
||||
import {Remotable, IThreadService} from 'vs/platform/thread/common/thread';
|
||||
import {IMarkerService} from 'vs/platform/markers/common/markers';
|
||||
import Event, {Emitter} from 'vs/base/common/event';
|
||||
import {Disposable} from './pluginHostTypes';
|
||||
import {Disposable} from './extHostTypes';
|
||||
import {IEventService} from 'vs/platform/event/common/event';
|
||||
import {RunOnceScheduler} from 'vs/base/common/async';
|
||||
import URI from 'vs/base/common/uri';
|
||||
@@ -99,8 +99,8 @@ export class FileSystemWatcher implements _FileSystemWatcher {
|
||||
}
|
||||
}
|
||||
|
||||
@Remotable.PluginHostContext('PluginHostFileSystemEventService')
|
||||
export class PluginHostFileSystemEventService {
|
||||
@Remotable.PluginHostContext('ExtHostFileSystemEventService')
|
||||
export class ExtHostFileSystemEventService {
|
||||
|
||||
private _emitter = new Emitter<FileSystemEvents>();
|
||||
private _watchers: FileSystemWatcher[] = [];
|
||||
@@ -121,7 +121,7 @@ export class MainThreadFileSystemEventService {
|
||||
|
||||
constructor( @IEventService eventService: IEventService, @IThreadService threadService: IThreadService) {
|
||||
|
||||
const proxy = threadService.getRemotable(PluginHostFileSystemEventService);
|
||||
const proxy = threadService.getRemotable(ExtHostFileSystemEventService);
|
||||
const events: FileSystemEvents = {
|
||||
created: [],
|
||||
changed: [],
|
||||
@@ -11,14 +11,14 @@ import {IDisposable} from 'vs/base/common/lifecycle';
|
||||
import {Remotable, IThreadService} from 'vs/platform/thread/common/thread';
|
||||
import {Range as EditorRange} from 'vs/editor/common/core/range';
|
||||
import * as vscode from 'vscode';
|
||||
import * as TypeConverters from 'vs/workbench/api/common/pluginHostTypeConverters';
|
||||
import {Range, DocumentHighlightKind, Disposable, Diagnostic, SignatureHelp} from 'vs/workbench/api/common/pluginHostTypes';
|
||||
import * as TypeConverters from 'vs/workbench/api/common/extHostTypeConverters';
|
||||
import {Range, DocumentHighlightKind, Disposable, Diagnostic, SignatureHelp} from 'vs/workbench/api/common/extHostTypes';
|
||||
import {IPosition, IRange, ISingleEditOperation} from 'vs/editor/common/editorCommon';
|
||||
import * as modes from 'vs/editor/common/modes';
|
||||
import {CancellationTokenSource} from 'vs/base/common/cancellation';
|
||||
import {PluginHostModelService} from 'vs/workbench/api/common/pluginHostDocuments';
|
||||
import {ExtHostModelService} from 'vs/workbench/api/common/extHostDocuments';
|
||||
import {IMarkerService, IMarker} from 'vs/platform/markers/common/markers';
|
||||
import {PluginHostCommands} from 'vs/workbench/api/common/pluginHostCommands';
|
||||
import {ExtHostCommands} from 'vs/workbench/api/common/extHostCommands';
|
||||
import {DeclarationRegistry} from 'vs/editor/contrib/goToDeclaration/common/goToDeclaration';
|
||||
import {ExtraInfoRegistry} from 'vs/editor/contrib/hover/common/hover';
|
||||
import {OccurrencesRegistry} from 'vs/editor/contrib/wordHighlighter/common/wordHighlighter';
|
||||
@@ -54,10 +54,10 @@ function asWinJsPromise<T>(callback: (token: vscode.CancellationToken) => T | Th
|
||||
|
||||
class OutlineAdapter implements IOutlineSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.DocumentSymbolProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.DocumentSymbolProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.DocumentSymbolProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -74,12 +74,12 @@ class OutlineAdapter implements IOutlineSupport {
|
||||
|
||||
class CodeLensAdapter implements modes.ICodeLensSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.CodeLensProvider;
|
||||
|
||||
private _cache: { [uri: string]: vscode.CodeLens[] } = Object.create(null);
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.CodeLensProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.CodeLensProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -144,10 +144,10 @@ class CodeLensAdapter implements modes.ICodeLensSupport {
|
||||
|
||||
class DeclarationAdapter implements modes.IDeclarationSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.DefinitionProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.DefinitionProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.DefinitionProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -181,10 +181,10 @@ class DeclarationAdapter implements modes.IDeclarationSupport {
|
||||
|
||||
class ExtraInfoAdapter implements modes.IExtraInfoSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.HoverProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.HoverProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.HoverProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -212,10 +212,10 @@ class ExtraInfoAdapter implements modes.IExtraInfoSupport {
|
||||
|
||||
class OccurrencesAdapter implements modes.IOccurrencesSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.DocumentHighlightProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.DocumentHighlightProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.DocumentHighlightProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -242,10 +242,10 @@ class OccurrencesAdapter implements modes.IOccurrencesSupport {
|
||||
|
||||
class ReferenceAdapter implements modes.IReferenceSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.ReferenceProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.ReferenceProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.ReferenceProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -275,11 +275,11 @@ class ReferenceAdapter implements modes.IReferenceSupport {
|
||||
|
||||
class QuickFixAdapter implements modes.IQuickFixSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _commands: PluginHostCommands;
|
||||
private _documents: ExtHostModelService;
|
||||
private _commands: ExtHostCommands;
|
||||
private _provider: vscode.CodeActionProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, commands: PluginHostCommands, provider: vscode.CodeActionProvider) {
|
||||
constructor(documents: ExtHostModelService, commands: ExtHostCommands, provider: vscode.CodeActionProvider) {
|
||||
this._documents = documents;
|
||||
this._commands = commands;
|
||||
this._provider = provider;
|
||||
@@ -317,10 +317,10 @@ class QuickFixAdapter implements modes.IQuickFixSupport {
|
||||
|
||||
class DocumentFormattingAdapter implements modes.IFormattingSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.DocumentFormattingEditProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.DocumentFormattingEditProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.DocumentFormattingEditProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -339,10 +339,10 @@ class DocumentFormattingAdapter implements modes.IFormattingSupport {
|
||||
|
||||
class RangeFormattingAdapter implements modes.IFormattingSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.DocumentRangeFormattingEditProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.DocumentRangeFormattingEditProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.DocumentRangeFormattingEditProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -362,10 +362,10 @@ class RangeFormattingAdapter implements modes.IFormattingSupport {
|
||||
|
||||
class OnTypeFormattingAdapter implements modes.IFormattingSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.OnTypeFormattingEditProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.OnTypeFormattingEditProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.OnTypeFormattingEditProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -404,10 +404,10 @@ class NavigateTypeAdapter implements INavigateTypesSupport {
|
||||
|
||||
class RenameAdapter implements modes.IRenameSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.RenameProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.RenameProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.RenameProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -458,11 +458,11 @@ interface ISuggestion2 extends modes.ISuggestion {
|
||||
|
||||
class SuggestAdapter implements modes.ISuggestSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.CompletionItemProvider;
|
||||
private _cache: { [key: string]: vscode.CompletionItem[] } = Object.create(null);
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.CompletionItemProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.CompletionItemProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -558,10 +558,10 @@ class SuggestAdapter implements modes.ISuggestSupport {
|
||||
|
||||
class ParameterHintsAdapter implements modes.IParameterHintsSupport {
|
||||
|
||||
private _documents: PluginHostModelService;
|
||||
private _documents: ExtHostModelService;
|
||||
private _provider: vscode.SignatureHelpProvider;
|
||||
|
||||
constructor(documents: PluginHostModelService, provider: vscode.SignatureHelpProvider) {
|
||||
constructor(documents: ExtHostModelService, provider: vscode.SignatureHelpProvider) {
|
||||
this._documents = documents;
|
||||
this._provider = provider;
|
||||
}
|
||||
@@ -598,14 +598,14 @@ export class ExtHostLanguageFeatures {
|
||||
private static _handlePool: number = 0;
|
||||
|
||||
private _proxy: MainThreadLanguageFeatures;
|
||||
private _documents: PluginHostModelService;
|
||||
private _commands: PluginHostCommands;
|
||||
private _documents: ExtHostModelService;
|
||||
private _commands: ExtHostCommands;
|
||||
private _adapter: { [handle: number]: Adapter } = Object.create(null);
|
||||
|
||||
constructor( @IThreadService threadService: IThreadService) {
|
||||
this._proxy = threadService.getRemotable(MainThreadLanguageFeatures);
|
||||
this._documents = threadService.getRemotable(PluginHostModelService);
|
||||
this._commands = threadService.getRemotable(PluginHostCommands);
|
||||
this._documents = threadService.getRemotable(ExtHostModelService);
|
||||
this._commands = threadService.getRemotable(ExtHostCommands);
|
||||
}
|
||||
|
||||
private _createDisposable(handle: number): Disposable {
|
||||
|
||||
@@ -10,10 +10,10 @@ 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 {PluginHostCommands} from 'vs/workbench/api/common/pluginHostCommands';
|
||||
import {ExtHostCommands} from 'vs/workbench/api/common/extHostCommands';
|
||||
import vscode = require('vscode');
|
||||
|
||||
export class PluginHostMessageService {
|
||||
export class ExtHostMessageService {
|
||||
|
||||
private _proxy: MainThreadMessageService;
|
||||
private _commands: typeof vscode.commands;
|
||||
@@ -10,7 +10,7 @@ import {Remotable, IThreadService} from 'vs/platform/thread/common/thread';
|
||||
import {IOutputService, OUTPUT_EDITOR_INPUT_ID} from 'vs/workbench/parts/output/common/output';
|
||||
import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService';
|
||||
import {Position} from 'vs/platform/editor/common/editor';
|
||||
import * as TypeConverters from 'vs/workbench/api/common/pluginHostTypeConverters';
|
||||
import * as TypeConverters from 'vs/workbench/api/common/extHostTypeConverters';
|
||||
|
||||
export class ExtHostOutputChannel implements vscode.OutputChannel {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import {TPromise as Promise} from 'vs/base/common/winjs.base';
|
||||
import {AbstractRemoteTelemetryService} from 'vs/platform/telemetry/common/abstractRemoteTelemetryService';
|
||||
import vscode = require('vscode');
|
||||
|
||||
export class PluginHostTelemetryService extends AbstractRemoteTelemetryService {
|
||||
export class ExtHostTelemetryService extends AbstractRemoteTelemetryService {
|
||||
|
||||
protected handleEvent(eventName:string, data?:any):void {
|
||||
var data = data || {};
|
||||
@@ -7,7 +7,7 @@
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import * as modes from 'vs/editor/common/modes';
|
||||
import * as types from './pluginHostTypes';
|
||||
import * as types from './extHostTypes';
|
||||
import {Position as EditorPosition} from 'vs/platform/editor/common/editor';
|
||||
import {IPosition, ISelection, IRange, IRangeWithMessage, ISingleEditOperation} from 'vs/editor/common/editorCommon';
|
||||
import {IHTMLContentElement} from 'vs/base/common/htmlContent';
|
||||
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
import {registerMarshallingContribution, IMarshallingContribution} from 'vs/base/common/marshalling';
|
||||
import * as types from './pluginHostTypes';
|
||||
import * as types from './extHostTypes';
|
||||
import {IRange, IPosition} from 'vs/editor/common/editorCommon';
|
||||
import {IReference} from 'vs/editor/common/modes';
|
||||
|
||||
@@ -16,9 +16,9 @@ import {Uri, FileSystemWatcher} from 'vscode';
|
||||
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 {fromRange} from 'vs/workbench/api/common/pluginHostTypeConverters';
|
||||
import {fromRange} from 'vs/workbench/api/common/extHostTypeConverters';
|
||||
|
||||
export class PluginHostWorkspace {
|
||||
export class ExtHostWorkspace {
|
||||
|
||||
private _proxy: MainThreadWorkspace;
|
||||
private _workspacePath: string;
|
||||
Reference in New Issue
Block a user