Skip to content

Only fold inner types when preference is set #3031#3052

Open
fedejeanne wants to merge 1 commit into
eclipse-jdt:masterfrom
fedejeanne:do_not_fold_top_level_types
Open

Only fold inner types when preference is set #3031#3052
fedejeanne wants to merge 1 commit into
eclipse-jdt:masterfrom
fedejeanne:do_not_fold_top_level_types

Conversation

@fedejeanne

Copy link
Copy Markdown
Contributor

What it does

Avoids folding outer types if the preference Initially fold these elements > Inner Types is checked.

Fixes #3031

How to test

Use this class:

package plugin;

class B {
	static class B1 {

	}
}

public class A {
	static class A1 {
	}

	static class A2 {
		public static void main(String[] args) {
			Runnable r = new Runnable() {
				// Should be folded
				@Override
				public void run() {

				}
			};
		}

	}
}

Activate/Deactivate the preference, it should look like this

image
image

Author checklist

@iloveeclipse

Copy link
Copy Markdown
Member

LGTM, but would it be possible to add test to the FoldingTestSuite?

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.

Fold "Inner types" option also affects folding of top level types

3 participants