diff --git a/packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts b/packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts index 55793a658..c21718f2c 100644 --- a/packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts +++ b/packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts @@ -507,22 +507,31 @@ export interface IZoweJobTreeNode extends IZoweTreeNode { /** * Sets the encoding of the job node * - * @returns {void} + * @returns {void | PromiseLike} */ - setEncoding?(encoding: ZosEncoding): void; + setEncoding?(encoding: ZosEncoding): void | PromiseLike; /** * Gets the encoding of the job node * - * @returns {ZosEncoding} + * @returns {ZosEncoding | PromiseLike} */ - getEncoding?(): ZosEncoding; + getEncoding?(): ZosEncoding | PromiseLike; /** * Gets the encoding of a job node given a path * - * @param {string} uriPath the basepath of the node - * @returns {ZosEncoding} + * @param {string} uriPath the path of the node + * @returns {ZosEncoding | PromiseLike} */ getEncodingInMap?(uriPath: string): ZosEncoding | PromiseLike; + + /** + * Updates the encoding of a job node given a path + * + * @param {string} uriPath the path of the node + * @param {ZosEncoding} encoding the encoding to apply + * @returns {void | PromiseLike} + */ + updateEncodingInMap?(uriPath: string, encoding: ZosEncoding): void | PromiseLike; } diff --git a/packages/zowe-explorer/src/trees/job/JobTree.ts b/packages/zowe-explorer/src/trees/job/JobTree.ts index ec4239777..54d1f9a29 100644 --- a/packages/zowe-explorer/src/trees/job/JobTree.ts +++ b/packages/zowe-explorer/src/trees/job/JobTree.ts @@ -1183,7 +1183,7 @@ export class JobTree extends ZoweTreeProvider implements Types encoding ??= await SharedUtils.promptForEncoding(node); if (encoding !== undefined) { // Set the encoding, fetch the new contents with the encoding, and open the spool file. - node.setEncoding(encoding); + await node.setEncoding(encoding); await JobFSProvider.instance.fetchSpoolAtUri(node.resourceUri); await vscode.commands.executeCommand("vscode.open", node.resourceUri); }