vscode-ibmi
vscode-ibmi copied to clipboard
Collapse all/Expande all
I don't know if this function exist or not, but I have some qrpglesrc with thousand of members, and if I want to return to the list of pf-src I have to scroll up until I can close the member list, It should be interest to have a button in object browser to collapse all members list.
Many thanks
Yes, a button to collapse all in the object browser would be very nice.
I don't think we will add expand all, as it will send quite a lot of requests to the server, but collapse all is absolutely doable.
collapse() {
vscode.commands.executeCommand(`workbench.actions.treeView.${viewId}.collapseAll`);
}
This would be added to both the object browser and IFS browser classes, then commands defined for them both and then added to each of the views.
I could Have a look on....
@pabloto While you wait for the button to be implemented, you can use the builtin key-combination of Ctrl-Left
to collapse the tree view. This actually works for all VS Code treeviews.
Hi @chrjorgensen , I have a Mac , I didn't find the relative shortcut...
https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf
Hi @pabloto I've never been on a Mac, but I found it in the keyboard shortcuts on Windows, searching for collapse
:
There's even one shortcut LeftArrow
for collapsing a single node in the tree.
If the functions are not mapped to any key, you can map them yourself.
Hi @chrjorgensen ,
thank you. this is the shortcut for mac:

move to macos, it's really better!!!
@pabloto Yeah, everything is better than Windows. Wish the world were more open to open standards and not Big Tech companies, so I could use my Linux partition on my laptop. 😄
On Mac it is Cmd
key instead of Ctrl
key - so I was almost right about the keyboard shortcut, even without ever been on a Mac. 😆
Not sure to really understand ...but if this feature already exists. and as @chrjorgensen mentions it , we can use the command list.collapse and list.collapse.all with keysbinding.(I've tested It's ok) . is it really usefull to add buttons in the view to do so ?
@novy400 I think it's worth putting a button in the UI for this - I've already done it in the search result view.
It's not obvious to users that one can collapse a node or tree by pressing a keyboard shortcut, and a button is much more obvious. It's even used in VS Code itself - in the Explorer and Search views.
😉 cool so it's ok I can have a look on ....
I've found a way to do it . but it's a bit late now , I don't want to destroy the project 😁💥💥 so I'm working on tomorow. @chrjorgensen I haven't red all your message (😭) but yes It's confirm my thinking (😉) I'm going to do it like you have already done in searchResultView
yop It's done but two questions before PR :
- Position of the icon "collapse"
- Which order for the icons ?
- If I want to order the icons ,is it with change of
"group": "navigation"
to"group": "navigation@1"
in package.json ? - do you have an idea of a new order for them ?
- js to ts
- do I have to translate the js file to ts file (ifsbrowser.js and objectBrowser.js ) ? ( Perhaps I can do it but in ts i'm a newbie...) have a good day ! yvon
I think we should group the Refresh
and Collapse all
buttons and place them to the far right (since they both act on the view content and that's how VS Code arranges them in the File Explorer view, which most are familiar with) and in the specified order:
The icons are sorted by name in a navigation group, so you should put Refresh
into navigation@1
and Collapse all
into navigation@2
. Try that...
Leave the file as JavaScript - and the conversion to Typescript to the experts (and I'm not an expert! 😆). Let's get this into the extension asap.
Thanks @chrjorgensen PR done...
Implemented. Thank you @novy400!