Research refresh functionality
See original GitHub issueThe purpose of this issue is to track research on refresh in Zowe Explorer.
- Gather issues related to refresh in Zowe Explorer
- Examine the different types of refresh in Zowe Explorer
- Outside-in view/use case scenarios
- Look for areas of improvement
issues related to refresh in Zowe Explorer Issues that are directly refresh
- https://github.com/zowe/vscode-extension-for-zowe/issues/1021 Refresh button not working (for Favorites)
- https://github.com/zowe/vscode-extension-for-zowe/issues/754 Requests sent to z/OS when tree item is closed
- ~#1078 Tree Refresh button does not pick up extenders’ profile updates~
Issues that are functions calling on refresh
(These filepaths are based on the current monorepo-switch
branch.
- Profiles:
- https://github.com/zowe/vscode-extension-for-zowe/issues/1033 Clear all settings and default profile in meta yaml to null if profiles are manually deleted(?)
- https://github.com/zowe/vscode-extension-for-zowe/issues/752 Refresh required for profile created in Zowe CLI to be available in ZE
- Data Sets:
- https://github.com/zowe/vscode-extension-for-zowe/issues/843 Refresh DS after Migrate/Recall DS
- USS:
- https://github.com/zowe/vscode-extension-for-zowe/issues/769 Refresh USS file list under directory
- https://github.com/zowe/vscode-extension-for-zowe/issues/650 USS tree collapses after folder rename
- #1079 When using Toggle Binary/Text command, only refresh parent node
- Jobs:
- https://github.com/zowe/vscode-extension-for-zowe/issues/988 Enable update of Job Logs
- https://github.com/zowe/vscode-extension-for-zowe/issues/578 Call refresh on Jobs view when a job is deleted
Issues I’m not sure about (i.e. Cannot recreate issue or unsure if it is still an issue)
- https://github.com/zowe/vscode-extension-for-zowe/issues/755 eTag error encountered when saving file in root of USS tree
- https://github.com/zowe/vscode-extension-for-zowe/issues/471 Refresh of DS is taking long time
- https://github.com/zowe/vscode-extension-for-zowe/issues/832 Refresh DS members without having to individually select them
Different types of refresh in Zowe Explorer
In the zowe-explorer-api
package
src/Utils.ts:(This file no longer exists.)refreshTree(IZoweTreeNode)
: Refresh profile and session (sessNode, which is type IZoweTreeNode)
- src/ProfilesCache.ts:
refresh(apiRegister: ZoweExplorerApi.IApiRegisterClient)
:- Gets base profiles
- Gets extender profiles
- Get an array of all profiles (Profiles.allProfiles)
- Get an array of all profile types (Profiles.allTypes)
- Remove all profiles from profilesForValidation array (profiles.profilesForValidation)
- src/IZoweTree.ts (Declarations only):
refresh()
: Refreshes TreerefreshElement(node: IZoweNodeType)
: Refreshes tree element, i.e. a tree noderefreshPS(node: IZoweNodeType)
: Refreshes the passed node with current mainframe data. Seems to be used (defined) by the Data Sets view only (in the zowe-explorer package)
- src/IZoweTreeNode.ts (Declarations only. The below functions are specific to IZoweUssTreeNode only):
refreshUSS?()
: Refreshes the passed node with current mainframe data. (Function definition is in ZoweUSSNode.ts.)refreshAndReopen?(hasClosedInstance?: boolean)
: Refreshes node and reopens it. (Function definition is in ZoweUSSNode.ts)
In the zowe-explorer
package
- src/abstract/ZoweTreeProvider:
refreshElement(element: IZoweDatasetTreeNode)
: Called whenever the tree (tree element?) needs to be refreshed, and fires the data change event- Marks element as dirty, then calls
mOnDidChangeTreeData
on the element in the tree provider.
- Marks element as dirty, then calls
refresh()
: Called whenever the tree needs to be refreshed, and fires the data change event- Calls
mOnDidChangeTreeData
on the tree provider.
- Calls
- src/dataset/actions:
refreshAll(datasetProvider: IZoweTree<IZoweDatasetTreeNode>)
: Refreshes treeviewrefreshPS(node: IZoweDatasetTreeNode)
: Refreshes the passed node with current mainframe data, where “node” represents the data set.
- src/uss/actions:
refreshAllUSS(ussFileProvider: IZoweTree<IZoweUSSTreeNode>)
: Refreshes treeviewrefreshUSSInTree(node: IZoweUSSTreeNode, ussFileProvider: IZoweTree<IZoweUSSTreeNode>)
- Seems to just call
refreshElement
on the node in the tree.
- Seems to just call
- src/uss/ZoweUssNode:
refreshUSS()
: Refreshes the passed node with current mainframe datarefreshAndReopen(hasClosedInstance = false)
: Refreshes node and reopens it
- src/job/actions:
refreshAllJobs(jobsProvider: IZoweTree<IZoweJobTreeNode>)
: Refresh all jobs in the job tree.refreshJobsServer(node: IZoweJobTreeNode, jobsProvider: IZoweTree<IZoweJobTreeNode>)
: Refresh a node in the job tree
- src/shared/utils.ts:
refreshTree(sessNode: IZoweTreeNode)
: Refresh Profile and SessionlabelRefresh(node: vscode.TreeItem)
: Not actually a tree refresh, but just a silent label rename to force a node to repaint.
- src/utils/ProfileUtils.ts:
refreshTree(sessNode: IZoweTreeNode)
: Refresh Profile and Session
Outside-in view/use case scenarios (See comment below.)
Areas of potential improvement
- Name refresh functions more descriptively to better differentiate them and what they do.
- Consider breaking the refresh in Profiles.ts down into smaller functions.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (9 by maintainers)
Top Results From Across the Web
refresh, reread, research, executeQuery - which one to use?
This method basically refreshes the data displayed in the form controls with whatever is stored in the form cache for that particular datasource...
Read more >Research Refresh - University of Warwick
Research Refresh gives PGRs the opportunity to take a break from their work, chat with other researchers, and enjoy some coffee, cakes, snacks...
Read more >Difference between refresh, reread, research ...
Calling refresh This method basically refreshes the data displayed in the form controls with whatever is stored in the form cache for that ......
Read more >Tutorial: refresh, reread, research, executeQuery - which one ...
This method basically refreshes the data displayed in the form controls with whatever is stored in the form cache for that particular datasource...
Read more >Differences between reread(), refresh(),research()
Differences between reread(), refresh(),research() ... When working with Forms, commonly after opened the form we need to do some operations with ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Working on a fork for the refresh refactoring https://github.com/JillieBeanSim/vscode-extension-for-zowe/tree/refresh-refactoring
So far
refreshAll
/refreshAllUSS
/refreshAllJobs
in actions.ts file (datasets, uss, and jobs) have been removed and all calls are using refreshAll() in the new/shared/refresh.ts
file.dsNodeActions.ts
has been removed since all it had was another refreshAll() methodmvs/mvsNodeActions.ts
removedThanks for your hard work on putting this together, @lauren-li !
The only thing I could add under USS tree is the Toggle Binary/Text command. Currently, when I select this option, all the expanded folders are also refreshed. Ideally, only the parent node of the file is refreshed.