From 1288a555194d3e12d984d2ad818b04c8b891f48c Mon Sep 17 00:00:00 2001 From: Rajat Sahrawat Date: Tue, 11 Feb 2025 14:22:16 +0530 Subject: [PATCH 1/8] Icons for resources and grouped regions Signed-off-by: Rajat Sahrawat --- .../resources/imgs/TCP-IP-service-dark.svg | 7 +++++++ .../resources/imgs/TCP-IP-service-light.svg | 14 +++++++++++++ packages/vsce/resources/imgs/URI-Map-dark.svg | 16 +++++++++++++++ .../vsce/resources/imgs/URI-map-light.svg | 12 +++++++++++ .../imgs/grouped-region-closed-dark.svg | 17 ++++++++++++++++ .../imgs/grouped-region-closed-light.svg | 12 +++++++++++ .../imgs/grouped-region-open-dark.svg | 17 ++++++++++++++++ .../imgs/grouped-region-open-light.svg | 12 +++++++++++ packages/vsce/resources/imgs/library-dark.svg | 19 +++++++++++------- .../resources/imgs/library-dataset-dark.svg | 13 ++++++++++++ .../resources/imgs/library-dataset-light.svg | 13 ++++++++++++ .../vsce/resources/imgs/library-light.svg | 20 +++++++++++-------- .../vsce/resources/imgs/pipeline-dark.svg | 11 ++++++++++ .../vsce/resources/imgs/pipeline-light.svg | 11 ++++++++++ .../vsce/resources/imgs/web-services-dark.svg | 13 ++++++++++++ .../resources/imgs/web-services-light.svg | 13 ++++++++++++ 16 files changed, 205 insertions(+), 15 deletions(-) create mode 100644 packages/vsce/resources/imgs/TCP-IP-service-dark.svg create mode 100644 packages/vsce/resources/imgs/TCP-IP-service-light.svg create mode 100644 packages/vsce/resources/imgs/URI-Map-dark.svg create mode 100644 packages/vsce/resources/imgs/URI-map-light.svg create mode 100644 packages/vsce/resources/imgs/grouped-region-closed-dark.svg create mode 100644 packages/vsce/resources/imgs/grouped-region-closed-light.svg create mode 100644 packages/vsce/resources/imgs/grouped-region-open-dark.svg create mode 100644 packages/vsce/resources/imgs/grouped-region-open-light.svg create mode 100644 packages/vsce/resources/imgs/library-dataset-dark.svg create mode 100644 packages/vsce/resources/imgs/library-dataset-light.svg create mode 100644 packages/vsce/resources/imgs/pipeline-dark.svg create mode 100644 packages/vsce/resources/imgs/pipeline-light.svg create mode 100644 packages/vsce/resources/imgs/web-services-dark.svg create mode 100644 packages/vsce/resources/imgs/web-services-light.svg diff --git a/packages/vsce/resources/imgs/TCP-IP-service-dark.svg b/packages/vsce/resources/imgs/TCP-IP-service-dark.svg new file mode 100644 index 00000000..aff71d0b --- /dev/null +++ b/packages/vsce/resources/imgs/TCP-IP-service-dark.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/vsce/resources/imgs/TCP-IP-service-light.svg b/packages/vsce/resources/imgs/TCP-IP-service-light.svg new file mode 100644 index 00000000..22705c81 --- /dev/null +++ b/packages/vsce/resources/imgs/TCP-IP-service-light.svg @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/vsce/resources/imgs/URI-Map-dark.svg b/packages/vsce/resources/imgs/URI-Map-dark.svg new file mode 100644 index 00000000..71d15508 --- /dev/null +++ b/packages/vsce/resources/imgs/URI-Map-dark.svg @@ -0,0 +1,16 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/vsce/resources/imgs/URI-map-light.svg b/packages/vsce/resources/imgs/URI-map-light.svg new file mode 100644 index 00000000..20682cba --- /dev/null +++ b/packages/vsce/resources/imgs/URI-map-light.svg @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/vsce/resources/imgs/grouped-region-closed-dark.svg b/packages/vsce/resources/imgs/grouped-region-closed-dark.svg new file mode 100644 index 00000000..925d09a9 --- /dev/null +++ b/packages/vsce/resources/imgs/grouped-region-closed-dark.svg @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/vsce/resources/imgs/grouped-region-closed-light.svg b/packages/vsce/resources/imgs/grouped-region-closed-light.svg new file mode 100644 index 00000000..9a67781b --- /dev/null +++ b/packages/vsce/resources/imgs/grouped-region-closed-light.svg @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/vsce/resources/imgs/grouped-region-open-dark.svg b/packages/vsce/resources/imgs/grouped-region-open-dark.svg new file mode 100644 index 00000000..51afccb7 --- /dev/null +++ b/packages/vsce/resources/imgs/grouped-region-open-dark.svg @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/vsce/resources/imgs/grouped-region-open-light.svg b/packages/vsce/resources/imgs/grouped-region-open-light.svg new file mode 100644 index 00000000..8a157e20 --- /dev/null +++ b/packages/vsce/resources/imgs/grouped-region-open-light.svg @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/vsce/resources/imgs/library-dark.svg b/packages/vsce/resources/imgs/library-dark.svg index da32557f..4ec13ba7 100644 --- a/packages/vsce/resources/imgs/library-dark.svg +++ b/packages/vsce/resources/imgs/library-dark.svg @@ -1,8 +1,13 @@ - \ No newline at end of file diff --git a/packages/vsce/resources/imgs/grouped-region-open-dark.svg b/packages/vsce/resources/imgs/grouped-region-open-dark.svg index 51afccb7..e844af2d 100644 --- a/packages/vsce/resources/imgs/grouped-region-open-dark.svg +++ b/packages/vsce/resources/imgs/grouped-region-open-dark.svg @@ -3,15 +3,13 @@ - - + + + + + \ No newline at end of file diff --git a/packages/vsce/resources/imgs/grouped-region-open-light.svg b/packages/vsce/resources/imgs/grouped-region-open-light.svg index 8a157e20..92f893bf 100644 --- a/packages/vsce/resources/imgs/grouped-region-open-light.svg +++ b/packages/vsce/resources/imgs/grouped-region-open-light.svg @@ -3,10 +3,13 @@ - - + + + + + \ No newline at end of file From 0ac9788bb45021dc965049b5e9614d00bf14d05a Mon Sep 17 00:00:00 2001 From: enam-khan Date: Thu, 13 Feb 2025 13:36:00 +0000 Subject: [PATCH 5/8] Updated as some icons not visible on linux Signed-off-by: enam-khan --- .../{TCP-IP-service-dark.svg => tcp-ip-service-dark.svg} | 0 .../{TCP-IP-service-light.svg => tcp-ip-service-light.svg} | 0 .../resources/imgs/{URI-Map-dark.svg => uri-map-dark.svg} | 0 .../resources/imgs/{URI-map-light.svg => uri-map-light.svg} | 0 packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts | 6 ++++-- 5 files changed, 4 insertions(+), 2 deletions(-) rename packages/vsce/resources/imgs/{TCP-IP-service-dark.svg => tcp-ip-service-dark.svg} (100%) rename packages/vsce/resources/imgs/{TCP-IP-service-light.svg => tcp-ip-service-light.svg} (100%) rename packages/vsce/resources/imgs/{URI-Map-dark.svg => uri-map-dark.svg} (100%) rename packages/vsce/resources/imgs/{URI-map-light.svg => uri-map-light.svg} (100%) diff --git a/packages/vsce/resources/imgs/TCP-IP-service-dark.svg b/packages/vsce/resources/imgs/tcp-ip-service-dark.svg similarity index 100% rename from packages/vsce/resources/imgs/TCP-IP-service-dark.svg rename to packages/vsce/resources/imgs/tcp-ip-service-dark.svg diff --git a/packages/vsce/resources/imgs/TCP-IP-service-light.svg b/packages/vsce/resources/imgs/tcp-ip-service-light.svg similarity index 100% rename from packages/vsce/resources/imgs/TCP-IP-service-light.svg rename to packages/vsce/resources/imgs/tcp-ip-service-light.svg diff --git a/packages/vsce/resources/imgs/URI-Map-dark.svg b/packages/vsce/resources/imgs/uri-map-dark.svg similarity index 100% rename from packages/vsce/resources/imgs/URI-Map-dark.svg rename to packages/vsce/resources/imgs/uri-map-dark.svg diff --git a/packages/vsce/resources/imgs/URI-map-light.svg b/packages/vsce/resources/imgs/uri-map-light.svg similarity index 100% rename from packages/vsce/resources/imgs/URI-map-light.svg rename to packages/vsce/resources/imgs/uri-map-light.svg diff --git a/packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts b/packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts index cb20a294..0d775271 100644 --- a/packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts +++ b/packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts @@ -13,7 +13,7 @@ import { TreeItemCollapsibleState, TreeItem, window } from "vscode"; import { CICSRegionTree } from "../CICSRegionTree"; import { getResource } from "@zowe/cics-for-zowe-sdk"; import { CICSLibraryDatasets } from "./CICSLibraryDatasets"; -import { getIconFilePathFromName } from "../../utils/iconUtils"; +import { getFolderIcon } from "../../utils/iconUtils"; import { toArray } from "../../utils/commandUtils"; export class CICSLibraryTreeItem extends TreeItem { @@ -27,7 +27,7 @@ export class CICSLibraryTreeItem extends TreeItem { library: any, parentRegion: CICSRegionTree, directParent: any, - public iconPath = getIconFilePathFromName("library"), + public iconPath = getFolderIcon(false), ) { super(`${library.name}`, TreeItemCollapsibleState.Collapsed); @@ -69,12 +69,14 @@ export class CICSLibraryTreeItem extends TreeItem { const newDatasetItem = new CICSLibraryDatasets(dataset, this.parentRegion, this); //this=CICSLibraryTreeItem this.addDataset(newDatasetItem); } + this.iconPath = getFolderIcon(true); } catch (error) { if (error.mMessage!.includes("exceeded a resource limit")) { window.showErrorMessage(`Resource Limit Exceeded - Set a datasets filter to narrow search`); } else if (this.children.length === 0) { window.showInformationMessage(`No datasets found`); this.label = this.buildLabel([]); + this.iconPath = getFolderIcon(true); } else { window.showErrorMessage( `Something went wrong when fetching datasets - ${JSON.stringify(error, Object.getOwnPropertyNames(error)).replace( From d16e7cc213003a2618c41a81808ceaf2b2459013 Mon Sep 17 00:00:00 2001 From: Rushabh Sojitra Date: Thu, 13 Feb 2025 19:32:11 +0530 Subject: [PATCH 6/8] updated icon for libraryTree Signed-off-by: Rushabh Sojitra --- packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts b/packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts index 0d775271..cb20a294 100644 --- a/packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts +++ b/packages/vsce/src/trees/treeItems/CICSLibraryTreeItem.ts @@ -13,7 +13,7 @@ import { TreeItemCollapsibleState, TreeItem, window } from "vscode"; import { CICSRegionTree } from "../CICSRegionTree"; import { getResource } from "@zowe/cics-for-zowe-sdk"; import { CICSLibraryDatasets } from "./CICSLibraryDatasets"; -import { getFolderIcon } from "../../utils/iconUtils"; +import { getIconFilePathFromName } from "../../utils/iconUtils"; import { toArray } from "../../utils/commandUtils"; export class CICSLibraryTreeItem extends TreeItem { @@ -27,7 +27,7 @@ export class CICSLibraryTreeItem extends TreeItem { library: any, parentRegion: CICSRegionTree, directParent: any, - public iconPath = getFolderIcon(false), + public iconPath = getIconFilePathFromName("library"), ) { super(`${library.name}`, TreeItemCollapsibleState.Collapsed); @@ -69,14 +69,12 @@ export class CICSLibraryTreeItem extends TreeItem { const newDatasetItem = new CICSLibraryDatasets(dataset, this.parentRegion, this); //this=CICSLibraryTreeItem this.addDataset(newDatasetItem); } - this.iconPath = getFolderIcon(true); } catch (error) { if (error.mMessage!.includes("exceeded a resource limit")) { window.showErrorMessage(`Resource Limit Exceeded - Set a datasets filter to narrow search`); } else if (this.children.length === 0) { window.showInformationMessage(`No datasets found`); this.label = this.buildLabel([]); - this.iconPath = getFolderIcon(true); } else { window.showErrorMessage( `Something went wrong when fetching datasets - ${JSON.stringify(error, Object.getOwnPropertyNames(error)).replace( From b6f10ecdc55def4ddb3a54cab8049608a2a81419 Mon Sep 17 00:00:00 2001 From: Rushabh Sojitra Date: Thu, 13 Feb 2025 20:04:14 +0530 Subject: [PATCH 7/8] Updated changelog Signed-off-by: Rushabh Sojitra --- packages/vsce/CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/vsce/CHANGELOG.md b/packages/vsce/CHANGELOG.md index 04a1fa61..ae313300 100644 --- a/packages/vsce/CHANGELOG.md +++ b/packages/vsce/CHANGELOG.md @@ -2,10 +2,13 @@ All notable changes to the "cics-extension-for-zowe" extension will be documented in this file. +## Recent Changes + +- Enhancement: Create icons for library and Web resources. [#229](https://github.com/zowe/cics-for-zowe-client/issues/229) + ## `3.3.3` - BugFix: Duplicate CICSplex exist when connecting to a multi-CMAS system. [#227](https://github.com/zowe/cics-for-zowe-client/issues/227) - Enhancement: Show CMCI error response codes when failing to make requests. [#220](https://github.com/zowe/cics-for-zowe-client/issues/220) -- Enhancement: Create icons for library and Web resources. [#229](https://github.com/zowe/cics-for-zowe-client/issues/229) ## `3.3.2` From 42cb1596466a74d552b2646323fee9a6581b5f6b Mon Sep 17 00:00:00 2001 From: Andrew Twydell Date: Thu, 13 Feb 2025 15:18:28 +0000 Subject: [PATCH 8/8] prevent changing library icon on collapse event Signed-off-by: Andrew Twydell --- packages/vsce/src/extension.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/vsce/src/extension.ts b/packages/vsce/src/extension.ts index 1bc85d47..81e401b7 100644 --- a/packages/vsce/src/extension.ts +++ b/packages/vsce/src/extension.ts @@ -56,7 +56,7 @@ export async function activate(context: ExtensionContext) { } else { window.showErrorMessage( "Zowe Explorer was not found: either it is not installed or you are using an older version without extensibility API. " + - "Please ensure Zowe Explorer v2.0.0-next.202202221200 or higher is installed", + "Please ensure Zowe Explorer v2.0.0-next.202202221200 or higher is installed", ); return; } @@ -90,7 +90,7 @@ export async function activate(context: ExtensionContext) { ); }; - const contextMap: { [key: string]: (node: any) => Promise | void } = { + const contextMap: { [key: string]: (node: any) => Promise | void; } = { cicscombinedprogramtree: expandCombinedTree, cicscombinedtransactiontree: expandCombinedTree, cicscombinedlocalfiletree: expandCombinedTree, @@ -161,7 +161,6 @@ export async function activate(context: ExtensionContext) { "cicstreelocalfile.", "cicstreetask.", "cicstreelibrary.", - "cicslibrary.", "cicstreeweb.", "cicstreetcpips.", "cicstreepipeline.", @@ -177,4 +176,4 @@ export async function activate(context: ExtensionContext) { }); context.subscriptions.concat(getCommands(treeDataProv, treeview)); -} \ No newline at end of file +}