mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Merge branch 'master' into alex/perf
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
import {clone} from 'vs/base/common/objects';
|
||||
import {IDisposable, disposeAll} from 'vs/base/common/lifecycle';
|
||||
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
||||
import {IThreadService, Remotable} from 'vs/platform/thread/common/thread';
|
||||
import {IConfigurationService, ConfigurationServiceEventTypes, IConfigurationServiceEvent} from 'vs/platform/configuration/common/configuration';
|
||||
import Event, {Emitter} from 'vs/base/common/event';
|
||||
@@ -94,6 +94,6 @@ export class MainThreadConfiguration {
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this._toDispose = disposeAll(this._toDispose);
|
||||
this._toDispose = dispose(this._toDispose);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import {MirrorModel2} from 'vs/editor/common/model/mirrorModel2';
|
||||
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 {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
||||
import {Range, Position, Disposable} from 'vs/workbench/api/node/extHostTypes';
|
||||
import {IEventService} from 'vs/platform/event/common/event';
|
||||
import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService';
|
||||
@@ -520,7 +520,7 @@ export class MainThreadDocuments {
|
||||
this._modelToDisposeMap[modelUrl].dispose();
|
||||
});
|
||||
this._modelToDisposeMap = Object.create(null);
|
||||
this._toDispose = disposeAll(this._toDispose);
|
||||
this._toDispose = dispose(this._toDispose);
|
||||
}
|
||||
|
||||
private _shouldHandleFileEvent(e: LocalFileChangeEvent): boolean {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import URI from 'vs/base/common/uri';
|
||||
import Event, {Emitter} from 'vs/base/common/event';
|
||||
import {IDisposable, disposeAll} from 'vs/base/common/lifecycle';
|
||||
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {Remotable, IThreadService} from 'vs/platform/thread/common/thread';
|
||||
import {ExtHostModelService, ExtHostDocumentData} from 'vs/workbench/api/node/extHostDocuments';
|
||||
@@ -508,10 +508,10 @@ export class MainThreadEditors {
|
||||
|
||||
public dispose(): void {
|
||||
Object.keys(this._textEditorsListenersMap).forEach((editorId) => {
|
||||
disposeAll(this._textEditorsListenersMap[editorId]);
|
||||
dispose(this._textEditorsListenersMap[editorId]);
|
||||
});
|
||||
this._textEditorsListenersMap = Object.create(null);
|
||||
this._toDispose = disposeAll(this._toDispose);
|
||||
this._toDispose = dispose(this._toDispose);
|
||||
}
|
||||
|
||||
private _onTextEditorAdd(textEditor: MainThreadTextEditor): void {
|
||||
@@ -537,7 +537,7 @@ export class MainThreadEditors {
|
||||
|
||||
private _onTextEditorRemove(textEditor: MainThreadTextEditor): void {
|
||||
let id = textEditor.getId();
|
||||
disposeAll(this._textEditorsListenersMap[id]);
|
||||
dispose(this._textEditorsListenersMap[id]);
|
||||
delete this._textEditorsListenersMap[id];
|
||||
delete this._textEditorsMap[id];
|
||||
this._proxy._acceptTextEditorRemove(id);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import URI from 'vs/base/common/uri';
|
||||
import {DefaultFilter} from 'vs/editor/common/modes/modesFilters';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {IDisposable, disposeAll} from 'vs/base/common/lifecycle';
|
||||
import {IDisposable, dispose} 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';
|
||||
@@ -115,7 +115,7 @@ class CodeLensAdapter implements modes.ICodeLensSupport {
|
||||
return new ShallowCancelThenPromise(newCodeLensData.then(newCached => {
|
||||
if (entry) {
|
||||
// only now dispose old commands et al
|
||||
entry.data.then(oldCached => disposeAll(oldCached.disposables));
|
||||
entry.data.then(oldCached => dispose(oldCached.disposables));
|
||||
}
|
||||
return newCached && newCached.symbols;
|
||||
}));
|
||||
@@ -320,7 +320,7 @@ class QuickFixAdapter implements modes.IQuickFixSupport {
|
||||
return diag;
|
||||
});
|
||||
|
||||
this._cachedCommands = disposeAll(this._cachedCommands);
|
||||
this._cachedCommands = dispose(this._cachedCommands);
|
||||
const ctx = { commands: this._commands, disposables: this._cachedCommands };
|
||||
|
||||
return asWinJsPromise(token => this._provider.provideCodeActions(doc, ran, { diagnostics: <any>diagnostics }, token)).then(commands => {
|
||||
|
||||
@@ -9,7 +9,7 @@ import Event, {Emitter} from 'vs/base/common/event';
|
||||
import {IEditor} from 'vs/platform/editor/common/editor';
|
||||
import {ICodeEditorService} from 'vs/editor/common/services/codeEditorService';
|
||||
import {IModelService} from 'vs/editor/common/services/modelService';
|
||||
import {IDisposable, disposeAll} from 'vs/base/common/lifecycle';
|
||||
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
||||
import {RunOnceScheduler} from 'vs/base/common/async';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import {Selection} from 'vs/editor/common/core/selection';
|
||||
@@ -99,9 +99,9 @@ export class MainThreadTextEditor {
|
||||
|
||||
public dispose(): void {
|
||||
this._model = null;
|
||||
this._modelListeners = disposeAll(this._modelListeners);
|
||||
this._modelListeners = dispose(this._modelListeners);
|
||||
this._codeEditor = null;
|
||||
this._codeEditorListeners = disposeAll(this._codeEditorListeners);
|
||||
this._codeEditorListeners = dispose(this._codeEditorListeners);
|
||||
}
|
||||
|
||||
public getId(): string {
|
||||
@@ -121,7 +121,7 @@ export class MainThreadTextEditor {
|
||||
// Nothing to do...
|
||||
return;
|
||||
}
|
||||
this._codeEditorListeners = disposeAll(this._codeEditorListeners);
|
||||
this._codeEditorListeners = dispose(this._codeEditorListeners);
|
||||
|
||||
this._codeEditor = codeEditor;
|
||||
if (this._codeEditor) {
|
||||
@@ -387,7 +387,7 @@ export class MainThreadEditorsTracker {
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this._toDispose = disposeAll(this._toDispose);
|
||||
this._toDispose = dispose(this._toDispose);
|
||||
}
|
||||
|
||||
private _onModelAdded(model: EditorCommon.IModel): void {
|
||||
|
||||
Reference in New Issue
Block a user