Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type to session nodes #3309

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
- Power users and developers can now build links to efficiently open mainframe resources in Zowe Explorer. Use the **Copy External Link** option in the context menu to get the URL for a data set or USS resource, or create a link in the format `vscode://Zowe.vscode-extension-for-zowe?<ZoweResourceUri>`. For more information on building resource URIs, see the [FileSystemProvider wiki article](https://github.com/zowe/zowe-explorer-vscode/wiki/FileSystemProvider#file-paths-vs-uris). [#3271](https://github.com/zowe/zowe-explorer-vscode/pull/3271)
- Implemented more user-friendly error messages for API or network errors within Zowe Explorer. [#3243](https://github.com/zowe/zowe-explorer-vscode/pull/3243)
- Use the "Troubleshoot" option for certain errors to obtain additional context, tips, and resources for how to resolve the errors. [#3243](https://github.com/zowe/zowe-explorer-vscode/pull/3243)
- Allowed extenders to add context menu actions to a top level node, i.e. data sets, USS, Jobs, by encoding the profile type in the context value. [#3309](https://github.com/zowe/zowe-explorer-vscode/pull/3309)

### Bug fixes

Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer/src/configuration/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class Constants {
public static readonly HOME_SUFFIX = Constants.CONTEXT_PREFIX + "home";
public static readonly FAV_PROFILE_CONTEXT = "profile_fav";
public static readonly RC_SUFFIX = Constants.CONTEXT_PREFIX + "rc=";
public static readonly TYPE_SUFFIX = Constants.CONTEXT_PREFIX + "type=";
public static readonly VALIDATE_SUFFIX = Constants.CONTEXT_PREFIX + "validate";
public static readonly NO_VALIDATE_SUFFIX = Constants.CONTEXT_PREFIX + "noValidate";
public static readonly INFORMATION_CONTEXT = "information";
Expand Down
2 changes: 1 addition & 1 deletion packages/zowe-explorer/src/trees/dataset/DatasetTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ export class DatasetTree extends ZoweTreeProvider<IZoweDatasetTreeNode> implemen
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
session,
profile,
contextOverride: Constants.DS_SESSION_CONTEXT,
contextOverride: Constants.DS_SESSION_CONTEXT + Constants.TYPE_SUFFIX + profile.type,
});
if (profile.type !== "zosmf") {
// TODO: Why do we inject profiles in context value only for DS tree?
Expand Down
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 @@ -202,7 +202,7 @@ export class JobTree extends ZoweTreeProvider<IZoweJobTreeNode> implements Types
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
session,
profile,
contextOverride: Constants.JOBS_SESSION_CONTEXT,
contextOverride: Constants.JOBS_SESSION_CONTEXT + Constants.TYPE_SUFFIX + profile.type,
});
await this.refreshHomeProfileContext(node);
const icon = IconGenerator.getIconByNode(node);
Expand Down
2 changes: 1 addition & 1 deletion packages/zowe-explorer/src/trees/uss/USSTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ export class USSTree extends ZoweTreeProvider<IZoweUSSTreeNode> implements Types
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
session,
profile,
contextOverride: Constants.USS_SESSION_CONTEXT,
contextOverride: Constants.USS_SESSION_CONTEXT + Constants.TYPE_SUFFIX + profile.type,
});
await this.refreshHomeProfileContext(node);
const icon = IconGenerator.getIconByNode(node);
Expand Down