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 141691 - Formatter: One-line Getters and Setters (inline)
Summary: Formatter: One-line Getters and Setters (inline)
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 4 votes (vote)
Assignee: Rastislav Komara
Depends on:
Reported: 2008-07-25 15:35 UTC by pekarna
Modified: 2010-12-12 17:46 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description pekarna 2008-07-25 15:35:24 UTC
Hi, I would like to have getters and setters generated and formatted on a single line:

  public int getValue(){ return this.value; }
  public void setValue( int value ){ this.value = value; }

However, I haven't found any option in the formatter or anywhere else to make formatter behave that way.

Thus, hereby I suggest such feature, which would increase  (mainly) readability of beans more than code collapsing.

Comment 1 pekarna 2008-08-31 03:04:34 UTC
I've recorded very simple macro that makes the getter/setter in-line:

  caret-end-line delete-next caret-end-line delete-next caret-end-line delete-next caret-end-line delete-next caret-down

But an option to have it generated so by NetBeans would be nicer ;-)
Comment 2 rptmaestro 2008-12-16 16:49:57 UTC
Could this perhaps be implemented as a code auto-formatting feature?
Comment 3 Rastislav Komara 2009-02-03 10:55:26 UTC
Comment 4 pekarna 2010-12-12 17:46:15 UTC
Hi, is this going to appear in NetBeans 7.0? Pleeeaseee... :)