Automatically expand all in Eclipse Search results

懵懂的女人 提交于 2020-01-03 07:19:58

问题


I usually want to have all the search results (from ctrl-H) fully expanded, but only the first leaf node is expanded by default.

What I end up doing is clicking the "Expand All" button in the Search view but this is tedious.

Is there a way to automatically have results fully expanded?


回答1:


No but you can use the keyboard shortcuts of your OS. On Linux, use Nk* (* on the numpad) to expand the current node and all children.

Windows user can use Shift+Nk*

On the Mac, select all nodes with Command+A and then expand them with Command+Right Arrow




回答2:


On a Mac without the numpad, to avoid moving the mouse:

  • do the search

  • the focus moves in the search view

    (make sure to close the Find/Replace dialog before searching, otherwise it would take the focus)

  • do this sequence quickly:

    • Alt ⎇ + ▲ Up Arrow (select the root node)
    • Alt ⎇ + ◀ Left Arrow (collapse the root node)
    • Alt ⎇ + ► Right Arrow (expand the root node)

      (For some reason + doesn't expand all of the root children, first you have to collapse it.)

This is faster than clicking on the small + icon.




回答3:


On a Windows without a numpad, the following can help to expand the search result fast without click the mouse.

This method does not expand result instantly, but i found it to be more convenient and faster than using mouse to click the + button on Eclipse.

  1. After search, hold onto ► Right Arrow to expand one search result to its end root

  2. Once reached the end root, press ▼ Down Arrow to move on to the next search result, hold onto ► Right Arrow to expand one search result to its end root

  3. Repeat step 1 and step 2 until all results are expanded.


来源:https://stackoverflow.com/questions/10553469/automatically-expand-all-in-eclipse-search-results

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!