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.

Bug 210160 - Code folding marks conflicts
Summary: Code folding marks conflicts
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-27 07:55 UTC by Vladimir Riha
Modified: 2012-04-26 10:57 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2012-03-27 07:55:44 UTC
Use following code:
class A {

    public function foo() {

        if (true) {
            try {
                
            } catch (Exception $e) {
                
            }
        } elseif (false) {
            
        } else {
            
        }
    }

}

- Now collapse the fold with "try" (4th fold mark from top)
- the fold collapsed and the "-" is changed to "+"
- click on the "+"
=> catch is collapsed. Now this "+" marks controls only catch so there is now way to expand the try using this icon

The same goes with the elseif and else


Product Version: NetBeans IDE Dev (Build 201203250401)
Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02
System: Linux version 3.0.0-16-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Ondrej Brejla 2012-03-27 08:10:34 UTC
But it's not a PHP problem, we are just providing offset ranges. It should be resolved somehow more comprehensively (more "+" icons, or I don't know).
Comment 2 Svata Dedic 2012-04-18 07:55:37 UTC
General problem of folding infra.
Comment 3 Svata Dedic 2012-04-18 09:50:55 UTC
OK ... unless I find some other gesture, the problem can't be cleanly solved. Either the last fold on the line will be expanded/collapsed on click, or all folds. 

Probably I'll add a key modifier to work 'with the next fold' and we'll see how that works. Changing to a RFE.
Comment 4 Svata Dedic 2012-04-23 20:51:03 UTC
Making defect again. During code examination, I found out several situation where the current code paints the sidebar incorrectly, i.e. with missing part of lines etc.
Comment 5 Svata Dedic 2012-04-23 20:52:58 UTC
Changeset: f7a67f42dac2
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2012-04-23 22:52
Message:   Issue #210160 - Code folding marks conflicts: fixed
Changed model of the sidebar, better handling of folds coalesced on one line. Ctrl-click will expand/collapse one more fold
Comment 6 Quality Engineering 2012-04-26 10:28:36 UTC
Integrated into 'main-golden', will be available in build *201204260400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f7a67f42dac2
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #210160 - Code folding marks conflicts: fixed
Changed model of the sidebar, better handling of folds coalesced on one line. Ctrl-click will expand/collapse one more fold
Comment 7 Vladimir Riha 2012-04-26 10:57:46 UTC
much better, thanks


Product Version: NetBeans IDE Dev (Build 201204260400)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Linux version 3.0.0-17-generic-pae running on i386; UTF-8; en_US (nb)