Regarding the first situation, you may try using Surround with (ctrl-alt-T)
and choose "{ }" (you may use 'a' as mnemonic). However, we'll think about
better behaviour in the described case.

Regarding the second problem (with pressing enter after '{' in an already
closed block), I cannot reproduce it. It should work correctly in this case.
Could you send us an example where this problem is reproducable please?

Best regards,
Valentin Kipiatkov
-----------------------------------------------------------
 IntelliJ Software, http://www.intellij.com/
 "Develop with pleasure"
-----------------------------------------------------------

----- Original Message -----
From: "Edwin Delsman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 12:32 PM
Subject: [Eap-list] Suggestions for improving auto { }


> I'm trying out IntelliJ and I've become very enthousiastic about it's
merits
> in a very short time. However, there are some small inconveniences with
> auto-blocks when editing the following existing code (though you won't
hear
> me arguing to turn the feature off!):
>
>     if (condition)
>         foo();
>
> If I want to add some extra statements in the if clause, I open a block
> behind the if. IntelliJ than produces this (effectively removing the foo()
> from the controlled statement!):
>
>     if (condition) {
>         |
>     }
>         foo(); // foo placed outside the block: not as intended
>
> It would be nice to have intelliJ keep the foo() inside the block. The
same
> applies to other places, such as after an else clause. A similar thing
> happens when editing:
>
>     if (condition) {
>         foo1();
>         foo2();
>     }
>
> When I need to add a statement before foo1() I'm accustomed to position
the
> caret atfer the if () { and press Enter there. However, I then get a
similar
> problem:
>
>     if (condition) {
>         |
>     }
>         foo1(); // code placed outside the block: not as intended
>         foo2();
>     } // unmatched closing brace
>
> It would be nice if IntelliJ could detect that the block is already closed
> and omits inserting the closing brace.
>
> Greetings,
> Edwin Delsman
>
>
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-list


_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to