如何在Android Studio中使用{@code}包围所选代码注释?
例如:
/**
* Gets some object.
* @return The object or null if there isn't one.
*/
@Nullable
private Object getObject() {
return mObject;
}
很容易成为:
/**
* Gets some object.
* @return The object or {@code null} if there isn't one.
*/
@Nullable
private Object getObject() {
return mObject;
}
答案 0 :(得分:1)
希望这将成为Android Studio的未来功能。同时,可以创建自定义实时模板。
{@code $SELECTION$}
现在,您可以使用带有快捷方式的实时模板环绕,轻松地使用{@code }
包围所选评论。 (Windows/Linux上的ctrl+alt+j
)