simplify API

This commit is contained in:
Johannes Rieken
2016-09-07 10:06:03 +02:00
parent b725c7120f
commit 21820b36c1
5 changed files with 36 additions and 54 deletions

View File

@@ -15,7 +15,7 @@ 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, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape} from './extHost.protocol';
import {ExtHostContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, ObjectIdentifier} from './extHost.protocol';
import {LanguageConfigurationRegistry, LanguageConfiguration} from 'vs/editor/common/modes/languageConfigurationRegistry';
import {trackGarbageCollection} from 'gc-signals';
@@ -183,7 +183,7 @@ export class MainThreadLanguageFeatures extends MainThreadLanguageFeaturesShape
provideCompletionItems: (model:IReadOnlyModel, position:EditorPosition, token:CancellationToken): Thenable<modes.ISuggestResult> => {
return wireCancellationToken(token, this._proxy.$provideCompletionItems(handle, model.uri, position)).then(result => {
for (const suggestion of result.suggestions) {
trackGarbageCollection(suggestion, (<any>suggestion).$heap_ident);
trackGarbageCollection(suggestion, ObjectIdentifier.get(suggestion));
}
return result;
});