EclipseJava注释自动对齐插件
是否有任何eclipse插件可以对齐内联注释——代码行上的注释,而不是整行注释 例如,考虑代码是否如下:EclipseJava注释自动对齐插件,java,eclipse,eclipse-plugin,code-formatting,Java,Eclipse,Eclipse Plugin,Code Formatting,是否有任何eclipse插件可以对齐内联注释——代码行上的注释,而不是整行注释 例如,考虑代码是否如下: //whole line comment class Class1 { void method1() { //whole line comment int linePointer; //inline comment BufferredReader br = new BufferredReader(); //inline com
//whole line comment
class Class1
{
void method1()
{
//whole line comment
int linePointer; //inline comment
BufferredReader br = new BufferredReader(); //inline comment
File f = new File(); //inline comment
}
}
//whole line comment
class Class1
{
void method1()
{
//whole line comment
int linePointer; //inline comment
BufferredReader br = new BufferredReader(); //inline comment
File f = new File(); //inline comment
}
}
它们的格式应如下所示:
//whole line comment
class Class1
{
void method1()
{
//whole line comment
int linePointer; //inline comment
BufferredReader br = new BufferredReader(); //inline comment
File f = new File(); //inline comment
}
}
//whole line comment
class Class1
{
void method1()
{
//whole line comment
int linePointer; //inline comment
BufferredReader br = new BufferredReader(); //inline comment
File f = new File(); //inline comment
}
}
有没有办法通过调整EclipseJava代码编辑器设置来模仿这一点?我在eclipse中没有找到这样做的方法。所以我写了一个Perl脚本。 120是内联注释的左填充(默认值为80)