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 67851 - "Variables declaration" section should be in a folding block
Summary: "Variables declaration" section should be in a folding block
Status: VERIFIED DUPLICATE of bug 59302
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-31 16:27 UTC by Jesse Glick
Modified: 2005-11-03 17:29 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 Jesse Glick 2005-10-31 16:27:24 UTC
initComponents() is created with the comment

// <editor-fold defaultstate="collapsed" desc=" Generated Code ">

to make it hidden by default in the editor. But the variables declaration
section is not:

// Variables declaration - do not modify

That is kind of annoying, and certainly inconsistent. For a large form, a whole
screenful of space in the .java file may be consumed by uneditable variable
declarations. They should be hidden by default.
Comment 1 Tomas Pavek 2005-11-03 16:58:01 UTC
Not sure if folding initComponents method and variables declaration is the same.
Typically you are not much interested in code that set up the components,
however you need to access the components, so might want to see the variables.
Plus the fact that the number of variables is usually not so big and they are
placed at the end of the file you can see the reasons why we made only
initComponents folded.

OTOH it seems we wouldn't spoil anything if we folded the variables as well; the
user can unfold them easily, and of course you have the code completion ;)

*** This issue has been marked as a duplicate of 59302 ***
Comment 2 Jesse Glick 2005-11-03 17:29:33 UTC
In my experience code completion is sufficient for "seeing" the field names.
There is no need to look at the declarations. And I often open forms which have
20-50 component-valued fields, so the declaration block can be quite lengthy.