Author Topic: Bookmark stack enhancements  (Read 3036 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2296
  • Hero Points: 197
  • Text
Bookmark stack enhancements
« on: September 04, 2014, 11:37:14 pm »
pop-bookmark removes items from the bookmark stack, and "bookmark-stack" is a modal dialog.
This makes it hard to walk up and down the stack.


It'd be nice if there commands to walk up and down the bookmark stack without changing the stack.


push_tag would clear the stack above the current location before adding the new bookmark.

The "Bookmark Stack" and "Goto bookmark" windows should be a regular tool window - and non-modal -- oh, this would be incredibly helpful!





There are "next_bookmark" and "prev_bookmark" commands, which sound promising, but they don't appear to do anything.




Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3399
  • Hero Points: 465
Re: Bookmark stack enhancements
« Reply #1 on: September 10, 2014, 04:24:02 pm »
These are good suggestions.  I have filed a feature request so that we can address this in a future release.

rgloden

  • Senior Community Member
  • Posts: 169
  • Hero Points: 5
Re: Bookmark stack enhancements
« Reply #2 on: September 12, 2014, 11:29:38 pm »
Let me add my vote for this feature.  I've always wondered why <CNTRL-,> was popping bookmarks instead of just navigating up the stack. 

This would be very useful when I'm, in effect, going up and down the bookmark stack trying to get my head around some code.  Currently after hitting <CNTRL-,> and you decide you need to go back to the previously viewed code, you have to repeat all of the navigation commands (e.g. <CNTRL-/> and then scroll through the references and to find/select the desired reference) ...  even the "Navigate Forward" button is greyed out after hitting the <CNTRL-,>

Graeme

  • Senior Community Member
  • Posts: 2639
  • Hero Points: 330
Re: Bookmark stack enhancements
« Reply #3 on: September 13, 2014, 09:50:35 am »
These are good suggestions.  I have filed a feature request so that we can address this in a future release.
Maybe you could add the code that I posted here, to get the preview window to update as you cursor up/down in the bookmark stack dialog.
http://community.slickedit.com/index.php/topic,9790.msg41779.html#msg41779

I added the SL_ONSELECT case option and commented the break statement at the end of SL_ONINITFIRST.  Don't want to break anything at this stage of the beta testing though.

When the bookmark stack window appears, it highlights the oldest entry in the list.  Maybe it should highlight the last bookmark you pushed, or the last bookmark you jumped to from the bookmarks stack dialog.  That would come close to allowing you to walk up and down the stack without changing it.  In a future version.

Making the bookmark stack dialog modeless is a bit harder as I found out in the other thread.  I'm not sure a modeless bookmark stack dialog is all that useful though.  It might be more useful if it showed the name of the function for each bookmark and showed filenames in "compressed" format if the filename column is too narrow for the filename.  The standard bookmarks tool window should probably do that too.

BTW I checked all the calls to select_tree in slick c macro source (just in case it was possible to use it modelessly) and noticed there's one in  showAlertGroupInProcessItems that calls select_tree with modeless operation.  Don't know if that's a problem.  Maybe the window involved disappears quickly.

Graeme

  • Senior Community Member
  • Posts: 2639
  • Hero Points: 330
Re: Bookmark stack enhancements
« Reply #4 on: September 13, 2014, 09:58:41 am »
Let me add my vote for this feature.  I've always wondered why <CNTRL-,> was popping bookmarks instead of just navigating up the stack. 

This would be very useful when I'm, in effect, going up and down the bookmark stack trying to get my head around some code.  Currently after hitting <CNTRL-,> and you decide you need to go back to the previously viewed code, you have to repeat all of the navigation commands (e.g. <CNTRL-/> and then scroll through the references and to find/select the desired reference) ...  even the "Navigate Forward" button is greyed out after hitting the <CNTRL-,>

Have you tried my xretrace macro
http://community.slickedit.com/index.php/topic,4693.0.html
It remembers where you've been.  Haven't tested with V19 yet though.  Gonna do that soon.

Regarding the bookmark stack, if you step your way up and down the bookmark stack without popping any bookmarks, what would you expect to happen to the stack if you then push a new bookmark?  Currently, if you jump to a pushed bookmark via the bookmark stack dialog, it pushes a new bookmark for where you currently are (if def_search_result_push_bookmark is true), then goes to the selected bookmark.

Graeme

  • Senior Community Member
  • Posts: 2639
  • Hero Points: 330
Re: Bookmark stack enhancements
« Reply #5 on: September 13, 2014, 10:01:36 am »
There are "next_bookmark" and "prev_bookmark" commands, which sound promising, but they don't appear to do anything.
They apply to "persistent" bookmarks.  In V19 they navigate in a more consistent order than V18 I think.

Graeme

  • Senior Community Member
  • Posts: 2639
  • Hero Points: 330
Re: Bookmark stack enhancements
« Reply #6 on: September 13, 2014, 10:11:54 am »
The "Bookmark Stack" and "Goto bookmark" windows should be a regular tool window - and non-modal -- oh, this would be incredibly helpful!

There's a bookmarks toolwindow that displays the same information as the "Goto bookmark" dialog.  The interesting thing about the Goto bookmark dialog is that pops up in "wide" format with all columns automatically sized so that nothing is hidden.