Community
Participate
Working Groups
Build ID: M20060921-0945 (Ubuntu version: 3.2.1-2ubuntu1; updated recently through Eclipse's internal plug-in update feature.) Steps To Reproduce: 1. Set up Eclipse to automatically fold everything when opening a Java file. 2. Pick a Java source file, one with several methods and comments. Open the file. Notice that the folding offers a nice compact overview of the class (good thing). 3. Cut to the clipboard one of the folded methods, together with its folded comment, from the middle of the class. Make sure there's folded code right after it. Notice how a few of the following folds have unfolded (BAD thing, especially in the case of a big method with big comments). 4. Paste the method in the clipboard in another place. Sometimes this causes unfolding of adjacent code. Always unfolds the pasted method. (Bad thing, though not very grave). More information: That's it. The big issue is unnecessary unfolding of code near a modification (e.g. cut a block of text that doesn't change the folded sub-trees). Keeping code folded between a cut and paste is less important.
*** Bug 275425 has been marked as a duplicate of this bug. ***
Any news on this item ?
>Any news on this item ? No plans to work on this.
Thanks for the honest reply. In the meantime I'm already in the middle of moving everything to Netbeans, as I can't take the Eclipse editor bugs anymore. The feature set is different but it at least works. Good luck for future development.
+ 1 to plastiquefantastique@gmx.de Good luck guys, but Netbeans editor at least works without folding bugs, not talking about the other.
Created attachment 156923 [details] Suggested fix Thanks for the friendly reminder. Here is a patch to fix this issue. Instead of expanding all projections in the deleted range, only the projections of the replacement text range are expanded. I also verified that the fix for bug 84983 still works.
(In reply to comment #6) > Thanks for the friendly reminder. > Here is a patch to fix this issue. Thanks Anton, it would really be nice to see this implemented as it is almost impossible to work with the current folding behavior.
Thanks Anton! Committed to HEAD. Available in builds >= N20100223-2000.
FYI: I've changed the copyright notice to: Anton Leherbauer <anton.leherbauer@windriver.com> - [projection] Eclipse is too eager to unfold code - http://bugs.eclipse.org/178203
*** Bug 128365 has been marked as a duplicate of this bug. ***
- Select one or more folded method - Hit Ctrl+X or Edit -> Cut => The selected methods are expanded, I have to select the unfolded methods and cut again (bad thing). However other folded methods are left as it is. Is this expected behavior? Tested with I20100308-1300.
>- Hit Ctrl+X or Edit -> Cut >=> The selected methods are expanded, I have to select the unfolded methods and >cut again (bad thing). This is due to bug 75222. >However other folded methods are left as it is. That's what this bug was about - marking as verified.