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

Fix folding of local classes #2015

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

jakub-suliga
Copy link
Contributor

@jakub-suliga jakub-suliga commented Feb 12, 2025

Currently, the new folding feature does not support folding for local classes, whereas the old folding mechanism does. This fix ensures that local classes can be folded as expected. Additionally, I add a test case for the scenario.

Test:

  1. Activate the new folding
  2. Fold inner2, now it should be folded
class Outer {
	void a() {
		class Inner2{
			
		}
	}
}

@jakub-suliga
Copy link
Contributor Author

@fedejeanne @iloveeclipse @jjohnstn could someone of you look over the code

Copy link
Contributor

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

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

LGTM

@fedejeanne
Copy link
Contributor

Failing test is unrelated: #1095

@danthe1st danthe1st mentioned this pull request Feb 13, 2025
3 tasks
@danthe1st
Copy link

Just a heads up:
Note that currently, the tests I added in #1825 use the current behavior from master which does not include this fix. Merging both PRs will make the build fail but fixing it should be very easy (so they should just not be merged concurrently).

@jjohnstn jjohnstn merged commit e813d37 into eclipse-jdt:master Feb 13, 2025
7 of 10 checks passed
@jjohnstn
Copy link
Contributor

Merged. Thanks.

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.

4 participants