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 202957 - Code folding for Runnable does not expand properly
Summary: Code folding for Runnable does not expand properly
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: issues@contrib
URL:
Keywords:
: 202971 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-03 06:08 UTC by dbell
Modified: 2013-09-02 14:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dbell 2011-10-03 06:08:21 UTC
[ BUILD # : 201109260601 ]
[ JDK VERSION : 1.6.26 ]

An anonymous inner class extending Runnable that takes up three lines in the
editor, does not expand properly if the inner line is followed by a comment.

Example:
<code>
SwingUtilities.invokeLater(new Runnable () {
    public void run() {
        layer.setColorings(newColoring, -1); //version
    }
});
</code>

is contracted to
<code>
[+] SwingUtilities.invokeLater([{ =>]layer.setColorings(newColoring, -1);[}]);
</code>

Pressing the [+] to expand the node yeilds
<code>
[+] SwingUtilities.invokeLater([{ =>]layer.setColorings(newColoring, -1);
//version
    }
});
</code>
with no [-] to fold the end node again. However, pressing the [+] to expand the
top node actually shrinks the bottom node again, yeilding the original
contraction.

When the comment is removed, the cold folding behaves more as expected, where
clicking on the [+] when the bottom node is expanded, expands the top node.
Comment 1 Dusan Balek 2011-10-03 10:49:03 UTC
It seems you have the Extended Java Editor module installed.
Comment 2 dbell 2011-10-03 10:55:08 UTC
(In reply to comment #1)
> It seems you have the Extended Java Editor module installed.

Indeed. It's not going to be part of the release?
Comment 3 Dusan Balek 2011-10-03 11:00:16 UTC
*** Bug 202971 has been marked as a duplicate of this bug. ***