Is there way to expand all folders in Eclipse project view and search results?

浪子不回头ぞ 提交于 2019-11-27 10:06:12

问题


I'm spending a lot of time manually expanding deeply-nested folders in tree views like the Project Explorer and the File Search result tree. Is there a keyboard shortcut or menu command to expand all folders?


回答1:


In "File Seach Result", right click on the top level folder, there is an "expand all" menu entry.

In the project view, I didn't find the feature.




回答2:


In Windows:

Expand all all in project explorer is Shift+Numpad * (multiplty), as mentioned before. Collapse all in project explorer is Ctrl+Shift+Numpad - (subtract).

Alternatively, you can just jam on the right arrow to expand to the bottom of a selected tree, or jam on the left arrow to collapse back up to the top.

If you want to see all the shortcuts available for the particular context you are in, type Ctrl+Shift+L.




回答3:


On Mac: Select a folder and press Alt+ARROW_RIGHT. That should expand all subfolders in the file explorer of eclipse.




回答4:


Eclipse on Linux:

SHIFT + RIGHT arrow

Expand all folders below the selected folder. If you do it multiple times, next set of folders expand.

SHIFT + LEFT arrow

Collapses all folders below the selected folder.

Eclipse on Windows:

Right arrow -->> Expand
Left arrow -->> Collapse




回答5:


Mars.1 Release (4.5.1), Linux (RHEL 6.7)

Expand Folders

Tap * once for each level that all folders under the selected folder should be expanded. For example, tapping * three times will expand all folders out to three levels.

(CTRL SHIFT Numpad * doesn't work for me as it should with this particular build/machine.)


Collapse All Folders

Tap Numpad / once to collapse all folders under the selected folder.


Expand/Collapse Single Folders

Shift + Right Arrow
Shift + Left Arrow




回答6:


If you want to simply search a file anywhere: CTRL + SHIFT + R (Faster workspace navigation)

Collapse All: Shift + NUM-KEYPAD-MULTIPLY (*) -->Use with caution, if you do it on a large project, ALL the files will be expanded! Just managed to crash my Eclipse!




回答7:


In Windows: ( I'm using STS v2.8 based on Eclipse 3.7, maybe a little different... )

in Project/Package Explorer:

Expand all : Shift + Numpad *

Collpse all: Ctrl + Shift + Numberpad_Divide, or just click the small "-" icon at the top right of current view.

But from wat I can see, Expand All action always make the Eclipse/STS not responding (e.x, we may set class files - compiled or in JARs - visible in current view, which cause too many file to be expanded), so maybe it's better to select specified package first.

Also these shortcuts very helpful to locate files:

Ctrl + Shift + R: open resource ( all file types, java, jsp, jspf, properties ...), it's my most frequent use and favorite shortcut;

Ctrl + Shift + T: open type ( for Java files only)

In Search result tab, there are Expand All(+ sign with border) and Collapse All(- sign with border) icons at the top right of the tab.




回答8:


Shift + Right arrow, repeatedly.




回答9:


Following works for Eclipse 4.4 on Linux:

Pressing * (or shift+) repeatedly while a folder is selected expands it's contents.

Pressing - (or shift+) collapses all content.




回答10:


shift + * Expand ALl

Shift _ - Collapse All

that's it.




回答11:


Disable Focus on Active Task option - shown below.



来源:https://stackoverflow.com/questions/3159791/is-there-way-to-expand-all-folders-in-eclipse-project-view-and-search-results

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