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 144540

Summary: [65cat] support "sorting rules" for code formatting
Product: java Reporter: kawazu428 <kawazu428>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: Other   
OS: Other   
Issue Type: ENHANCEMENT Exception Reporter:

Description kawazu428 2008-08-20 09:38:49 UTC
[ JDK VERSION : 1.6.0_07 ]

In some of the project we're into, requirement is that code in .java
files be sorted like this:

[...]
public class Foo {

	// field declarations
	private String whatever1;
	private String whatever2;
	...

	// getters+setters
	public String getWhatever1()
	{...}

	//public methods
	public StringdoSomething1()
	{...}

	//private (helper) methods
	private void doSomethingElse()
	{...}

	//inner class declarations
	private class SubFoo{
	...
	}
}
[...]

Having a way how to define this to be automatically done by the IDE
via "Source" -> "Format" while editing a .java file would drastically
decrease the time spent on manually editing source codes and moving
code blocks around in those situations.