Constantin
Constantin

Reputation: 17768

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.

Upvotes: 3

Views: 21800

Answers (5)

Younes LAB
Younes LAB

Reputation: 1516

Use Ctrl + Shift + H keys to search for classes.

Upvotes: 0

sumit
sumit

Reputation: 3740

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

enter image description here

Upvotes: 0

Kevin Bowersox
Kevin Bowersox

Reputation: 94469

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.

Upvotes: 1

Adarsh
Adarsh

Reputation: 3641

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

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

Upvotes: 3

harsh
harsh

Reputation: 7692

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 { }

}

Upvotes: 18

Related Questions