문제

Let's say I have code that looks like this:

public abstract class
    ResourceDownloaderBaseImpl
    implements ResourceDownloader {

    public Object
       getProperty(
           String name)

            throws ResourceDownloaderException {
    ....   

And bunch of other. When I press Ctrl+Alt+L in Intellij IDEA it does not format it into single line like this:

public abstract class ResourceDownloaderBaseImpl implements ResourceDownloader {

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

Is there a way to adjust the code reformating feature so it puts the signatures onto a single line?

도움이 되었습니까?

해결책

Check out the Code Style section in your Project Settings where you can specify almost everything. More precisely, look under Code Style - Wrapping and bracing and see whether keep line breaks during reformattingis switched on

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top