import ServiceFileOpener from '../../../services/files/service.file.opener' ; import { AFileParser } from '../../../controllers/files.parsers/index' ; import Logger from '../../../tools/env.logger' ; export default class FunctionOpenLocalFile { private _parsers : AFileParser [ ] ; private _logger : Logger ; constructor ( parsers ) { this . _parsers = parsers ; this . _logger = new Logger ( `FunctionOpenLocalFile` ) ; } public getLabel ( ) { return `Open File(s)` ; } public getHandler ( ) { return ( ) => { ServiceFileOpener . selectAndOpenFile ( ) . catch ( ( error ) => { this . _logger . error ( `Fail to open file due error: ${ error . message }` ) ; } ) ; } ; } }