It has nothing to do with the selection. Only the caret position makes the
difference. That is, your should not select anything in the editor to
perform this refactoring, just place the caret anywhere inside the
anonymous.
BTW, almost all IDEA's refactorings do not need any selection in the editor.
Only refactorings that obviously need some selection, require it (Extract
Method, Introduce Variable/Field).

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

----- Original Message -----
From: "Erb" <[EMAIL PROTECTED]>
To: "EAP" <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 10:16 PM
Subject: [Eap-list] Interesting refactoring feature


> I have the following field declaration in a class.
> If I start inside the ConnectionAdapter() and ctrl-W until everything
> from "ConnectionAdapter()" to the last "}" are selected, then "anonymous
> to inner"
> extracts the ConnectionAdapter.  But if I start inside the Runnable and
> use ctrl-W to select
> the exact same section, it extracts the Runnable!  A bit too
> intelligent, I think.  It should
> go by what is selected.
>
>
>
>          private final ConnectionListener _connectionListener = new
> ConnectionAdapter() {
>
>              private String _firm;
>              private String _user;
>
>              // Utility class to exit app on disconnect.
>              public void disconnected() {
>                  if (ConnectionManager.isLogicallyConnected()) // means
> dropped
>                      SwingUtilities.invokeLater(new Runnable() {
>
>                          public void run() {
>                              // This is a dropped connection.
>                              DialogCreator creator =
> DialogCreator.getCreator(null, DROPPED_MESSAGE,
>                                EXIT_TITLE,
>                                DialogCreator.ERROR_MESSAGE,
> DialogCreator.OK_ONLY_OPTION);
>                              WindowManager.showWindow(creator);
>                              shutdown(_firm, _user);
>                          }
>                      });
>              }
>          };
>
> --
>
> Erb
>
> ==============================================================
> "The only time I like in the morning is afternoon."
>      - Russell D. Cooper
>
> "If you do everything, then you're all done."
>      - Melissa F. Cooper
>
> "Most of you are familiar with the virtues of a programmer.
> There are three, of course: laziness, impatience, and hubris."
>      - Larry Wall
> ==============================================================
>
>
> _______________________________________________
> 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