question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Research refresh functionality

See original GitHub issue

The 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

Issues that are functions calling on refresh (These filepaths are based on the current monorepo-switch branch.

Issues I’m not sure about (i.e. Cannot recreate issue or unsure if it is still an issue)

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 Tree
    • refreshElement(node: IZoweNodeType): Refreshes tree element, i.e. a tree node
    • refreshPS(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.
    • refresh(): Called whenever the tree needs to be refreshed, and fires the data change event
      • Calls mOnDidChangeTreeData on the tree provider.
  • src/dataset/actions:
    • refreshAll(datasetProvider: IZoweTree<IZoweDatasetTreeNode>): Refreshes treeview
    • refreshPS(node: IZoweDatasetTreeNode): Refreshes the passed node with current mainframe data, where “node” represents the data set.
  • src/uss/actions:
    • refreshAllUSS(ussFileProvider: IZoweTree<IZoweUSSTreeNode>): Refreshes treeview
    • refreshUSSInTree(node: IZoweUSSTreeNode, ussFileProvider: IZoweTree<IZoweUSSTreeNode>)
      • Seems to just call refreshElement on the node in the tree.
  • src/uss/ZoweUssNode:
    • refreshUSS(): Refreshes the passed node with current mainframe data
    • refreshAndReopen(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 Session
    • labelRefresh(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:open
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
JillieBeanSimcommented, Dec 10, 2020

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() method
  • unused file and folder mvs/mvsNodeActions.ts removed
2reactions
crawrcommented, Nov 6, 2020

Thanks 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found