Author Topic: How to collapse the folder view  (Read 2022 times)

A

  • Junior Community Member
  • Posts: 6
  • Hero Points: 0
How to collapse the folder view
« on: December 30, 2019, 05:17:22 AM »
Hi,
  I am wondering how to collapse the folder view in the "projects" window. I have expanded a large project to the lowest folder levels and would like to collapse the view and navigate to the folder of interest but then I currently have to collapse each of the folders at each level to get to the top view.
  Is there are simple and quick way to do this?
Thanks

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: How to collapse the folder view
« Reply #1 on: December 30, 2019, 09:05:57 AM »
It looks like there's currently no quick way.  Maybe the "package view" would work better for you  - right click on the project -> select "folder view" -> select "package".

If you have the pro version of slickedit you could load the following macros to get commands "collapse all" and "expand all".  It's also possible to modify the right click menus in the project tool-window to add "expand children" and "collapse children".

Did you know there's a command in the right click (context) menu of an edit window to show the current file in the projects toolwindow (Show File In Projects Tool Window).  The open toolwindow also allows you to synch the current directory with the current edit buffer.  A quick way to open a file is to use the "e" command on the command line followed by the name of the file - slick will give you choices.  The open toolwindow allows you to type any part of the filename and it will list matching files in all sub-folders.

Code: [Select]
#include "slick.sh"

_command void collapse_all_projects_tw() name_info(',')
{
      // bring up the projects toolbar
   activate_projects();

   // find our projects tree
   tree := _tbGetActiveProjectsTreeWid();
   if (tree > 0) {
      tree._TreeCollapseAll(true);
   }
}


_command void expand_all_projects_tw() name_info(',')
{
      // bring up the projects toolbar
   activate_projects();

   // find our projects tree
   tree := _tbGetActiveProjectsTreeWid();
   if (tree > 0) {
      tree._TreeExpandAll(true);
   }
}


A

  • Junior Community Member
  • Posts: 6
  • Hero Points: 0
Re: How to collapse the folder view
« Reply #2 on: January 02, 2020, 05:04:09 AM »
Thanks a lot Graeme!