streamline lifecycle methods

This commit is contained in:
Joao Moreno
2016-03-23 10:06:12 +00:00
parent 0f5937cb21
commit 68f4d1eb60
107 changed files with 252 additions and 265 deletions

View File

@@ -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 => {