Shanedell commented on code in PR #402:
URL: https://github.com/apache/daffodil-vscode/pull/402#discussion_r1065262904
##########
src/launchWizard/launchWizard.ts:
##########
@@ -325,13 +294,22 @@ class LaunchWizard {
let stopOnEntry = defaultValues.stopOnEntry ? 'checked' : ''
let trace = defaultValues.trace ? 'checked' : ''
let useExistingServer = defaultValues.useExistingServer ? 'checked' : ''
- let daffodilDebugClasspathAction =
- defaultValues.daffodilDebugClasspathAction === 'append'
- ? defaultConf.daffodilDebugClasspath
- : 'replace'
- let replaceCheck =
- daffodilDebugClasspathAction !== 'append' ? 'checked' : ''
- let appendCheck = daffodilDebugClasspathAction === 'append' ? 'checked' :
''
+
+ let daffodilDebugClasspathList =
+ '<ul id="daffodilDebugClasspathTable" style="list-style: none;
padding-left: 20px;">'
+ if (defaultValues.daffodilDebugClasspath) {
+ let itemArray = defaultValues.daffodilDebugClasspath.split(':')
+ for (var i = 0; i < itemArray.length; i++) {
+ daffodilDebugClasspathList += `
+ <li style="margin-left: -5px;"
onclick="removeDebugClasspathItem(this)">
+ <p id="debug-classpath-li-${itemArray[i]}"
class="debug-classpath-item">
+ <button id="remove-debug-classpath-li-${itemArray[i]}"
class="minus-button" type="button">-</button>
+ ${itemArray[i]}
+ </p>
+ </li>`
Review Comment:
Not really. This is done for the initial setup of the list in the extension
code if there are classpath items that need appended at the start, where as
`updateClasspathList` requires using JS to get the list and append items to it.
This can not be done inside of the extensions TS code as it does have have
access to the DOM. The JS code could possibly on startup/load initialize the
list, however doing it this way could cause issues rendering, such as the UI
loading once then immediately getting refreshed causing the render to not seem
smooth or possibly breaking. It would also cause the need to embed the
classpath items into a hidden html element. There is some wiring that can be
done between the JS and TS that could possibly do what you are saying, however
even if it could in this cause it wouldn't be effective and would also probably
cause more issues/confusion than it would fix.
--
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]