Author Topic: VSE 16: Copy command on Context Menu in Search Results tab  (Read 3356 times)

tinker123

  • Community Member
  • Posts: 98
  • Hero Points: 3
VSE 16: Copy command on Context Menu in Search Results tab
« on: September 14, 2011, 02:13:37 PM »
VSE v16.0.0.6 32-bit
Windows XP

Is there a way to put a "copy" command on the context menu that comes up when right clicking in the Search Results tab after running a search?

If not, this would be a useful feature.

I often use the "list all results" feature in a search to compile related lines of code from multiple files.   I then copy the results out of that tab to a buffer to do other things.

Thanks

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: VSE 16: Copy command on Context Menu in Search Results tab
« Reply #1 on: September 14, 2011, 02:43:10 PM »
@tinker123: The search result (buffer) is handled by SE internal 'grep' language mode.
So basically you can modify 'grep' with 'Options..Slickedit Languages:grep' e.g. use your own (derived) context menu supporting more/other commands (see tbsearch.e::(_OnUpdate_)grep_command_menu). But it's a bit of work..
It depends on how often you need it to expend the effort or not. Maybe 'Open as Editor Window' is good enough if you need it rarely.
HS2


Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: VSE 16: Copy command on Context Menu in Search Results tab
« Reply #2 on: September 14, 2011, 02:42:35 PM »
Macro > Menus...
and Open menu name: _grep_menu_default

You can use Insert to add a new command, set the caption name and use the command copy_to_clipboard into the menu and hit ok.

Also, all the Copy/Cut/Paste commands for your emulation should also work in the Search Results window.


hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: VSE 16: Copy command on Context Menu in Search Results tab
« Reply #3 on: September 14, 2011, 02:49:39 PM »
Lee is of course right. For relatively simple context menu exensions it's sufficient to add a command to the menu (listed in Languages:grep).
So it's obviously not too hard to add 'copy' support :)
HS2

tinker123

  • Community Member
  • Posts: 98
  • Hero Points: 3
Re: VSE 16: Copy command on Context Menu in Search Results tab
« Reply #4 on: September 14, 2011, 02:55:48 PM »
Macro > Menus...
and Open menu name: _grep_menu_default

You can use Insert to add a new command, set the caption name and use the command copy_to_clipboard into the menu and hit ok.

Also, all the Copy/Cut/Paste commands for your emulation should also work in the Search Results window.

Thanks!