Author Topic: project toolbar context menu add-ons  (Read 19669 times)

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
project toolbar context menu add-ons
« on: February 19, 2010, 11:57:14 AM »
This is a re-posting of the macros I posted here
http://community.slickedit.com/index.php?topic=3459.0

This code adds a "more" sub-menu to three of the context (right click) menus in the project toolbar - the "file" context menu, the "folder" context menu and the "project" context menu.  The new sub-menu allows you to add a new file to the project, create a new folder, open a file from the folder, shell, explore and a few other things.

Installation :
Unzip the attached to a folder of your choice e.g. your configuration folder.
If you're using slick V11 or V12, open the file ProjectTBExtraMenus.e in an editor and comment/ uncomment the #defines at the start that select the version.  Similarly for ProjectTBExtra.e
//#define SLICK_V11
//#define SLICK_V12
If you're using slick V13 or slick V14 the code should work as is.

Using the load module command on the macros menu, Load ProjectTBExtra.e then ProjectTBExtraMenus.e
Right click on a file, folder or project name in the projects toolbar and you should have a new "more" menu option.

Written for
Slickedit version 11 to 14.  Do not use this code in slick V15!
Note, if you have already modified the menus _projecttb_folder_menu, _projecttb_project_menu or _projecttb_file_menu, you should not load this code because you will lose your menu customisations.
If you load a slickedit hotfix in future, you may also need to manually edit the menus in ProjectTBExtraMenus.e to get the extra context menu "more" option back.

Limitations :
These commands work when the project auto-folder mode is either directory view or custom view.  Package view is untested because I don't use it!
The code defines an on_load event handler for _workspace_new_form - which might be a problem one day, but is ok in slick V13/V14.  See the start of the ProjectTBExtra.e file for more detail.

Graeme