Bug 172617 - Code folding for if hides full block
Code folding for if hides full block
Status: RESOLVED DUPLICATE of bug 195925
Product: editor
Classification: Unclassified
Component: Code folding
7.0
All All
: P1 with 12 votes (vote)
: TBD
Assigned To: Miloslav Metelka
issues@editor
:
: 78736 104148 142880 167319 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-20 07:47 UTC by nbphpuser
Modified: 2011-02-24 09:42 UTC (History)
5 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nbphpuser 2009-09-20 07:47:19 UTC
Hi!

Code folding for if and else is nice feature, but it hides an if-block completely. It would be very helpful to leave first 
line of if visible, so that one can read if (or switch etc.) condition. Code folding for functions works in that way 
already. 

Pet
Comment 1 flexjoly 2009-10-22 20:57:39 UTC
It is even more logic when it would work like collapsed functions:
-- function myfunc($myparam){...}

An if or foreach would be: 
-- if(myif==notmyif && otherif==true){...}
-- foreach($arr as $key=>$val){...}

When these statement are collapsed showing nothing the code gets unreadable.
Comment 2 jeremyclarke 2009-10-27 21:47:49 UTC
+1 for this idea (i voted), its also related to a similar problem with PHPDoc
http://www.netbeans.org/issues/show_bug.cgi?id=169660

Any time something is folded it should behave like functions do, showing you as much of the first line as possible
before the hidden fold so as to help you know what is hidded without opening it back up. 
Comment 3 Filip Zamboj 2010-09-15 12:30:03 UTC
batch reassigning
Comment 4 johanp 2010-12-19 19:20:06 UTC
*** Bug 142880 has been marked as a duplicate of this bug. ***
Comment 5 johanp 2010-12-19 19:20:35 UTC
*** Bug 78736 has been marked as a duplicate of this bug. ***
Comment 6 johanp 2010-12-19 19:21:34 UTC
*** Bug 104148 has been marked as a duplicate of this bug. ***
Comment 7 johanp 2010-12-19 19:22:19 UTC
*** Bug 171893 has been marked as a duplicate of this bug. ***
Comment 8 johanp 2010-12-19 19:23:25 UTC
Lets use this report to track all requests for full scope code folding, i.e. if/switch/while etc.
Comment 9 jcrada 2011-02-23 20:43:35 UTC
If this is going to be the report about general code folding, this is an issue regarding all languages (C++ and Java at least), not just PHP. I changed the product and the version, since NetBeans 7.0 Beta 2 does not include general code folding either. Hopefully it is implemented soon!
Comment 10 reisner 2011-02-24 08:07:03 UTC
Netbeans is the only solution i know which doesn't implement full functionality for code folding, that's sad...

Please implement this asap.
Comment 11 jcrada 2011-02-24 08:18:29 UTC
*** Bug 167319 has been marked as a duplicate of this bug. ***
Comment 12 jcrada 2011-02-24 08:23:45 UTC

*** This bug has been marked as a duplicate of bug 195925 ***
Comment 13 zvk77 2011-02-24 09:42:27 UTC
I think that this bug is NOT RELATED to bugs 195925 and 167319 as a "DUPLICATE".

IMHO this bug is about "view" of folded code, not about folding itself.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo