groovy / groovy-eclipse

Eclipse Groovy Development Tools
655 stars 192 forks source link

Formatter does not inherit whitespaces settings from Java fromatter #941

Open abialas opened 5 years ago

abialas commented 5 years ago

I have Java formatter settings which should format the following:

def dummyMethod() {
    def doIt=false
    if(doIt) {
        return null
    }
}

into:

def dummyMethod() {
    def doIt = false
    if (doIt) {
        return null
    }
}

However, when I run format on the groovy file it does not add the additional spaces defined by formatter. It works perfectly for Java files.

mojo2012 commented 4 years ago

Also multiple whitespaces are not collapsed into one space:

final def userClone =   (UserData) user.clone()
                      ^^