You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "shanedell (via GitHub)" <gi...@apache.org> on 2023/11/29 18:06:33 UTC

[PR] Launch Wizard - Allow copying of configs [daffodil-vscode]

shanedell opened a new pull request, #904:
URL: https://github.com/apache/daffodil-vscode/pull/904

   Launch Wizard - Allow copying of configs
   
   Closes #670


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Launch Wizard - Allow copying of configs [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on code in PR #904:
URL: https://github.com/apache/daffodil-vscode/pull/904#discussion_r1409777183


##########
src/launchWizard/launchWizard.js:
##########
@@ -27,15 +27,88 @@ function getConfigIndex() {
   if (configSelectedValue === 'New Config') {
     document.getElementById('nameLabel').style =
       'margin-top: 10px; visibility: visible;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: hidden;'
   } else {
     document.getElementById('nameLabel').style = 'visibility: hidden;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: visible;'
   }
 
   return configSelectedValue === 'New Config'
     ? -1
     : configSelectionBox.selectedIndex
 }
 
+function getConfigValues() {
+  var configSelectionBox = document.getElementById('configSelected')
+  var configSelectedValue =
+    configSelectionBox.options[configSelectionBox.selectedIndex].value
+  const name =
+    configSelectedValue === 'New Config'
+      ? document.getElementById('name').value
+      : configSelectedValue
+  const data = document.getElementById('data').value
+  const debugServer = parseInt(document.getElementById('debugServer').value)
+  const infosetFormat = document.getElementById('infosetFormat').value
+  const infosetOutputFilePath = document.getElementById(
+    'infosetOutputFilePath'
+  ).value
+  const infosetOutputType = document.getElementById('infosetOutputType').value
+  const tdmlAction = document.getElementById('tdmlAction').value
+  const tdmlName = document.getElementById('tdmlName').value
+  const tdmlDescription = document.getElementById('tdmlDescription').value
+  const tdmlPath = document.getElementById('tdmlPath').value
+  const openHexView = document.getElementById('openHexView').checked

Review Comment:
   Are hexviews still being used? I remember removing the `hexy` capability from the old data editor and don't recall seeing it being used anywhere else throughout the project. Granted I haven't been thoroughly searching.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Launch Wizard - Allow copying of configs [daffodil-vscode]

Posted by "shanedell (via GitHub)" <gi...@apache.org>.
shanedell commented on code in PR #904:
URL: https://github.com/apache/daffodil-vscode/pull/904#discussion_r1412335083


##########
.github/workflows/nightly.yml:
##########
@@ -23,7 +23,7 @@ on:
 
 jobs:
   build-test-package:
-    name: 'Build, Test, and Package (OS: ${{ matrix.os }}, Node: ${{ matrix.node }}, Java: ${{ matrix_java_version }}, VS Code: ${{ matrix.vscode }} )'
+    name: 'Build, Test, and Package (OS: ${{ matrix.os }}, Node: ${{ matrix.node }}, Java: ${{ matrix.java_version }}, VS Code: ${{ matrix.vscode }} )'

Review Comment:
   This is a quick fix for the nightly builds currently failing to even start



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Launch Wizard - Allow copying of configs [daffodil-vscode]

Posted by "shanedell (via GitHub)" <gi...@apache.org>.
shanedell commented on code in PR #904:
URL: https://github.com/apache/daffodil-vscode/pull/904#discussion_r1414304823


##########
src/launchWizard/launchWizard.js:
##########
@@ -27,15 +27,88 @@ function getConfigIndex() {
   if (configSelectedValue === 'New Config') {
     document.getElementById('nameLabel').style =
       'margin-top: 10px; visibility: visible;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: hidden;'
   } else {
     document.getElementById('nameLabel').style = 'visibility: hidden;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: visible;'
   }
 
   return configSelectedValue === 'New Config'
     ? -1
     : configSelectionBox.selectedIndex
 }
 
+function getConfigValues() {
+  var configSelectionBox = document.getElementById('configSelected')
+  var configSelectedValue =
+    configSelectionBox.options[configSelectionBox.selectedIndex].value
+  const name =
+    configSelectedValue === 'New Config'
+      ? document.getElementById('name').value
+      : configSelectedValue
+  const data = document.getElementById('data').value
+  const debugServer = parseInt(document.getElementById('debugServer').value)
+  const infosetFormat = document.getElementById('infosetFormat').value
+  const infosetOutputFilePath = document.getElementById(
+    'infosetOutputFilePath'
+  ).value
+  const infosetOutputType = document.getElementById('infosetOutputType').value
+  const tdmlAction = document.getElementById('tdmlAction').value
+  const tdmlName = document.getElementById('tdmlName').value
+  const tdmlDescription = document.getElementById('tdmlDescription').value
+  const tdmlPath = document.getElementById('tdmlPath').value
+  const openHexView = document.getElementById('openHexView').checked
+  const openInfosetDiffView = document.getElementById(
+    'openInfosetDiffView'
+  ).checked
+  const openInfosetView = document.getElementById('openInfosetView').checked
+  const program = document.getElementById('program').value
+  const stopOnEntry = document.getElementById('stopOnEntry').checked
+  const trace = document.getElementById('trace').checked
+  const useExistingServer = document.getElementById('useExistingServer').checked
+  const dataEditorPort = parseInt(
+    document.getElementById('dataEditorPort').value
+  )
+  const dataEditorLogFile = document.getElementById('dataEditorLogFile').value
+  const dataEditorLogLevel = document.getElementById('dataEditorLogLevel').value
+  const dfdlDebuggerLogFile = document.getElementById(
+    'dfdlDebuggerLogFile'
+  ).value
+  const dfdlDebuggerLogLevel = document.getElementById(
+    'dfdlDebuggerLogLevel'
+  ).value
+
+  const daffodilDebugClasspath = getDaffodilDebugClasspathString()
+
+  return [
+    name,
+    data,
+    debugServer,
+    infosetFormat,
+    infosetOutputFilePath,
+    infosetOutputType,
+    tdmlAction,
+    tdmlName,
+    tdmlDescription,
+    tdmlPath,
+    openHexView,
+    openInfosetDiffView,
+    openInfosetView,
+    program,
+    stopOnEntry,
+    trace,
+    useExistingServer,
+    dataEditorPort,
+    dataEditorLogFile,
+    dataEditorLogLevel,
+    dfdlDebuggerLogFile,
+    dfdlDebuggerLogLevel,
+    daffodilDebugClasspath,
+  ]

Review Comment:
   @scholarsmate I fixed this. I return using `return {}` instead of `return []`. I didn't need to specify the strict key name "since the names of the properties are the same as the variables, you can shorten it using the [object literal syntax extensions in ES6](https://www.javascripttutorial.net/es6/object-literal-extensions/).", gotten from https://www.javascripttutorial.net/javascript-return-multiple-values/ under section `Returning multiple values from an function using an object`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Launch Wizard - Allow copying of configs [daffodil-vscode]

Posted by "shanedell (via GitHub)" <gi...@apache.org>.
shanedell commented on code in PR #904:
URL: https://github.com/apache/daffodil-vscode/pull/904#discussion_r1409781997


##########
src/launchWizard/launchWizard.js:
##########
@@ -27,15 +27,88 @@ function getConfigIndex() {
   if (configSelectedValue === 'New Config') {
     document.getElementById('nameLabel').style =
       'margin-top: 10px; visibility: visible;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: hidden;'
   } else {
     document.getElementById('nameLabel').style = 'visibility: hidden;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: visible;'
   }
 
   return configSelectedValue === 'New Config'
     ? -1
     : configSelectionBox.selectedIndex
 }
 
+function getConfigValues() {
+  var configSelectionBox = document.getElementById('configSelected')
+  var configSelectedValue =
+    configSelectionBox.options[configSelectionBox.selectedIndex].value
+  const name =
+    configSelectedValue === 'New Config'
+      ? document.getElementById('name').value
+      : configSelectedValue
+  const data = document.getElementById('data').value
+  const debugServer = parseInt(document.getElementById('debugServer').value)
+  const infosetFormat = document.getElementById('infosetFormat').value
+  const infosetOutputFilePath = document.getElementById(
+    'infosetOutputFilePath'
+  ).value
+  const infosetOutputType = document.getElementById('infosetOutputType').value
+  const tdmlAction = document.getElementById('tdmlAction').value
+  const tdmlName = document.getElementById('tdmlName').value
+  const tdmlDescription = document.getElementById('tdmlDescription').value
+  const tdmlPath = document.getElementById('tdmlPath').value
+  const openHexView = document.getElementById('openHexView').checked

Review Comment:
   Yeah the hexview is still being used but believe omega-edit over takes it. I will make an issue to remove the hex view stuff as it will be replaced by omega-edit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Launch Wizard - Allow copying of configs [daffodil-vscode]

Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate commented on code in PR #904:
URL: https://github.com/apache/daffodil-vscode/pull/904#discussion_r1415952351


##########
src/launchWizard/launchWizard.js:
##########
@@ -27,15 +27,88 @@ function getConfigIndex() {
   if (configSelectedValue === 'New Config') {
     document.getElementById('nameLabel').style =
       'margin-top: 10px; visibility: visible;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: hidden;'
   } else {
     document.getElementById('nameLabel').style = 'visibility: hidden;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: visible;'
   }
 
   return configSelectedValue === 'New Config'
     ? -1
     : configSelectionBox.selectedIndex
 }
 
+function getConfigValues() {
+  var configSelectionBox = document.getElementById('configSelected')
+  var configSelectedValue =
+    configSelectionBox.options[configSelectionBox.selectedIndex].value
+  const name =
+    configSelectedValue === 'New Config'
+      ? document.getElementById('name').value
+      : configSelectedValue
+  const data = document.getElementById('data').value
+  const debugServer = parseInt(document.getElementById('debugServer').value)
+  const infosetFormat = document.getElementById('infosetFormat').value
+  const infosetOutputFilePath = document.getElementById(
+    'infosetOutputFilePath'
+  ).value
+  const infosetOutputType = document.getElementById('infosetOutputType').value
+  const tdmlAction = document.getElementById('tdmlAction').value
+  const tdmlName = document.getElementById('tdmlName').value
+  const tdmlDescription = document.getElementById('tdmlDescription').value
+  const tdmlPath = document.getElementById('tdmlPath').value
+  const openHexView = document.getElementById('openHexView').checked
+  const openInfosetDiffView = document.getElementById(
+    'openInfosetDiffView'
+  ).checked
+  const openInfosetView = document.getElementById('openInfosetView').checked
+  const program = document.getElementById('program').value
+  const stopOnEntry = document.getElementById('stopOnEntry').checked
+  const trace = document.getElementById('trace').checked
+  const useExistingServer = document.getElementById('useExistingServer').checked
+  const dataEditorPort = parseInt(
+    document.getElementById('dataEditorPort').value
+  )
+  const dataEditorLogFile = document.getElementById('dataEditorLogFile').value
+  const dataEditorLogLevel = document.getElementById('dataEditorLogLevel').value
+  const dfdlDebuggerLogFile = document.getElementById(
+    'dfdlDebuggerLogFile'
+  ).value
+  const dfdlDebuggerLogLevel = document.getElementById(
+    'dfdlDebuggerLogLevel'
+  ).value
+
+  const daffodilDebugClasspath = getDaffodilDebugClasspathString()
+
+  return [
+    name,
+    data,
+    debugServer,
+    infosetFormat,
+    infosetOutputFilePath,
+    infosetOutputType,
+    tdmlAction,
+    tdmlName,
+    tdmlDescription,
+    tdmlPath,
+    openHexView,
+    openInfosetDiffView,
+    openInfosetView,
+    program,
+    stopOnEntry,
+    trace,
+    useExistingServer,
+    dataEditorPort,
+    dataEditorLogFile,
+    dataEditorLogLevel,
+    dfdlDebuggerLogFile,
+    dfdlDebuggerLogLevel,
+    daffodilDebugClasspath,
+  ]

Review Comment:
   Excellent.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Launch Wizard - Allow copying of configs [daffodil-vscode]

Posted by "shanedell (via GitHub)" <gi...@apache.org>.
shanedell commented on code in PR #904:
URL: https://github.com/apache/daffodil-vscode/pull/904#discussion_r1409785990


##########
src/launchWizard/launchWizard.js:
##########
@@ -27,15 +27,88 @@ function getConfigIndex() {
   if (configSelectedValue === 'New Config') {
     document.getElementById('nameLabel').style =
       'margin-top: 10px; visibility: visible;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: hidden;'
   } else {
     document.getElementById('nameLabel').style = 'visibility: hidden;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: visible;'
   }
 
   return configSelectedValue === 'New Config'
     ? -1
     : configSelectionBox.selectedIndex
 }
 
+function getConfigValues() {
+  var configSelectionBox = document.getElementById('configSelected')
+  var configSelectedValue =
+    configSelectionBox.options[configSelectionBox.selectedIndex].value
+  const name =
+    configSelectedValue === 'New Config'
+      ? document.getElementById('name').value
+      : configSelectedValue
+  const data = document.getElementById('data').value
+  const debugServer = parseInt(document.getElementById('debugServer').value)
+  const infosetFormat = document.getElementById('infosetFormat').value
+  const infosetOutputFilePath = document.getElementById(
+    'infosetOutputFilePath'
+  ).value
+  const infosetOutputType = document.getElementById('infosetOutputType').value
+  const tdmlAction = document.getElementById('tdmlAction').value
+  const tdmlName = document.getElementById('tdmlName').value
+  const tdmlDescription = document.getElementById('tdmlDescription').value
+  const tdmlPath = document.getElementById('tdmlPath').value
+  const openHexView = document.getElementById('openHexView').checked

Review Comment:
   @stricklandrbls I added is https://github.com/apache/daffodil-vscode/issues/905 to go about removing the items related to hexview and possibly updating to talk to omega-edit now instead, such as the button in the menu bar that opens the hexview could be updated to open omega-edit instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Launch Wizard - Allow copying of configs [daffodil-vscode]

Posted by "shanedell (via GitHub)" <gi...@apache.org>.
shanedell merged PR #904:
URL: https://github.com/apache/daffodil-vscode/pull/904


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Launch Wizard - Allow copying of configs [daffodil-vscode]

Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate commented on code in PR #904:
URL: https://github.com/apache/daffodil-vscode/pull/904#discussion_r1413920913


##########
src/launchWizard/launchWizard.js:
##########
@@ -27,15 +27,88 @@ function getConfigIndex() {
   if (configSelectedValue === 'New Config') {
     document.getElementById('nameLabel').style =
       'margin-top: 10px; visibility: visible;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: hidden;'
   } else {
     document.getElementById('nameLabel').style = 'visibility: hidden;'
+    document.getElementById('copyLaunchConfigButton').style =
+      'visibility: visible;'
   }
 
   return configSelectedValue === 'New Config'
     ? -1
     : configSelectionBox.selectedIndex
 }
 
+function getConfigValues() {
+  var configSelectionBox = document.getElementById('configSelected')
+  var configSelectedValue =
+    configSelectionBox.options[configSelectionBox.selectedIndex].value
+  const name =
+    configSelectedValue === 'New Config'
+      ? document.getElementById('name').value
+      : configSelectedValue
+  const data = document.getElementById('data').value
+  const debugServer = parseInt(document.getElementById('debugServer').value)
+  const infosetFormat = document.getElementById('infosetFormat').value
+  const infosetOutputFilePath = document.getElementById(
+    'infosetOutputFilePath'
+  ).value
+  const infosetOutputType = document.getElementById('infosetOutputType').value
+  const tdmlAction = document.getElementById('tdmlAction').value
+  const tdmlName = document.getElementById('tdmlName').value
+  const tdmlDescription = document.getElementById('tdmlDescription').value
+  const tdmlPath = document.getElementById('tdmlPath').value
+  const openHexView = document.getElementById('openHexView').checked
+  const openInfosetDiffView = document.getElementById(
+    'openInfosetDiffView'
+  ).checked
+  const openInfosetView = document.getElementById('openInfosetView').checked
+  const program = document.getElementById('program').value
+  const stopOnEntry = document.getElementById('stopOnEntry').checked
+  const trace = document.getElementById('trace').checked
+  const useExistingServer = document.getElementById('useExistingServer').checked
+  const dataEditorPort = parseInt(
+    document.getElementById('dataEditorPort').value
+  )
+  const dataEditorLogFile = document.getElementById('dataEditorLogFile').value
+  const dataEditorLogLevel = document.getElementById('dataEditorLogLevel').value
+  const dfdlDebuggerLogFile = document.getElementById(
+    'dfdlDebuggerLogFile'
+  ).value
+  const dfdlDebuggerLogLevel = document.getElementById(
+    'dfdlDebuggerLogLevel'
+  ).value
+
+  const daffodilDebugClasspath = getDaffodilDebugClasspathString()
+
+  return [
+    name,
+    data,
+    debugServer,
+    infosetFormat,
+    infosetOutputFilePath,
+    infosetOutputType,
+    tdmlAction,
+    tdmlName,
+    tdmlDescription,
+    tdmlPath,
+    openHexView,
+    openInfosetDiffView,
+    openInfosetView,
+    program,
+    stopOnEntry,
+    trace,
+    useExistingServer,
+    dataEditorPort,
+    dataEditorLogFile,
+    dataEditorLogLevel,
+    dfdlDebuggerLogFile,
+    dfdlDebuggerLogLevel,
+    daffodilDebugClasspath,
+  ]

Review Comment:
   This is fragile.  Just one value out of place and bad things will happen.  I suggest using key/value pairs so that simple changes or reorderings don't break in subtle ways.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org