Title: RE: [Eap-list] Suggestions for improving auto { }

This sounds neat, but it's tricky.  What if I have an existing line:

a = 10;

...and I want to add a brand new if statement in front of it, but I don't want the assignment in the braces.  I'm just adding an entirely new if statement:

if(true) {
        blah = "blah"
}
a = 10;

While I'm typing "if(true) {", you would not be able to distinguish between a line which I wanted to be in the condition block or not in the condition block, unless you based it on how long the if statement was there (an old if statement encloses the next line in braces, a brand new if statement doesn't).

> -----Original Message-----
> From: Valentin Kipiatkov [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 14, 2002 6:30 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Eap-list] Suggestions for improving auto { }
>
>
> 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
>

The information contained in this e-mail including any attachments may constitute Corvis Corporation Proprietary Information that is subject to Non-Disclosure Agreement and cannot be disclosed to any other party without the express consent of  Corvis Corporation.

If you are neither the intended recipient of this e-mail nor responsible for delivering this e-mail to the intended recipient, note that any dissemination, distribution, copying, or retention of this e-mail is prohibited.

If you believe you have received this e-mail in error, we request that you notify the sender by return e-mail and then delete this e-mail  and any return e-mail immediately.

Reply via email to