Formatting

When I press CTRL + ALT + F, ReSharper beautifully formats the code, but
it also messes it a bit up. I know this will be fixed in later versions,
but just so you know it:

I use comments to mark up what almost all closing brackets are closing, so
the code gets easier to read. If a certain method, for loop or similar is
over 10 lines or so, I do like this:

public void DoStuff() {
....
} // DoStruff

When ReSharper formats my code, it places the '// DoStuff' comment two
lines
beneath the ending bracket. Could you please make it not do this in future
versions? And could maybe even ReSharper help inserting such comments
through
some kind of shortcut?

Also, it would be great to have control over whether 'else' is supposed to
be on the same line as the closing '}' of the if, or on a new line. E.g.:

if (stuff) {
...
} else {
...
}

or:

if (stuff) {
...
}
else {
...
}

Other than that, the formatting works pretty brilliant already. :)

--
Asbjørn Ulsberg -=|=- asbjornu@hotmail.com
"He's a loathsome offensive brute, yet I can't look away"

2 comments
Comment actions Permalink

Hi Asbjørn,

Thank you for the report.

>When ReSharper formats my code, it places the '// DoStuff' comment two
>lines
>beneath the ending bracket.

I think this will be fixed in the nearest build.

Could you please make it not do this in future versions? And could maybe

even ReSharper help inserting such comments
>through some kind of shortcut?

This should be discussed. Please could you post the feature request to our
tracker?

>Also, it would be great to have control over whether 'else' is supposed to
>be on the same line as the closing '}' of the if, or on a new line. E.g.:

There is the internal option for this case, but it is not alterable through
GUI now.
The complete code style GUI will be available shortly.
Look forward for the new builds!

--
---
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Asbjørn Ulsberg" <asbjornu@hotmail.com> wrote in message
news:opr68on9wumranrn@quark...
When I press CTRL + ALT + F, ReSharper beautifully formats the code, but
it also messes it a bit up. I know this will be fixed in later versions,
but just so you know it:

I use comments to mark up what almost all closing brackets are closing, so
the code gets easier to read. If a certain method, for loop or similar is
over 10 lines or so, I do like this:

public void DoStuff() {
....
} // DoStruff

When ReSharper formats my code, it places the '// DoStuff' comment two
lines
beneath the ending bracket. Could you please make it not do this in future
versions? And could maybe even ReSharper help inserting such comments
through
some kind of shortcut?

Also, it would be great to have control over whether 'else' is supposed to
be on the same line as the closing '}' of the if, or on a new line. E.g.:

if (stuff) {
...
} else {
...
}

or:

if (stuff) {
...
}
else {
...
}

Other than that, the formatting works pretty brilliant already. :)

--
Asbjørn Ulsberg -=|=- asbjornu@hotmail.com
"He's a loathsome offensive brute, yet I can't look away"


0
Comment actions Permalink

On Fri, 30 Apr 2004 10:34:42 +0400, Eugene Pasynkov (JetBrains, Inc.)
<Eugene.Pasynkov@jetbrains.com> wrote:

I think this will be fixed in the nearest build.


Great.

This should be discussed. Please could you post the feature request to
our tracker?


Done!

There is the internal option for this case, but it is not alterable
through GUI now. The complete code style GUI will be available shortly.
Look forward for the new builds!


I will, thanks!

--
Asbjørn Ulsberg -=|=- asbjornu@hotmail.com
"He's a loathsome offensive brute, yet I can't look away"

0

Please sign in to leave a comment.