Navigating and searching by code in SourceCraft

SourceCraft features advanced navigation through project code, including read-only repositories. You can search for:

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

  1. Open the repository file structure:

    1. Open the SourceCraft home page.
    2. On the Home tab, navigate to Repositories.
    3. Select a repository.
    4. Under Code on the repository page, go to Browse.
    5. Select the branch to search in from the drop-down list .
    6. To display the repository file structure, click next to the drop-down list .
  2. In the Go to file field, enter the name or part of the name of the file you are looking for.

  1. Open the pull request file structure:

    1. Open the SourceCraft home page.
    2. On the Home tab, navigate to Repositories.
    3. Select a repository.
    4. Under Code on the repository page, go to Pull requests.
    5. Select a pull request to search in.
    6. Navigate to the Files changed tab.
    7. To display the file structure, click next to the drop-down lists for branch and iteration comparison.
    8. Click Full tree.
  2. 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.

  1. Open the file structure:

    1. Open the SourceCraft home page.
    2. On the Home tab, navigate to Repositories.
    3. Select a repository.
    4. Under Code on the repository page, go to Browse.
    5. Select the branch to search in from the drop-down list .
    6. To display the repository file structure, click next to the drop-down list .
    1. Open the SourceCraft home page.
    2. On the Home tab, navigate to Repositories.
    3. Select a repository.
    4. Under Code on the repository page, go to Pull requests.
    5. Select a pull request to search in.
    6. Navigate to the Files changed tab.
    7. To display the file structure, click next to the drop-down lists for branch and iteration comparison.
    8. Click Full tree.
  2. Select the file you want to view.

  3. 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 and to view the list items one by one.

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

  1. Open the file structure:

    1. Open the SourceCraft home page.
    2. On the Home tab, navigate to Repositories.
    3. Select a repository.
    4. Under Code on the repository page, go to Browse.
    5. Select the branch to search in from the drop-down list .
    6. To display the repository file structure, click next to the drop-down list .
    1. Open the SourceCraft home page.
    2. On the Home tab, navigate to Repositories.
    3. Select a repository.
    4. Under Code on the repository page, go to Pull requests.
    5. Select a pull request to search in.
    6. Navigate to the Files changed tab.
    7. To display the file structure, click next to the drop-down lists for branch and iteration comparison.
    8. Click Full tree.
  2. Select the file you want to view.

  3. Hover over the item whose locations you want to find.

  4. In the pop-up window, click Find usages.

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

  1. Open the repository file structure:

    1. Open the SourceCraft home page.
    2. On the Home tab, navigate to Repositories.
    3. Select a repository.
    4. Under Code on the repository page, go to Browse.
    5. Select the branch to search in from the drop-down list .
    6. To display the repository file structure, click next to the drop-down list .
  2. 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.

  3. To view the file's revision history, click History .

  4. To view the author of the last update and the commit for a particular line of code, enable Blame in the top-right corner.

See also