Bug 164398 - Fold by default uninteresting parts of the code
Fold by default uninteresting parts of the code
Status: NEW
Product: java
Classification: Unclassified
Component: Editor
6.x
All All
: P3 with 1 vote (vote)
: TBD
Assigned To: Dusan Balek
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-04 16:00 UTC by andreroquem
Modified: 2012-12-17 19:07 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Example (2.19 KB, text/plain)
2009-05-04 16:02 UTC, andreroquem
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreroquem 2009-05-04 16:00:41 UTC
Editor fold support is really great, and I think it should be used by default on certain parts
of java classes, like
- getters and setters
  Nothing bothers me more than having tons of getters and setters taking space in the screen.
  There could be a default editor-fold in java classes labeled 'Getters and Setters', and
  automatically created getters and setters could be added inside this fold.

- overrided methods
  I don't know how difficult/plausible would this be, but I think it would be great to have
  editor-fold's for overrided methods, one fold for each ancestor class. So, toString,
  hashCode and equals should go into a 'java.lang.Object methods' fold, and so on. Methods
  would be resolved into the higher parent in the hierarchy.
Comment 1 andreroquem 2009-05-04 16:02:53 UTC
Created attachment 81475 [details]
Example
Comment 2 Max Sauer 2009-05-11 15:58:08 UTC
Would be fine to have this. Lets have a look for next release.
Comment 3 malfunction84 2009-07-15 20:29:51 UTC
Great idea!  Ideally, these would be controlled via the "Collapse by Default" IDE options rather than adding
code-folding directives to the source itself.
Comment 4 aekold 2009-07-20 15:36:46 UTC
But NetBeans already have similar feature. Tools > Options > Editor > Code Templates > Java > New
Name: fold
body:
// <editor-fold defaultstate="collapsed" desc=" ${Identifier} ">
    ${cursor}
    // </editor-fold>
Comment 5 markiewb 2012-12-17 18:52:45 UTC
Set target-milestone of open issue to TBD (was < 7.3, f.e. 6.8), so the issue doesn't get lost.
Comment 6 markiewb 2012-12-17 19:02:48 UTC
Set target-milestone of open issue to TBD (was < 7.3, f.e. 6.8), so the issue
doesn't get lost. This time the target milestone is really set.
Comment 7 markiewb 2012-12-17 19:07:37 UTC
Could be an enhancement for java.ext.editor - see the other similar samples at http://www.aljoscha-rittner.de/blog/archive/2010/12/21/idedev-bundle-texte-direkt-im-quelltext/


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