This is an automated email from the ASF dual-hosted git repository.

shanedell pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git


The following commit(s) were added to refs/heads/main by this push:
     new 75e35ec  Updated launch config default values when creating new config 
from the wizard and fixed bug of restting launch wizard when switching open tabs
75e35ec is described below

commit 75e35ec3b71dffb44553aa24a732f627fb29f0b6
Author: Hitesh Dalsania <[email protected]>
AuthorDate: Mon Feb 24 15:28:23 2025 -0500

    Updated launch config default values when creating new config from the 
wizard and fixed bug of restting launch wizard when switching open tabs
    
    Closes #1009
    
    Closes #1182
---
 src/launchWizard/launchWizard.ts | 13 ++++++++++++-
 src/launchWizard/script.js       | 10 +++++-----
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/launchWizard/launchWizard.ts b/src/launchWizard/launchWizard.ts
index 5b58989..3e3ab2a 100644
--- a/src/launchWizard/launchWizard.ts
+++ b/src/launchWizard/launchWizard.ts
@@ -29,6 +29,11 @@ const defaultConf = getConfig({
   name: 'Wizard Config',
   request: 'launch',
   type: 'dfdl',
+  schema: {
+    path: '${command:AskForSchemaName}',
+    rootName: 'null',
+    rootNamespace: 'null',
+  },
 })
 
 // Function that will activate/open the launch config wizard
@@ -356,7 +361,13 @@ class LaunchWizard {
         'launchWizard',
         'Launch Config Wizard',
         vscode.ViewColumn.Active,
-        this.getWebViewOptions(this.extensionUri)
+        {
+          enableScripts: true,
+          retainContextWhenHidden: true,
+          localResourceRoots: [
+            vscode.Uri.parse(this.ctx.asAbsolutePath('./src/launchWizard')),
+          ],
+        }
       )
 
       this.panel.onDidDispose(
diff --git a/src/launchWizard/script.js b/src/launchWizard/script.js
index 9167d8c..2c0d36c 100644
--- a/src/launchWizard/script.js
+++ b/src/launchWizard/script.js
@@ -392,8 +392,8 @@ function copyConfig() {
 async function updateConfigValues(config) {
   document.getElementById('name').value = config.name
   document.getElementById('data').value = config.data
-  document.getElementById('rootName').value = config.rootName
-  document.getElementById('rootNamespace').value = config.rootNamespace
+  document.getElementById('rootName').value = config.schema.rootName
+  document.getElementById('rootNamespace').value = config.schema.rootNamespace
   document.getElementById('debugServer').value = parseInt(config.debugServer)
   document.getElementById('infosetFormat').value = config.infosetFormat
     ? config.infosetFormat
@@ -428,7 +428,7 @@ async function updateConfigValues(config) {
   document.getElementById('openInfosetDiffView').checked =
     config.openInfosetDiffView
   document.getElementById('openInfosetView').checked = config.openInfosetView
-  document.getElementById('schema').value = config.schema
+  document.getElementById('schema').value = config.schema.path
   document.getElementById('stopOnEntry').checked = config.stopOnEntry
   document.getElementById('trace').checked = config.trace
   document.getElementById('useExistingServer').checked =
@@ -442,9 +442,9 @@ async function updateConfigValues(config) {
     config.dataEditor.logging.level
 
   document.getElementById('dfdlDebuggerLogFile').value =
-    config.dfdlDebugger.file
+    config.dfdlDebugger.logging.file
   document.getElementById('dfdlDebuggerLogLevel').value =
-    config.dfdlDebugger.level
+    config.dfdlDebugger.logging.level
 
   updateInfosetOutputType()
   updateTDMLAction()

Reply via email to