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

Reply via email to