This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
From the following codes, try folding the withdraw() or __init__() function. See attached screenshot for the result. class Accounts: balance = 0 def __init__(self, amount): self.balance = amount def withdraw(self, amount): """ withraw an amount from the account """ if self.balance < 0: print "overdraft from account" else: self.balance -= amount def deposit(self, amount): """ deposit an amount to the account """ self.balance += amount account = Accounts(100) print "balance = ", account.balance account.deposit(20) print "balance = ", account.balance account.withdraw(50) print "balance = ", account.balance
Created attachment 72954 [details] code folding example
This is because of offset problems in Jython. The end offsets for functions are not correct. This is not something we can easily fix for EA -- but I'm not sure this is a P2 or needs to be fixed for EA anyway; I think code folding is one of those features people play with when they first see them, but don't end up actually using them in day to day work.
I am seeing the same problem. I'm logging this comment to note that the problem still occurs in newer(?) code. I'm using Netbeans 7.2 RC1 on Windows 7 Pro. I installed the PHP only version, and have installed python plugin also. Mostly working great. But there's a problem with code folding. Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-9346-on-20120715) Java: 1.6.0_30; Java HotSpot(TM) 64-Bit Server VM 20.5-b03 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) User directory: C:\Users\Judy\AppData\Roaming\NetBeans\7.2rc1 Cache directory: C:\Users\Judy\AppData\Local\NetBeans\Cache\7.2rc1 When I collapse a method in a class, they "fold" onto the same single line. If I collapse many methods in a class, they ALL "fold" onto the same single line. Not useful. The python plugin I have installed says Version: 0.107 Last Check: 7/22/12 10:05 AM URL: http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz This behavior also occured on Netbeans 7.2 Development Verison that I used previously: Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-9155-on-20120412)
*** Bug 170347 has been marked as a duplicate of this bug. ***
*** Bug 177375 has been marked as a duplicate of this bug. ***
Changing to P3 in accordance with Priority guidelines (Usability) shown at http://wiki.netbeans.org/BugPriorityGuidelines
*** Bug 167278 has been marked as a duplicate of this bug. ***
*** Bug 153686 has been marked as a duplicate of this bug. ***