vscode-extension-for-zowe icon indicating copy to clipboard operation
vscode-extension-for-zowe copied to clipboard

Opening multiple members in VS Code editor tabs

Open solsu01 opened this issue 5 years ago • 8 comments

I'd like to have more than one PDS member open in my edit tabs on VS Code when I double click a member from the list. Today, if I double click it replaces what I have open in my current tab, rather than opening it in a new tab. If I right click and say "edit" on the member, it does open it in a new tab. This seems to break VS Code convention.

solsu01 avatar Feb 11 '20 00:02 solsu01

Thanks @solsu01. What is your use case here? You want to compare multiple members but to what end?

I have heard this requirement a few times in recent weeks. Just want to be clear on what you're trying to achieve and where it fits in your workflow.

jalel01 avatar Feb 11 '20 07:02 jalel01

@jalel01 I think this is useful for comparing files but generally, it is common to open multiple files at once to edit. This is true in a editor but also in many other programs, like MS Word.

The interaction details are a little tricky and inconsistent. Like @solsu01 said, in the VS Code explorer, a user can single click a file to open it and single click again to replace that file in the editor window. But, the user can double click to open the file in a new fixed editor tab. In the Zowe Explorer, a single or double click opens the file but replaces what was there. But, clicking on the edit icon opens the file or member in a new fixed tab. So, it seems wise to follow the VS Code Explorer convention.

image

jelaplan avatar Feb 11 '20 15:02 jelaplan

I wanted to manually copy/paste portions of JCL from one member to another (because who writes any new JCL?)

What I ended up doing was opening a member, copying the content to a local file, and then using that as a scratchpad to copy into a different member.

solsu01 avatar Feb 11 '20 15:02 solsu01

In general, in an IDE, the user should be allowed to work with multiple source files at a time. Plus from a consistency point of view, double click should behave the same as Right click --> Edit.

venkatzhub avatar Feb 21 '20 23:02 venkatzhub

The Edit action was necessary as Microsoft does not expose the double-click in the API for the tree. As we had the same requirement and could not do it that way we proposed the edit menu and icon and it was accepted as the best work around in https://github.com/zowe/vscode-extension-for-zowe/pull/242

phaumer avatar Feb 22 '20 20:02 phaumer

Thanks @phaumer - it seems like a shortcoming of VS Code. Can we put in feature requests with them?

jelaplan avatar Mar 02 '20 19:03 jelaplan

We absolutely should levy a requirement to have them expose the double click API.

venkatzhub avatar Mar 02 '20 23:03 venkatzhub

I still see this happening with a double click on the tree, you have to double click the file editor tab to keep it open. I do see this resolved issue in vscode that could help with the double click of a tree item https://github.com/microsoft/vscode/issues/85636#issuecomment-726171606

JillieBeanSim avatar Aug 19 '21 13:08 JillieBeanSim

This enhancement has had no community activity for 12 months. The issue also has less than 10 up-votes by the community. No action on this enhancement is targeted for the next 2 calendar quarters. Therefore, this enhancement is being closed. If you feel that this enhancement should continue to be available for community up-votes, you may reopen this issue.

JillieBeanSim avatar Apr 27 '23 11:04 JillieBeanSim