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

Focus generalizes bottom lexical and top fullTree parametres to a spine around the cursor #459

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jurgenvinju
Copy link
Member

@jurgenvinju jurgenvinju commented Sep 30, 2024

This ports the "focus" interface of the CodeActionContributor to all the other on-demand language services: Referrer, Documenter, Definer, ...

  • define alias Focus = list[Tree] and document it
  • change all constructors to accept a Focus instead of Tree lexical, Tree fullTree
  • add backward compatibility layer, so no code breaks.
  • adapt implementation in Java to use TreeSearch instead of TreeAdapter.findLexicalAt
  • test, test, test

In this PR we will keep the test and demo code as-is, in order to prove backward compatibility without introducing many duplicate tests. In a later PR when this has stabilized, we can replace both the demos and the tests with the new interface. Due to the compatibility layer, the existing tests will generate full code coverage of the new functionality.

@jurgenvinju jurgenvinju added the enhancement New feature or request label Sep 30, 2024
@jurgenvinju jurgenvinju self-assigned this Sep 30, 2024
Copy link

sonarcloud bot commented Sep 30, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant