Skip to content

Conversation

@PiTheGuy
Copy link
Contributor

@PiTheGuy PiTheGuy commented Sep 28, 2025

Fixes #311

This PR uses a Java parsing library to parse the source code to obtain ranges. This means it would add an additional dependency, but this seems like the better option compared to the alternative of parsing it manually.

@PiTheGuy PiTheGuy marked this pull request as draft September 28, 2025 22:09
@ix0rai ix0rai added enhancement New feature or request backend affects the enigma backend labels Sep 29, 2025
@PiTheGuy PiTheGuy changed the title Fix navigation to method calls within static initializers Fix navigation to method calls within lambdas and static initializers Sep 29, 2025
@PiTheGuy PiTheGuy changed the base branch from master to develop/2.7 September 29, 2025 22:31
@PiTheGuy PiTheGuy marked this pull request as ready for review September 29, 2025 22:56
@PiTheGuy
Copy link
Contributor Author

Ready

Copy link
Member

@supersaiyansubtlety supersaiyansubtlety left a comment

Choose a reason for hiding this comment

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

Doesn't work as expected here:
java_3gNZFWzbX2

  • the b.b()V call doesn't navigate; it should got to the runnable lambda
  • the b.<clinit>()V call navigates to the runnable lambda; it should go to the static init call
  • the b.<init>()V call works correctly

supersaiyansubtlety added a commit to supersaiyansubtlety/enigma that referenced this pull request Oct 1, 2025
@supersaiyansubtlety supersaiyansubtlety linked an issue Oct 1, 2025 that may be closed by this pull request
@supersaiyansubtlety
Copy link
Member

This fixes the issue for VineFlower but not Procyon; I've created sub-issues.

@supersaiyansubtlety supersaiyansubtlety mentioned this pull request Oct 3, 2025
13 tasks
supersaiyansubtlety added a commit to supersaiyansubtlety/enigma that referenced this pull request Oct 12, 2025
supersaiyansubtlety added a commit to supersaiyansubtlety/enigma that referenced this pull request Oct 13, 2025
Copy link
Member

@ix0rai ix0rai left a comment

Choose a reason for hiding this comment

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

i may be doing something wrong but i was unable to get this to work for lambdas. using enigma's built in :lambdaTestGui, navigating to the top call (in the top level of the method) works, but as before, the two calls inside the lambda and nested lambda do not navigate properly.
image

however, this does fix the issue for static init!

supersaiyansubtlety added a commit to supersaiyansubtlety/enigma that referenced this pull request Oct 25, 2025
@PiTheGuy PiTheGuy requested a review from ix0rai October 25, 2025 19:34
Copy link
Member

@ix0rai ix0rai left a comment

Choose a reason for hiding this comment

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

looks great! this is a huge fix, i'm so happy to get it in.
i'd appreciate if you could add some unit testing for this, but if not i can always just open an issue and get to it when i have time. thanks for the PR!

@PiTheGuy
Copy link
Contributor Author

I think I'll let you handle the unit tests for this one.

@ix0rai
Copy link
Member

ix0rai commented Oct 26, 2025

sounds good!

@ix0rai ix0rai merged commit 4740af7 into QuiltMC:develop/2.7 Oct 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend affects the enigma backend enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigating to method calls within lambdas doesn't work correctly Navigating to method calls within lambdas using VineFlower

3 participants