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

[Code Folding] opening of collapsed anonymous class doesn't work #1182

Open
Wittmaxi opened this issue Sep 29, 2023 · 3 comments
Open

[Code Folding] opening of collapsed anonymous class doesn't work #1182

Wittmaxi opened this issue Sep 29, 2023 · 3 comments

Comments

@Wittmaxi
Copy link
Contributor

Description
I cannot open a collapsed anonymous class after collapsing all. Works fine with methods.
The "+"-icon that indicates code folding correctly changes to "-"

grafik
grafik
grafik

Reproduce
In a File with anonymous classes, use "Folding -> Collapse All". Try to uncollapse the anonymous class

Expected behaviour
I expect the anonymous class to unfold like any other folded block.

My system
Eclipse SDK

Version: 2023-12 (4.30)
Build id: I20230913-1800

@Wittmaxi Wittmaxi changed the title [Code Folding] opening of collapsed doesn't work [Code Folding] opening of collapse doesn't work Sep 29, 2023
@Wittmaxi Wittmaxi changed the title [Code Folding] opening of collapse doesn't work [Code Folding] opening of collapsed anonymous class doesn't work Sep 29, 2023
@Wittmaxi
Copy link
Contributor Author

grafik

Works fine in this case ?!

@HeikoKlare
Copy link
Contributor

Interesting issue. This is a minimal reproducing Java code snippet:

public class Test {
	Test t = new Test() {
	};
}

After a Collapse All, the anonymous inner class won't expand with the "+" button. You can only expand by pressing space at the end of the line or the like.

Since it only happen for this specific kind of statement, my guess is that this is something specific to JDT UI rather than general editor support from Platform UI.

@jridge-ezclocker
Copy link

I reported a bug in WildWebDeveloper due to an issue with the collapse imports within a JS file. The problem seems very (if not exactly) simmilar to this bug. Wanted to past the link to the bug reported in WildWebDeveloper here just in case it is helpful as well:

eclipse-wildwebdeveloper/wildwebdeveloper#1508

In addition to the folded import section not un-folding consistently (and always re-folding) it causes an issue editing a JS file on a line close to (say within 10 or so lines and up) where the folded imports exist where the files scroll position jumps up/down (when the collapse section is opening and then closing, after a short pause in editing a line). This jumping shows as a kind of flicker on the screen, but does sometimes causes the edited line (where the cursor is) to scroll out of view.

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

No branches or pull requests

3 participants