Skip to content

Refactor range and position utility methods for readability - #982

Open
Kaike-blanck wants to merge 1 commit into
eclipse-lsp4j:mainfrom
Kaike-blanck:main
Open

Refactor range and position utility methods for readability#982
Kaike-blanck wants to merge 1 commit into
eclipse-lsp4j:mainfrom
Kaike-blanck:main

Conversation

@Kaike-blanck

Copy link
Copy Markdown

Hi LSP4J maintainers,

This PR refactors three small utility methods in Positions and Ranges to improve readability without changing behavior or public APIs.

The changes made are small and limited so as not to impact the functionality of the project.

The changes are limited to a few utility methods: Positions.isBefore, Ranges.containsRange, and Ranges.containsPosition. I simplified the condition in Positions.isBefore, added local variables in Ranges.containsRange, and broke down the boolean expression in Ranges.containsPosition so the logic of the method is a bit easier to follow.

The inputs, expected return values, and expected behavior have not been altered. These changes do not introduce any API-level changes.

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.

1 participant