Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ddh 11915 create alternative temp file for cobol check extension #340

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading