问题
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.
After search,
hold
onto ► Right Arrow to expand one search result to itsend root
Once reached the
end root
, press ▼ Down Arrow to move on tothe next search result
,hold
onto ► Right Arrow to expand one search result to itsend root
- Repeat
step 1
andstep 2
until all results are expanded.
来源:https://stackoverflow.com/questions/10553469/automatically-expand-all-in-eclipse-search-results