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 221729 - Vertical alignment of members and variables.
Summary: Vertical alignment of members and variables.
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P2 normal with 3 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 160510 240603 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-08 13:58 UTC by Ursus_B
Modified: 2015-04-06 20:03 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ursus_B 2012-11-08 13:58:40 UTC
Vertical alignment of members is an Eclipse (and JIndent plugin, I believe) feature I would really like to see in NetBeans.
You would set this in Options/Editor/Formatting/Alignment.
Separate options for static and ordinary members would be nice, too.

In the below example, I also included two types of alignment:

1. pad before name.
2. pad after name.

Example:

private int myInt       = 0;
private String myString = "Hi!";

private static String                    MY_STATIC_STRING = "STATIC STRING";
private static MyReallyLongClassName MY_LONG_STATIC_CLASS = new MyReallyLongClassName();

/ Ursus
Comment 1 ecerichter 2013-01-13 13:54:24 UTC
For big projects, this is even more important because improve readability of the code.

When working with JPA projects, beans usually have a long list of attributes, and being able to align them vertically improves the fast identification of which members are initialized or not, which has special attributes (like static, volatile, transient) and which are just declared with deferred initialization.

Thanks,

Edson Richter
Comment 2 markiewb 2015-04-06 19:45:05 UTC
*** Bug 240603 has been marked as a duplicate of this bug. ***
Comment 3 markiewb 2015-04-06 19:45:59 UTC
*** Bug 160510 has been marked as a duplicate of this bug. ***
Comment 4 markiewb 2015-04-06 20:03:28 UTC
FYI: It has already implemented for PHP
https://blogs.oracle.com/netbeansphp/entry/formatting_group_multiline_alignment_added