[英]Code Styling with Intellij IDEA
假設我的代碼如下所示:
public abstract class
ResourceDownloaderBaseImpl
implements ResourceDownloader {
public Object
getProperty(
String name)
throws ResourceDownloaderException {
....
和其他一堆。 當我在Intellij IDEA中按Ctrl + Alt + L時 ,它不會像這樣將其格式化為單行:
public abstract class ResourceDownloaderBaseImpl implements ResourceDownloader {
public Object getProperty(String name) throws ResourceDownloaderException {
...
有沒有辦法調整代碼重新格式化功能,以便將簽名放在一行?
查看Code Style
Project Settings
中的Code Style
部分,您可以在其中指定幾乎所有內容。 更准確地說,在Code Style
- Wrapping and bracing
查看Wrapping and bracing
並查看是否keep line breaks during reformatting
打開了keep line breaks during reformatting
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.