Skip to content

Commit

Permalink
Merge pull request #340 from openmainframeproject/DDH-11915-Create-al…
Browse files Browse the repository at this point in the history
…ternative-temp-file-for-Cobol-Check-extension

Create alternative temp file for cobol check extension
  • Loading branch information
oakmount66 committed Dec 29, 2023
2 parents 08d3c98 + e18610d commit 4139395
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions vs-code-extension/client/src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// The module 'vscode' contains the VS Code extensibility API
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below

//Include files ved byg/udgivelse?
Expand Down Expand Up @@ -32,7 +32,7 @@ export async function activate(context: ExtensionContext) {

const fileChangedEmitter = new vscode.EventEmitter<vscode.Uri>();

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) => {
Expand All @@ -41,7 +41,15 @@ export async function activate(context: ExtensionContext) {

//Getting arguments to run
let applicationSourceDir = await getConfigurationValueFor(configPath, 'application.source.directory');
let argument : string = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, vscode.window.activeTextEditor.document.uri.fsPath);
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' })
Expand Down
2 changes: 1 addition & 1 deletion vs-code-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Snippets"
],
"description": "Extension for running unit tests in Cobol",
"version": "0.4.2",
"version": "0.4.3",
"icon": "images/cobol-check-logo-small.png",
"repository": {
"type": "git",
Expand Down

0 comments on commit 4139395

Please sign in to comment.