I often use parentheses in if statements like this to visually group sets of items. It would be nice if IDEA wasn't quite so discriminating in this case.
Jason Boehle [EMAIL PROTECTED] -----Original Message----- From: Jonas Kvarnstr�m [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 3:57 PM To: IDEA Early Access Program Subject: Re: [Eap-list] BUG: small bug in Surround With On Tue, 2002-02-12 at 21:43, Jason Boehle wrote: > If I select the expression "b1 || b2", hit Ctrl+Alt+T, it works as > expected. If I select the expression "b1 || b2 || b3", hit Ctrl+Alt+T, > it works as expected. If I select the expression "b2 || b3", hit > Ctrl+Alt+T, I get no pop-up menu. Why? The parse tree for the expression is: or / \ / \ or b3 / \ / \ b1 b2 "b1 || b2 || b3" corresponds to a node in the tree. "b1 || b2" is also a node in the tree. But "b2 || b3" corresponds to two separate branches in the tree. It is not a valid subexpression. At least I imagine this is the reason, together with the fact that IDEA wants to present context-dependent alternatives depending on the expression or statement you're surrounding with something. For a less intelligent editor that viewed "surround with" simply as "add some text before and after whatever happens to be selected" this would not be a problem... _______________________________________________ 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
