+1
I would generalize it to keep any one-line block as one line (whether
surrounded by braces or not). For short statements (esp. with many in a
row), I sometimes even put more than one statement on one line. E.g.:
if (condition_A) { error = true; return null; }
if (condition_B) { error = true; return null; }
if (condition_C) { error = false; return "foo"; }
--
Alex Dommasch
Igor Karpov wrote:
> Sorry, just repeating the old feature request as we don't have the FR system
> yet.
>
> It would be nice to have improvements to code style settings, as the particular
> style is somewhat governed by lots of rules and not of them can currently be
> specified in IDEA.
> Code style support is important because this is what exactly makes the
> developer feel at home.
>
> E.g. for 1-line statements - if someone has a simple getter/setter like
> public int getValue() { return value; }
> IDEA will reformat it to 4-line method (provided "next line" for { is
> specified). In this case several getters/setters will eat up the entire screen
> space.
>
> What I suggest is having different settings for "simple" (1-operator) methods,
> particularly getters/setters and more complex ones.
>
>
> -----Original Message-----
> From: "Avi Rosenschein" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Date: Fri, 2 Aug 2002 15:19:53 +0300
> Subject: correct indenting of one line control statements
>
>
>>Hi,
>>This has bothered me for a long time, and I haven't come across any
>>complaints here.
>>After typing the beginning of a control statement (for, if, while), if I
>>don't type an opening brace "{", then the next line will not be indented as
>>it should be for a one line statement.
>>
>>I've grown into the habit (because of this problem in IDEA) of always
>>including braces in control statements, but there really is no need. It
>>would be much simpler to type a classic one liner instead of
>>having to type an opening brace, one line, and then move around with the
>>arrows - because IDEA automatically inserts the closing brace and you can't
>>just type over it.
>>
>>Thanks,
>>Avi
>>
>>
>>_______________________________________________
>>Eap-features mailing list
>>[EMAIL PROTECTED]
>>http://lists.jetbrains.com/mailman/listinfo/eap-features
>>
>
>
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features