shanedell commented on code in PR #664:
URL: https://github.com/apache/daffodil-vscode/pull/664#discussion_r1232494781
##########
src/launchWizard/launchWizard.js:
##########
@@ -18,12 +18,62 @@
// Retrieve vscode api - Doing this multiple times causes issues with the
scripts
const vscode = acquireVsCodeApi()
+// Function to get config index
+function getConfigIndex() {
+ var configSelectionBox = document.getElementById('configSelected')
+ var configSelectedValue =
+ configSelectionBox.options[configSelectionBox.selectedIndex].value
+
+ if (configSelectedValue === 'New Config') {
+ document.getElementById('nameLabel').style =
+ 'margin-top: 10px; visibility: visible;'
+ } else {
+ document.getElementById('nameLabel').style = 'visibility: hidden;'
+ }
+
+ return configSelectedValue === 'New Config'
+ ? -1
+ : configSelectionBox.selectedIndex
+}
+
+// Function get daffodil debug classpath string
+function getDaffodilDebugClasspathString() {
+ let list = document.getElementById('daffodilDebugClasspathTable')
+
+ let daffodilDebugClasspath = ''
+
+ list.childNodes.forEach((childNode) => {
+ let classpath = childNode.textContent
+ .replaceAll(' ', '') // remove any un-needed whitespace
+ .replace('-', '') // remove initial - in front of every item
+ .split('\n')
+ .filter((cp) => cp != '')
+ .join(':')
+
+ if (classpath != '') {
+ daffodilDebugClasspath +=
+ childNode === list.childNodes[list.childNodes.length - 1]
+ ? classpath
+ : classpath + ':'
Review Comment:
So the join on line 51 may not do anything because each childNode item
should only have one classpath. As where this code this creating a single
string that will have all classpath items in it separated via `:`. I agreee
with the functional aspect.
--
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]