Searching repositories for code snippets can be done via the Jump to ID search or via
the Advanced Search.
Just select Source Code from the Jump to
ID drop-down list, type the search keyword and
press
enter to search the repositories
of
the
project
in context. You can also select Advanced
Search from the Jump to ID drop-down list and
do an advanced search for the required code.
-
Click Advanced Search from the Jump to
ID drop-down list.
-
Type the search keyword.
-
Select Source Code from the list of components.
-
Set the scope of search: Select All Languages (default) or one
of the programming languages such as C, C++, C# and so on from the All
Languages drop-down list.
-
Select
either
All Projects or a selected few projects
(select
one or more projects) from the IN
PROJECTS list.
-
Click Search.
The search results are displayed in
Files and
Commits tabs.
-
In case you want to search for code in a specific repository, select , select a repository you want to search, click Browse
Repository, and select the Search
tab.
You can search all files in a repository or narrow your scope to specific file
types such as C, C++, C# and so on.
-
Type your search keyword, select a file extension (optional) and click
Search.
The search results are displayed in Files and
Commits tabs.