我在Netbeans(7)中找不到一个选项来对齐变量。例如,我想改变这个:
private int hello = 1;
private static int hello2 = 1;
public static String hello3 = "yo";
private final static int HELLO3 = 1;
private String stringy = "testing hello";
private char c = 'a';
进入这个(或类似的东西):
private int hello = 1;
private static int hello2 = 1;
private final static int HELLO3 = 1;
private char c = 'a';
private String stringy = "testing hello";
public static String hello3 = "yo";
当我按格式(alt+shift+f
)。
另外,我希望它适用于局部变量,所以:
private void Test()
{
int x = 2;
String z = "test";
int[] y = {1, 2, 3};
}
将改为:
private void Test()
{
int x = 2;
int[] y = {1, 2, 3};
String z = "test";
}
我看过Tools->Options->Editor->Language "Java"->Category "Alignment"
但是,我发现没有任何影响这一点。