Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top