Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 210160

Summary: Code folding marks conflicts
Product: editor Reporter: Vladimir Riha <vriha>
Component: Code foldingAssignee: Svata Dedic <sdedic>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: sdedic, vriha
Version: 7.2   
Target Milestone: TBD   
Hardware: PC   
OS: Linux   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:

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)
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo