Skip to content

Commit 0374670

Browse files
committed
fix: Enable copybook download
Enable copybook download Signed-off-by: ap891843 <[email protected]>
1 parent 51ec928 commit 0374670

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

clients/cobol-lsp-vscode-extension/src/extension.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export async function activate(context: vscode.ExtensionContext) {
110110
// Custom client handlers
111111
languageClientService.addRequestHandler("cobol/resolveSubroutine", resolveSubroutineURI);
112112
languageClientService.addRequestHandler("copybook/resolve", resolveCopybookHandler);
113-
languageClientService.addRequestHandler("copybook/download", downloadCopybookHandler);
113+
languageClientService.addRequestHandler("copybook/download", downloadCopybookHandler.bind(copyBooksDownloader));
114114

115115
context.subscriptions.push(languageClientService.start());
116116

clients/cobol-lsp-vscode-extension/src/services/copybook/CopybookMessageHandler.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/*
2+
* Copyright (c) 2022 Broadcom.
3+
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
4+
*
5+
* This program and the accompanying materials are made
6+
* available under the terms of the Eclipse Public License 2.0
7+
* which is available at https://www.eclipse.org/legal/epl-2.0/
8+
*
9+
* SPDX-License-Identifier: EPL-2.0
10+
*
11+
* Contributors:
12+
* Broadcom, Inc. - initial API and implementation
13+
*/
14+
115
import {SettingsService} from "../Settings";
216
import {searchInWorkspace} from "../util/FSUtils";
317
import {CopybookURI} from "./CopybookURI";
@@ -21,7 +35,7 @@ export function resolveCopybookHandler(cobolFileName: string, copybookName: stri
2135

2236
export function downloadCopybookHandler(cobolFileName: string, copybookNames: string[], dialectType: string, quietMode: boolean): string {
2337

24-
return this.copybookDownloader.downloadCopybooks(
38+
return this.downloadCopybooks(
2539
cobolFileName,
2640
copybookNames.map(copybookName => new CopybookName(copybookName, dialectType)),
2741
quietMode);

0 commit comments

Comments
 (0)