import * as vscode from 'vscode' ; import { ALCodeAction } from './alCodeAction' ; import { DevToolsExtensionContext } from '../devToolsExtensionContext' ; import { AZDocumentSymbolsLibrary } from '../symbollibraries/azDocumentSymbolsLibrary' ; import { AZSymbolInformation } from '../symbollibraries/azSymbolInformation' ; export class ALCodeFix extends ALCodeAction { diagnosticCode : string ; constructor ( context , diagCode ) { super ( context , diagCode ) ; this . diagnosticCode = diagCode ; } collectCodeActions ( docSymbols , symbol , document , range , diagnostics , actions ) { for ( let i = 0 ; i < diagnostics . length ; i ++ ) { let diagCode = diagnostics [ i ] . code ; if ( ( diagCode ) && ( ( diagCode === this . diagnosticCode ) || ( diagCode . value === this . diagnosticCode ) ) ) { let codeFix = this . createFix ( document , diagnostics [ i ] ) ; if ( codeFix ) actions . push ( codeFix ) ; } } } createFix ( document , diagnostic ) { return undefined ; } }