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

前端 未结 16 1730
执念已碎
执念已碎 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:33

    1. Ctrl + H
    2. 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 you to search for specific identifiers)

    For whole project search:

    3. Scope (in the form section) > Enclosing project (Radio button selection).

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

    Ctrl+H is very handy here. I mostly search in the current project, not the whole workspace. To find all occurences in the whole project of a string that is in your current buffer, just select the string press Ctrl+H and hit enter. Easy as that!

    Use Resource Filters! Eclipse will restrict the search result using the Resource Filters defined for your project (eg. right click on you project name and select Properties -> Resource -> Resource Filters). So if you keep getting search hits from parts of your project that your not interested in you could make Eclipse skip those by adding a Resource Filter for them. This is especially useful if you have build files or logs or other temporary files that are part of your projects directory structure, but you only want to search amongst the source code. You should also be aware of that files/directories matched for exclusion in the Resource Filters will not show up in the Package Explorer either, so you might not always want this.

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

    Press Ctrl + H to bring up the search that includes options to search via project, directory, etc.

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

    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...

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

    Ctrl + Alt + G can be used to find selected text across a workspace in eclipse.

    OSX: ⌥ Option + ⌘ Command + G

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

    Open Search Dialog Search-> Search... or use Shortcut Ctrl + H.

    1. Containing text: Type the expression for which you wish to do the text search.
    2. Choose if you want Case sensitive, Regular expression or Whole word
    3. File name patterns: In this field, enter all the file name patterns for the files to find or search through for the specified expression.
    4. Scope: Choose the scope of your search. You can either search the whole workspace, pre-defined working sets, previously selected resources or projects enclosing the selected resources.
    5. Press Search

    enter image description here

    0 讨论(0)
提交回复
热议问题