Navigating and searching by code in SourceCraft
SourceCraft features advanced navigation through project code, including read-only repositories. You can search for:
- File by name or part of name.
- Declaration by code element, such as a variable, function, or library.
- Places where a particular element is used in the code.
Navigation can be used both in edit mode and code view mode.
You can also view the author of the last update and the commit for a particular file or line of code.
Searching for a file by name or part of name
-
Open the repository file structure:
- Open the SourceCraft home page.
- On the
- Select a repository.
- Under
- Select the branch to search in from the drop-down list
- To display the repository file structure, click
-
In the Go to file field, enter the name or part of the name of the file you are looking for.
-
Open the pull request file structure:
- Open the SourceCraft home page.
- On the
- Select a repository.
- Under
- Select a pull request to search in.
- Navigate to the
- To display the file structure, click
- Click Full tree.
-
In the Search field, enter the name or part of the name of the file you are looking for.
Search for a declaration by code element
Note
Currently, search for declarations and element usages is supported for Go, Java, JavaScript, and TypeScript.
-
Open the file structure:
RepositoryPull request- Open the SourceCraft home page.
- On the
- Select a repository.
- Under
- Select the branch to search in from the drop-down list
- To display the repository file structure, click
- Open the SourceCraft home page.
- On the
- Select a repository.
- Under
- Select a pull request to search in.
- Navigate to the
- To display the file structure, click
- Click Full tree.
-
Select the file you want to view.
-
Hover over the element whose declaration you want to find.
A pop-up window will display the path to the file and the line of code the element was declared in. If there are several such places, they will be presented as a list. Use
-
To go to the file and line with the item declaration, click Go to declaration.
Searching for places where a particular element is used in the code
Note
Currently, search for declarations and element usages is supported for Go, Java, JavaScript, and TypeScript.
-
Open the file structure:
RepositoryPull request- Open the SourceCraft home page.
- On the
- Select a repository.
- Under
- Select the branch to search in from the drop-down list
- To display the repository file structure, click
- Open the SourceCraft home page.
- On the
- Select a repository.
- Under
- Select a pull request to search in.
- Navigate to the
- To display the file structure, click
- Click Full tree.
-
Select the file you want to view.
-
Hover over the item whose locations you want to find.
-
In the pop-up window, click Find usages.
-
In the panel that opens, double-click the desired line to go to the file and line where the element is used.
Finding out the author of the last update and commit
-
Open the repository file structure:
- Open the SourceCraft home page.
- On the
- Select a repository.
- Under
- Select the branch to search in from the drop-down list
- To display the repository file structure, click
-
Select the file you want to view.
The information about the last update author and the commit ID will be displayed above the file contents.
-
To view the file's revision history, click History
-
To view the author of the last update and the commit for a particular line of code, enable Blame in the top-right corner.