2011-12-04 92 views
1

比方说,我有一些代码,看起来像这样:代码样式与IntelliJ IDEA的

public abstract class 
    ResourceDownloaderBaseImpl 
    implements ResourceDownloader { 

    public Object 
     getProperty(
      String name) 

      throws ResourceDownloaderException { 
    .... 

和一堆其他的。所以它把签名

public abstract class ResourceDownloaderBaseImpl implements ResourceDownloader { 

    public Object getProperty(String name) throws ResourceDownloaderException { 
    ... 

有没有办法调整代码reformating功能:当我按下按Ctrl + Alt键 + 大号在IntelliJ IDEA的它不格式化成单行这样到一条线上?

回答

3

查看Project Settings中的Code Style部分,您可以在其中指定几乎所有内容。 更确切地说,下看Code Style - Wrapping and bracing,看看是否keep line breaks during reformatting

enter image description here

切换