Era*_*ran 9 java eclipse spaces indentation
我必须遵循一些严格的Java代码缩进规则.
在许多情况下,我必须跳到当前行的第26或第28列.我的原始位置和第26/28列之间的字符应该是空格字符(而不是TAB).
有没有办法在Eclipse中使用一些键盘快捷键(或其他方式)?我检查了所有可用的代码样式规则,找不到任何可以帮助我的东西.
示例:
package com.companyname.something;
import java.io.*;
public class Something
extends SomethingElse
implements AnotherThing
{
public static final String
SOME_NAME = "SomeValue";
private int _var;
}
Run Code Online (Sandbox Code Playgroud)
如您所见,遵循这些标准需要输入大量空格.有没有办法在Eclipse中轻松完成?
Sri*_*asu 10
这不是一个好的做法,但你可以使用它
在eclipse中创建模板 Window -> Preferences -> Java -> Editor -> Templates -> New...
Name : 1
Pattern :${cursor}<give one space>
Run Code Online (Sandbox Code Playgroud)
-
Name :2
Pattern :${cursor}<give two space>
Run Code Online (Sandbox Code Playgroud)
.
.
.
Name : 26
Pattern :${cursor}<give 26 space>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
730 次 |
| 最近记录: |