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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]