Does a “Find in project…” feature exist in Eclipse IDE?

前端 未结 16 1729
执念已碎
执念已碎 2020-11-30 16:21

Does Eclipse have a way to search a whole project for some text like Xcode\'s \"find in project\" feature?

相关标签:
16条回答
  • 2020-11-30 16:28

    There is very nice tool "Eclipse Quicksearch" available. Checkout SpringSource Update Site for Eclipse i.e: http://dist.springsource.com/release/TOOLS/update/e4.6/ (you can try other versions replacing last part of URL with i.e. e4.4 or e4.5)

    It works well with Neon Release (4.6.0). It gives you nice incremental text search with source file preview. I had no issues with it so far.

    Usage: Alt + s "Quick Search Command" opens "Quick Text Search" dialog. You can select whether search should be case sensitive or not. Really good tool.

    0 讨论(0)
  • 2020-11-30 16:29

    What others have forgotten is Ctrl+Shift+L for easy text search. It searches everywhere and it is fast and efficient. This might be a Sprint tool suit which is an extension of eclipse (and it might be available in newer versions)

    0 讨论(0)
  • 2020-11-30 16:31

    Ctrl+H.

    Also,

    • Open any file quickly without browsing for it in the Package Explorer: Ctrl + Shift + R.

    • Open a type (e.g.: a class, an interface) without clicking through interminable list of packages: Ctrl + Shift + T.

    • Go directly to a member (method, variable) of a huge class file, especially when a lot of methods are named similarly: Ctrl + O

    • Go to line number N in the source file: Ctrl + L, enter line number.

    0 讨论(0)
  • 2020-11-30 16:32

    CTRL + H is actually the right answer, but the scope in which it was pressed is actually pretty important. When you have last clicked on file you're working on, you'll get a different search window - Java Search: enter image description here

    Whereas when you select directory on Package Explorer and then press Ctrl + H (or choose Search -> File.. from main menu), you get the desired window - File Search: enter image description here

    0 讨论(0)
  • 2020-11-30 16:32

    yes, but you need to open the global search panel. to do so, press the binoculars icon on the top right corner of the IDE.

    you can even filter searches by function identifiers, method scopes an etc...

    • Choose File Search for plain text search in workspace/selected projects
    • For specific expression searches, choose the relevant tab (such as Java Search which allows to search for specific identifiers)
    0 讨论(0)
  • 2020-11-30 16:32

    There is no way to do pure text search in whole work workspace/project via a shortcut that I know of (and it is a PITA), but this will find references in the workspace:

    1. Put your cursor on what you want to lookup
    2. Press Ctrl + Shift + g
    0 讨论(0)
提交回复
热议问题