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 254837 - Custom fold is not recognized
Summary: Custom fold is not recognized
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 8.1
Hardware: PC Windows 7 x64
: P4 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-29 07:05 UTC by stwr
Modified: 2015-09-01 21:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Custom fold recognized (4.52 KB, image/png)
2015-08-29 07:05 UTC, stwr
Details
Custom fold not recognized (3.02 KB, image/png)
2015-08-29 07:06 UTC, stwr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stwr 2015-08-29 07:05:28 UTC
Product Version: NetBeans IDE Dev (Build 201508280002)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)

My use case is inspired with this test case --> http://services.netbeans.org/synergy/client/app/#/case/2112/suite/1781/v/1

--Use Case--
1. Insert closing mark (//</editor-fold>) in editor
2. Insert the opening mark behind the closing one (on the same row)
3. Cut the opening mark and move it before the closing one (on the same row)
4. Cut the closing mark and paste it immediately after in the same place

--Actual Result--
After 3rd step - OK, custom fold is recognized, [-] is shown, custom fold is collapsible.
After 4th step - KO, custom fold is not recognized longer, [-] is not shown.


Surely there is something wrong as the IDE reacts differently for exact piece of text. Please see both pictures.
Comment 1 stwr 2015-08-29 07:05:54 UTC
Created attachment 155736 [details]
Custom fold recognized
Comment 2 stwr 2015-08-29 07:06:05 UTC
Created attachment 155737 [details]
Custom fold not recognized
Comment 3 Svata Dedic 2015-09-01 21:32:26 UTC
The testcase is somewhat screwed up: a fold should not be recognized if the start and end mark ends within the same line comment (= the same token).

The original testcase tells to press enter in between marks, which separate them into two lines -> two linecomments => both marks should be read and paired into a fold.

This modification checks marks on the same line = within the same comment, which is not supported.
Comment 4 Svata Dedic 2015-09-01 21:32:43 UTC
Downgrading, rather a corner case.