Code Intelligence for Java now available on Sourcegraph
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.
Detailed feature list
(Refer to the screenshot above)
- Documentation tooltips
- Jump to definition
- Find references
- External usage examples
- Symbol search
- Text search
- Authorship (Git blame)
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.
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:
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.
Link together your team’s code
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
We offer support for additional build systems to enterprise customers. Please email firstname.lastname@example.org 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.
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!
About the author
Beyang Liu is the CTO and co-founder of Sourcegraph. Beyang studied Computer Science at Stanford, where he published research in probabilistic graphical models and computer vision at the Stanford AI Lab. You can chat with Beyang on Twitter @beyang or our community Discord.