allebb / netbeans-psr-formatting

NetBeans configuration settings for PSR 1&2
MIT License
150 stars 16 forks source link

Closure Braces Incorrectly Placed on New Line #6

Open zschuessler opened 8 years ago

zschuessler commented 8 years ago

This issue persists for both this config, and native Netbeans. Native Netbeans controls do not allow distinction between class method brackets and lone function closures. (So I'm not even sure this is fixable with a config file alone)

Current behavior:

function current_behavior()
{
    // code
}

Desired behavior:

function desired_behavior() {
    // code
}
allebb commented 8 years ago

Sorry for the late reply on this but as you're already aware, this cannot be achieved in NetBeans configuration as there is no distinction at present between class method braces and function braces and therefore even if I could add into the XML configuration NetBeans simply wouldn't be able to understand it/render the formatting as required.

I'll keep this open so that as soon as NetBeans does support this functionality I'll implement it!

I'm fairly sure that I saw that there was a FR open at Netbeans a couple of months ago (as I knew it was missing and was going to open a feature request) to enable this feature so hopefully we won't have to wait too long - With a little bit of luck the next version of Netbeans will have the ability to do this :+1: