Skip to content

Commit

Permalink
Make changes to match async compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
  • Loading branch information
awharn committed Dec 13, 2024
1 parent 61fae28 commit cf6f6c2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
21 changes: 15 additions & 6 deletions packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,22 +507,31 @@ export interface IZoweJobTreeNode extends IZoweTreeNode {
/**
* Sets the encoding of the job node
*
* @returns {void}
* @returns {void | PromiseLike<void>}
*/
setEncoding?(encoding: ZosEncoding): void;
setEncoding?(encoding: ZosEncoding): void | PromiseLike<void>;

/**
* Gets the encoding of the job node
*
* @returns {ZosEncoding}
* @returns {ZosEncoding | PromiseLike<ZosEncoding>}
*/
getEncoding?(): ZosEncoding;
getEncoding?(): ZosEncoding | PromiseLike<ZosEncoding>;

/**
* 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<ZosEncoding>}
*/
getEncodingInMap?(uriPath: string): ZosEncoding | PromiseLike<ZosEncoding>;

/**
* 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<void>}
*/
updateEncodingInMap?(uriPath: string, encoding: ZosEncoding): void | PromiseLike<void>;
}
2 changes: 1 addition & 1 deletion packages/zowe-explorer/src/trees/job/JobTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ export class JobTree extends ZoweTreeProvider<IZoweJobTreeNode> 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);
}
Expand Down

0 comments on commit cf6f6c2

Please sign in to comment.