'use strict' ; import { CompletionContext } from 'vscode' ; import { Delegate } from './Delegate' ; export abstract class ContextDelegate extends Delegate { constructor ( public context ) { super ( ) ; } enclose ( snippetText ) { let enclosingStart = '' ; let enclosingEnd = '' ; if ( this . context . triggerCharacter !== "(" ) { enclosingStart = '(' ; enclosingEnd = ')' ; } return enclosingStart + snippetText + enclosingEnd ; } }