Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(java_indexer): implement ref/writes edges #5423

Merged
merged 5 commits into from
Nov 4, 2022

Conversation

wcalandro
Copy link
Contributor

This PR adds support for ref/writes edges to the Java indexer. The edges are emitted for variables and class members. See the verifier test for a full representation of when ref, ref/writes, or both edges are emitted.

// at least one call to emitNameUsage. We just have to initialize to null to keep the compiler
// happy.
JavaNode node = null;
if (refType == RefType.READ || refType == RefType.READ_WRITE) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a switch statement? It's odd that both branches match READ_WRITE.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could potentially do a switch. This is just based on the logic from Cody's implementation for Go.

@wcalandro wcalandro merged commit b426d6d into kythe:master Nov 4, 2022
@wcalandro wcalandro deleted the java-ref-writes branch November 4, 2022 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants