Code Intelligence for Java now available on Sourcegraph

By Beyang Liu on April 11, 2017

Today, we announce general availability for Java on Sourcegraph. If you write Java, this means that you can now use Sourcegraph to:

  • Explore code without losing your place in your editor
  • Get IDE-like functionality to your code review tool
  • Learn from usage examples drawn from across the open-source world
  • Have more efficient code discussions by linking directly to the code in question
  • Make every piece of code easily searchable and accessible for every member of your team

Every feature mentioned in this post is available now for Java on Sourcegraph.com and Sourcegraph Enterprise. Scroll down for the detailed feature list.

Seamless, zero-config code exploration in your web browser. An easy-to-use HUD for code understanding.

Detailed feature list

(Refer to the screenshot above)

  1. Documentation tooltips
  2. Jump to definition
  3. Find references
  4. External usage examples
  5. Symbol search
  6. Text search
  7. Authorship (Git blame)

Performance

Sourcegraph works within seconds on any revision of code and scales to large repositories. It even works for newly pushed revisions such as those submitted for code review.

Sourcegraph integrates with code review tools like GitHub pull requests.

Code review integration

Sourcegraph integrates with code review tools including:

  • GitHub pull requests (GitHub.com, GitHub Enterprise)
  • Phabricator (Enterprise-only)

If your favorite code review tool is not yet supported, please let us know!

Have more fruitful conversations around code

Because Sourcegraph is just a web app, you can link to any location in your codebase. Our users have found this useful as a starting point for code discussions. Sharing a link is easy and doesn’t require the person on the other end to go through the annoying exercise of opening up a new editor or stashing their work-in-progress changes to check out your branch.

This addresses a critical communication bottleneck in software development and makes it easier to disseminate knowledge across your team. (Hint hint: if you want to give the management a good reason to try Sourcegraph, we’ve found “addresses a critical communication bottleneck” and “disseminate knowledge across our team” to be persuasive lines). Here’s how it looks in action:

1*6Pz64YShQ4WJlEevH6H Pw

Using Sourcegraph, I was easily able to identify the author of a piece of code and start a conversation in chat by linking him directly to the code in question.

Do you rely heavily on open-source libraries? Or does your team have multiple microservices versioned in separate repositories? Sourcegraph lets you trace state changes and control flow logic across repository boundaries:

Sourcegraph’s jump-to-definition works even if the definition is in a separate repository or an open-source library. Because it’s all on the web, there’s no need to check out code to your local machine.

Supported Java project types

Sourcegraph now supports the following types of Java repositories:

  • Projects built with Maven
  • Projects built with Gradle
  • Android applications and libraries
  • Any combination of the above

1*wWLDvGcSf4L6huAxbPYQcw

We offer support for additional build systems to enterprise customers. Please email [email protected] for more info.

Programmer’s note: we support the common case for the build systems above, but now and then we encounter a corner case that isn’t yet supported. If you try out Sourcegraph on your repository and find jump-to-definition or hover tooltips do not work, please let us know via the “Feedback” button at the bottom of the screen. We are incredibly responsive.

1*eDAtE4xe-dQ24UqMqoiVeg

Try it out now

See Sourcegraph in action now on some popular open-source Java projects:

Or you can test it out on your private repositories on GitHub.com. We also do on-premises deployments for enterprise software teams. Contact us for more info!