'use strict' ; import * as vscode from 'vscode' ; import { ABL_MODE } from './ablMode' ; export const outputChannel = vscode . window . createOutputChannel ( 'ABL' ) ; let statusBarEntry ; export function showHideStatus ( ) { if ( ! statusBarEntry ) { return ; } if ( ! vscode . window . activeTextEditor ) { statusBarEntry . hide ( ) ; return ; } if ( vscode . languages . match ( ABL_MODE , vscode . window . activeTextEditor . document ) ) { statusBarEntry . show ( ) ; return ; } statusBarEntry . hide ( ) ; } export function hideAblStatus ( ) { if ( statusBarEntry ) { statusBarEntry . dispose ( ) ; } } export function showAblStatus ( message , command , tooltip ? ) { statusBarEntry = vscode . window . createStatusBarItem ( vscode . StatusBarAlignment . Right , Number . MIN_VALUE ) ; statusBarEntry . text = message ; statusBarEntry . command = command ; statusBarEntry . color = 'yellow' ; statusBarEntry . tooltip = tooltip ; statusBarEntry . show ( ) ; }