Ahmed
Ahmed

Reputation: 3458

Show project files in eclipse as a searchable list (Source insight like)

Is there a way to make project explorer in eclipse look like source insight enter image description here

As you can see in the right panel there is a listing of all files which can be sorted by name and is searchable which is way better than eclipse

Upvotes: 1

Views: 189

Answers (1)

Mathmagician
Mathmagician

Reputation: 197

You may get better answers by providing a screenshot as an example of what you want to achieve. But I'll do my best.

As far as I know, the Project Explorer (by default) sorts files by name, with folders preceding files. But this only applies to tree leaves (files within each directory). I don't think it is possible to use it to display all files, despite directory, in alphabetical order.

A sort of ugly (in my opinion) workaround could be to use the Ctrl+Shift+R keyboard shortcut and search for '**'. This will list all file names in all open projects within the current workspace. The default sort is by name. You can see where any of these files is in the file tree by selecting the result and clicking the 'Show in' drop-down menu at the bottom of the dialogue box, and selecting 'Navigator'. You can open any of these files by selecting the result and clicking the 'Open with' drop-down menu instead, and selecting the appropriate application to open it with.

Consider some alternative options:

  • If you're looking for a way to search for files by name, you can always use the keyboard shortcut Ctrl+Shift+R and type in the beginning of a file name. This is a hard search, but you can somewhat mimic a fuzzy search by using '?' to represent any character and '*' to represent any string (including the empty string). This scope of this search will include the names of all files in all open projects in the current workspace.

  • If you're looking to organise files for a manual search, the Navigator View allows sorting to be toggled between 'by Name' or 'by Type', but like the default for Project Explorer and Package Explorer, sorting applies only to tree leaves (within each directory). This can be set via 'View Menu' -> 'Sort' -> 'by Name' or 'by Type'. ('View Menu' is a button in the top right corner displayed as a white, hollow, downward facing arrow head.)

Upvotes: 1

Related Questions