You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by ar...@apache.org on 2023/08/10 15:34:55 UTC

[daffodil-vscode] 01/01: Fix issue where functionality was missing when using useExistingServer

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

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

commit 9929a5d0b1f2d1511ba46be5b474c8d84b6756af
Author: Shane Dell <sh...@gmail.com>
AuthorDate: Tue Aug 8 16:54:14 2023 -0400

    Fix issue where functionality was missing when using useExistingServer
    
    - Whenever useExistingServer was set to true a bunch of code didn't get executed.
      - However, the only code that shouldn't have been executed was running the debubbger.
      - This updates fixes that so that only the debugger isn't ran and all other functionality is still available when useExistingServer is set to true.
    
    Closes #747
---
 LICENSE                          | 54 +++++++++++++++++++++-------------------
 src/daffodilDebugger/debugger.ts | 50 ++++++++++++++++++-------------------
 2 files changed, 53 insertions(+), 51 deletions(-)

diff --git a/LICENSE b/LICENSE
index 5f47a6e..5aface3 100644
--- a/LICENSE
+++ b/LICENSE
@@ -176,32 +176,6 @@
 
    END OF TERMS AND CONDITIONS
 
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
 APACHE DAFFODILâ„¢ EXTENSION FOR VISUAL STUDIO CODE SUBCOMPONENTS:
 
 The Apache Daffodilâ„¢ Extension for Visual Studio Code project contains
@@ -651,3 +625,31 @@ conditions of the following licenses.
     DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
     OTHER DEALINGS IN THE FONT SOFTWARE.
+
+The following NOTICE information applies to binary components distributed with this project:
+
+- com.fasterxml.jackson.core.jackson-core-2.13.4.jar
+  This product bundles 'Jackson JSON processor' which bundles a shaded copy of FastDoubleParser <https://github.com/wrandelshofer/FastDoubleParser>.
+  That code is available under the MIT license:
+
+    MIT License
+
+    Copyright (c) 2023 Werner Randelshofer, Switzerland.
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in all
+    copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+    SOFTWARE.
diff --git a/src/daffodilDebugger/debugger.ts b/src/daffodilDebugger/debugger.ts
index 129cee2..5bd7bef 100644
--- a/src/daffodilDebugger/debugger.ts
+++ b/src/daffodilDebugger/debugger.ts
@@ -152,36 +152,36 @@ export async function getDebugger(
 ): Promise<vscode.DebugConfiguration | undefined> {
   config = getConfig(config) // make sure all config attributes are set
 
-  if (!config.useExistingServer) {
-    if (vscode.workspace.workspaceFolders !== undefined) {
-      await stopDebugger()
-
-      // Get program file before debugger starts to avoid timeout
-      if (config.program.includes('${command:AskForProgramName}')) {
-        config.program = await vscode.commands.executeCommand(
-          'extension.dfdl-debug.getProgramName'
-        )
-      }
+  if (vscode.workspace.workspaceFolders !== undefined) {
+    await stopDebugger()
 
-      // Get data file before debugger starts to avoid timeout
-      if (config.data.includes('${command:AskForDataName}')) {
-        config.data = await vscode.commands.executeCommand(
-          'extension.dfdl-debug.getDataName'
-        )
-      }
+    // Get program file before debugger starts to avoid timeout
+    if (config.program.includes('${command:AskForProgramName}')) {
+      config.program = await vscode.commands.executeCommand(
+        'extension.dfdl-debug.getProgramName'
+      )
+    }
 
-      if (!(await getTDMLConfig(config))) {
-        return await stopDebugging().then((_) => undefined)
-      }
+    // Get data file before debugger starts to avoid timeout
+    if (config.data.includes('${command:AskForDataName}')) {
+      config.data = await vscode.commands.executeCommand(
+        'extension.dfdl-debug.getDataName'
+      )
+    }
 
-      let workspaceFolder = vscode.workspace.workspaceFolders[0].uri.fsPath
+    if (!(await getTDMLConfig(config))) {
+      return await stopDebugging().then((_) => undefined)
+    }
 
-      // Get daffodilDebugger class paths to be added to the debugger
-      const daffodilDebugClasspath = await getDaffodilDebugClasspath(
-        config,
-        workspaceFolder
-      )
+    let workspaceFolder = vscode.workspace.workspaceFolders[0].uri.fsPath
+
+    // Get daffodilDebugger class paths to be added to the debugger
+    const daffodilDebugClasspath = await getDaffodilDebugClasspath(
+      config,
+      workspaceFolder
+    )
 
+    if (!config.useExistingServer) {
       await runDebugger(
         context.asAbsolutePath('./'),
         daffodilDebugClasspath,