简体   繁体   中英

Eclipse Keyboard Shortcut To List All Classes in Project

Eclipse has this awesome thing called a Quick Outline CTRL + O . I want something similar but with classes, as I am entering a new project with tons of classes and no clue which source file they come from.

Example: Press CTRL + Shift + O and all classes are listed, you start typing it modifies the list, you press enter, it opens that source file.

Does this functionality exist in Eclipse? I looked through the Keys menu, couldn't find anything, probably not using the right name for it.

Ctrl + Shift + T : All Types ( Classes ) in open projects in workspace

Ctrl + Shift + R : All Files (java, xml, properties) in open projects in workspace

First one in useful in finding classes ABC , XYZ , SABC :

public class ABC {

class XYZ { }

static class SABC { }

}

Ctrl + Shift + R to search for class names using wildcards.

This can be used not just for class files but any type of file.

Try using CTRL + SHIFT + R which displays a list of all classes/files which can be filtered. It saves tons of time.

This shortcut is known as open resource .

If you need to search for a class whose name may not match the filename, such as an inner class you can use file search in combination with class [classname] .

File Search

CTRL + H , then click file search and enter class [yourclasnamehere] .

File search is very useful, it will search the contents of every file for a supplied token. I found it so useful I gave the shortcut its own mapping.

I know its a little late to answer it but would like to add my two cents. apart from all the answers above one can also use 'Type Hierarchy' in eclipse to list down all the classes alphabetically in a specific project of workspace.

In left pane select project whose classes you wish to see and press F4

Alternatively, In left pane select project whose classes you wish to see, right click and click on "Open Type Hierarchy"

select project and open Type Hierarchy or Simply press Shortcut F4

]

It will look like below

在此输入图像描述

使用Ctrl + Shift + H键搜索类。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM