mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
ext host - extend *Shape classes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = [];
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user