Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Orion/Documentation/User Guide/Tasks/Navigating and searching"

(Searching for text within files)
(Searching for text within files)
Line 12: Line 12:
  
 
[[Image:search_starting_search.png|Search bar]]
 
[[Image:search_starting_search.png|Search bar]]
 +
 +
The drop-down menu next to the search bar allows you to configure search options, and browse recent or saved searches.
  
 
== Search and replace across files==
 
== Search and replace across files==

Revision as of 15:07, 1 October 2012

Navigating and searching

Searching for files

Type Ctrl+Shift+F to search for a file with a given name. Clicking a match will open a page for the file as if you had clicked it in the Navigator folder list. In many cases, this opens the Coding page on that file. If there is only a single match, simply press 'Enter' to open that file.

Searching for text within files

Type search terms in the search box in the upper right corner of the title area of any page to search for terms across all files in the folder you are viewing. Matches will be displayed in the Search Results page.

Both literal and wild card search are supported. For example, "fo*ar" will hit all the files containing "foobar" while "fo??ar" will hit the same files. Please also note that the search ignores case.

Search bar

The drop-down menu next to the search bar allows you to configure search options, and browse recent or saved searches.

Search and replace across files

A global search and replace can be performed by first running a search from the search box, and then supplying a replace term in the Search Results page.

Example: refactor a function name

Lets say there is a function called foo that is used in 60 files. User A creates a new function called bar and wants to replace the function name in 5 files. Meanwhile, user B modified and saved one of the files. The steps below describes the complete workflow:

  1. User A searches on keyword foo. In the first result page, there are 3 files that user A wants to replace.
  2. User A clicks on replace and types bar and hits enter.
  3. User A selects the 3 files and relative matches that will be replaced.
  4. User A compares and confirms the differences between the original and replaced lines.
  5. User A commits the new contents of the 3 files to the server.
  6. All the 3 files are written successfully indicated by the report.
  7. User A replaces the next page by selecting the remaining 2 files and relative matches.
  8. User B modifies one of the 2 files and saves it.
  9. User A commits the replacement.
  10. One of the 2 files is reported written failure because it was modified during the replacing.
  11. User A refreshes the page and replaces the failed file again.
  12. User A commits the replacement successfully.
  13. Optional: To undo the changes, user A checks out the changes in git status page.

Back to the top