Skip to content

Use ProjectionRegion in folding tests#3073

Merged
iloveeclipse merged 1 commit into
eclipse-jdt:masterfrom
fedejeanne:codex/folding-projection-region-utils
Jul 20, 2026
Merged

Use ProjectionRegion in folding tests#3073
iloveeclipse merged 1 commit into
eclipse-jdt:masterfrom
fedejeanne:codex/folding-projection-region-utils

Conversation

@fedejeanne

Copy link
Copy Markdown
Contributor

Follow-up of (and also contains):

I am drafting this PR until #3052 is merged so that the reviewer can focus on the changes of the 2nd commit only.

What it does

Replaces all usages of IRegion in FoldingTestUtils for usages of ProjectionRegion (internal record). This makes the API of the utility class easier to use and avoids functionality duplication.

ProjectionRegion not only contains the length and offset of a region but also its state: collapsed/expanded.

How to test

Run the tests in org.eclipse.jdt.text.tests.folding.FoldingTestSuite, they should pass.

Author checklist

@fedejeanne fedejeanne changed the title Codex/folding projection region utils Use ProjectionRegion in folding tests Jul 9, 2026
@fedejeanne
fedejeanne force-pushed the codex/folding-projection-region-utils branch from e143c61 to 6187236 Compare July 14, 2026 06:25
@fedejeanne
fedejeanne marked this pull request as ready for review July 14, 2026 06:26
@fedejeanne

Copy link
Copy Markdown
Contributor Author

@iloveeclipse this PR is a follow-up of #3052 and it only changes test classes in order to make them more amicable to the programmer.

Would you kindly review and merge? :-)

@iloveeclipse
iloveeclipse merged commit 25b38b0 into eclipse-jdt:master Jul 20, 2026
13 checks passed
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.

2 participants