Extract Method not honoring method declararation brace placement code style setting?

I have, in my code style settings, a brace placement setting of "Next line" for "Method declaration".

When I Extract Method on something like:

System.currentTimeMillis ()

I get a method that looks like this:

private static long getTime (){
return System.currentTimeMillis();
}

That's not in line with the code style setting I've specified. I have confirmed that code style setting is correct by selecting the method and use Reformat Code...; afterwards, the method is reformatted to:

private static long getTime ()
{
return System.currentTimeMillis ();
}

Now, that is I would expect Extract Method to produce.

This seems like a bug, but it also seems like such an obvious problem I'm wondering if I'm missing something somehow. Is it a reasonable expectation that Extract Method will honor code style settings?

3 comments

> This seems like a bug, ..

Already posted:
"Extract Method doesn't respect my codestyle choices."
http://www.intellij.net/tracker/idea/viewSCR?publicId=19919

, "but planned for None"

Alain

0

"but planned for None"


I hope, None will be released soon, because there are a lot of issues
planned for None :)

Tom

0

:D :D

Thomas Singer wrote:
>> "but planned for None"


I hope, None will be released soon, because there are a lot of issues
planned for None :)

Tom

0

Please sign in to leave a comment.