Vscode-extension-for-zowe: Creating data sets causes tree to loose expand behavior

Created on 31 Jan 2020  路  6Comments  路  Source: zowe/vscode-extension-for-zowe

  • Have a connection and filter that shows at least two existing PDS with members
  • Expand the first and you see the members listed.
  • Create a new data set such as a sequential one.
  • Expand the second PDS

--> Nothing happens. The members are not shown. You have to restart VS Code.

bug

All 6 comments

This is still a problem in the Zowe 1.2 release. This will probably required an emergency 1.2.1 release.

@katelynienaber the problem seems to be caused by these three lines 876-878. When I comment these out it works again. The tree collapses, but it does not loose its behavior. What is the call to createTreeView() intended to do?

const newNode = await node.getChildren().then((children) => children.find((child) => child.label === name));
const newNodeView = vscode.window.createTreeView("zowe.explorer", {treeDataProvider: datasetProvider});
newNodeView.reveal(newNode, {select: true});

Yes this is something I noticed while working on PR #462.

createTreeView() allows you to control the tree view's visual properties via a TreeDataProvider(I am usually using it to select and expand a data set which has been found in a search)

Apparently there can only be one instance of TreeDataProvider at a time, and taking control of it elsewhere in the code causes the previous instance not to work.

In PR #462 I fixed it by making one TreeDataProvider available to extension.js (line 82). It should be exported if this is causing problems in other classes. Maybe it belongs in DatasetTree as this class is required for the block in which the databaseViewis first assigned.

Let me know what you think and I can create a PR for this issue and update PR #462 as well.

I tried that branch (commenting our the compile errors). I still saw the same issue after creating a data set @katelynienaber.

@phaumer Could you give me more details? I tried it exactly as it is written in the question and I am able to expand any data set, before and after adding a PDS or a SDS or a DS.

Tried to push to the branch just in case but Everything is up to date.

Works now in 1.2.1. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zdmullen picture zdmullen  路  3Comments

phaumer picture phaumer  路  5Comments

jellypuno picture jellypuno  路  5Comments

katelynienaber picture katelynienaber  路  3Comments

ghost picture ghost  路  4Comments