diff --git a/vs-code-extension/client/src/extension.ts b/vs-code-extension/client/src/extension.ts index 0fc7cf83..20e3bc64 100644 --- a/vs-code-extension/client/src/extension.ts +++ b/vs-code-extension/client/src/extension.ts @@ -32,8 +32,7 @@ export async function activate(context: ExtensionContext) { const fileChangedEmitter = new vscode.EventEmitter(); - // let runCobolCheck_Cmd = vscode.commands.registerCommand('cobolcheck.run', (pathToExpandedProgram : string) => { - let runCobolCheck_Cmd = vscode.commands.registerCommand('cobolcheck.run', () => { + let runCobolCheck_Cmd = vscode.commands.registerCommand('cobolcheck.run', (pathToExpandedProgram : string) => { //Setting loader vscode.window.withProgress({location: vscode.ProgressLocation.Notification, cancellable: true, title: 'Cobol Check running:'}, async (progress) => { @@ -42,15 +41,15 @@ export async function activate(context: ExtensionContext) { //Getting arguments to run let applicationSourceDir = await getConfigurationValueFor(configPath, 'application.source.directory'); - // let argument : string = '' - // console.log("Cobol-check extention: pathToExpandedProgram=" + pathToExpandedProgram) - // if(pathToExpandedProgram === undefined) { - let argument : string = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, vscode.window.activeTextEditor.document.uri.fsPath); - // } - // else { - // argument = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, pathToExpandedProgram); - // } - // console.log("Cobol-check extention: argument=" + argument) + let argument : string = null + console.log("Cobol-check extention: pathToExpandedProgram=" + pathToExpandedProgram) + if(pathToExpandedProgram === undefined) { + argument = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, vscode.window.activeTextEditor.document.uri.fsPath); + } + else { + argument = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, pathToExpandedProgram); + } + console.log("Cobol-check extention: argument=" + argument) if (argument === null) return; progress.report({ message: 'Running tests' })