src/vs/workbench/contrib/snippets/browser/tabCompletion.ts/TabCompletionController/performSnippetCompletions
class TabCompletionController:	async performSnippetCompletions() {
		if (!this._editor.hasModel()) {
			return;
		}

		if (this._activeSnippets.length === 1) {
			// one -> just insert
			const [snippet] = this._activeSnippets;

			// async clipboard access might be required and in that case
			// we need to check if the editor has changed in flight and then
			// bail out (or be smarter than that)
			let clipboardText: string | undefined;
			if (snippet.needsClipboard) {
				const state = new EditorState(this._editor, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position);
				clipboardText = await this._clipboardService.readText();
				if (!state.validate(this._editor)) {
					return;
				}
			}
			SnippetController2.get(this._editor).insert(snippet.codeSnippet, {
				overwriteBefore: snippet.prefix.length, overwriteAfter: 0,
				clipboardText
			});

		} else if (this._activeSnippets.length > 1) {
			// two or more -> show IntelliSense box
			const position = this._editor.getPosition();
			showSimpleSuggestions(this._editor, this._activeSnippets.map(snippet => {
				const range = Range.fromPositions(position.delta(0, -snippet.prefix.length), position);
				return new SnippetCompletion(snippet, range);
			}));
		}
	}