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 218257 - IllegalStateException: non-parent fold without fold mark
Summary: IllegalStateException: non-parent fold without fold mark
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-13 06:35 UTC by Jiri Prox
Modified: 2012-09-15 02:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 190296


Attachments
stacktrace (2.54 KB, text/plain)
2012-09-13 06:35 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2012-09-13 06:35:43 UTC
Build: NetBeans IDE Dev (Build 201209130001)
VM: Java HotSpot(TM) Client VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b10
OS: Linux

User Comments:
jiriprox: ISE when expanding collapsed fold (containing imports)

revivius: Double clicked on a fold indicator line (whose thickness change on mouse over), i was reading a class file without source (compiled code section)




Stacktrace: 
java.lang.IllegalStateException: non-parent fold without fold mark
   at org.netbeans.editor.CodeFoldingSideBar.performActionAt(CodeFoldingSideBar.java:837)
   at org.netbeans.editor.CodeFoldingSideBar.access$900(CodeFoldingSideBar.java:112)
   at org.netbeans.editor.CodeFoldingSideBar$Listener.mouseClicked(CodeFoldingSideBar.java:1362)
   at java.awt.Component.processMouseEvent(Component.java:6508)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
   at java.awt.Component.processEvent(Component.java:6270)
Comment 1 Jiri Prox 2012-09-13 06:35:45 UTC
Created attachment 124283 [details]
stacktrace
Comment 2 Svata Dedic 2012-09-14 08:44:00 UTC
Got it. My thinking about boudary conditions in that case was bad - the error happens in situation, where mouse is clicked at the end-of-fold mark, but BELOW the end mark, which should have no effect (in your case, I assume no outer fold exists). In other cases (e.g. fold ending and another starting on the same line), it should collapse the next fold (also raises an error). 

I'll relax the sanity check.
Comment 3 Svata Dedic 2012-09-14 08:57:00 UTC
Changeset: cccae0168f63
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2012-09-14 10:56
Message:   Issue #218257 - IllegalStateException: non-parent fold without fold mark: fixed
2nd half of folder indicator can belong to no fold or an arbitrary one, if more folds start/end at the same line. Relaxing checks.
Comment 4 Quality Engineering 2012-09-15 02:10:55 UTC
Integrated into 'main-golden', will be available in build *201209150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/cccae0168f63
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #218257 - IllegalStateException: non-parent fold without fold mark: fixed
2nd half of folder indicator can belong to no fold or an arbitrary one, if more folds start/end at the same line. Relaxing checks.