'use strict' ; import { CustomConfigurationProvider , Version , CppToolsApi , CppToolsExtension } from 'vscode-cpptools' ; import { CppToolsTestApi , CppToolsTestHook , CppToolsTestExtension } from 'vscode-cpptools/out/testApi' ; import { CppTools } from './cppTools' ; /**
 * This class implements both interfaces since the extension returned CppToolsApi for v0,
 * but returns CppToolsTestExtension for v1 and later.
 */ export class CppTools1 implements CppToolsTestApi , CppToolsTestExtension { private backupApi ? : CppTools ; private get BackupApi ( ) : CppToolsTestApi { if ( ! this . backupApi ) { this . backupApi = new CppTools ( Version . v0 ) ; } return this . backupApi ; } getApi ( version ) { switch ( version ) { case Version . v0 : return this . BackupApi ; default : return new CppTools ( version ) ; } } getTestApi ( version ) { return < CppToolsTestApi > this . getApi ( version ) ; } getVersion ( ) { return this . BackupApi . getVersion ( ) ; } registerCustomConfigurationProvider ( provider ) { this . BackupApi . registerCustomConfigurationProvider ( provider ) ; } notifyReady ( provider ) { this . BackupApi . notifyReady ( provider ) ; } didChangeCustomConfiguration ( provider ) { this . BackupApi . didChangeCustomConfiguration ( provider ) ; } didChangeCustomBrowseConfiguration ( provider ) { this . BackupApi . didChangeCustomBrowseConfiguration ( provider ) ; } dispose ( ) { } getTestHook ( ) { return this . BackupApi . getTestHook ( ) ; } } /**
 * This is an empty implementation of the API. Used when the extension is activated on
 * an unsupported platform.
 */ export class NullCppTools implements CppToolsApi , CppToolsExtension { private version : Version = Version . v0 ; getApi ( version ) { this . version = version ; return this ; } getVersion ( ) { return this . version ; } registerCustomConfigurationProvider ( provider ) { } notifyReady ( provider ) { } didChangeCustomConfiguration ( provider ) { } didChangeCustomBrowseConfiguration ( provider ) { } dispose ( ) { } }