Smart "Introduce ..."


Quite a few build numbers ago, it was possible to select
e.g. "Introduce variable" with no text selected and the
cursor somewhere in the middle of a more or less complex
expression.
In that case, IDEA offered me a selection of expressions
for which introducing a variable made sense and (I believe
contained the cursor position).
At some point, this behavior vanished; in such a situation
IDEA now marks and highlights the current line and either
offers to introduce a variable for that or - if that is
syntactically impossible - displays a message saying
"Cannot perform the refactoring..."

Was this change on purpose, or did the feature just fall
off? Or (slight hope) is the behavior configurable, and I
just didn't see the setting?

Regards,
Jens

3 comments
Comment actions Permalink

Hello Jens,

This was never a core IDEA feature. This behavior is provided by the SmartIntroduce
plugin.

JV> Quite a few build numbers ago, it was possible to select
JV> e.g. "Introduce variable" with no text selected and the
JV> cursor somewhere in the middle of a more or less complex
JV> expression.
JV> In that case, IDEA offered me a selection of expressions
JV> for which introducing a variable made sense and (I believe
JV> contained the cursor position).
JV> At some point, this behavior vanished; in such a situation
JV> IDEA now marks and highlights the current line and either
JV> offers to introduce a variable for that or - if that is
JV> syntactically impossible - displays a message saying
JV> "Cannot perform the refactoring..."
JV> Was this change on purpose, or did the feature just fall off? Or
JV> (slight hope) is the behavior configurable, and I just didn't see
JV> the setting?

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink


When reading the subject line of my post, I realized that
what I was describing was never part of the IDEA core
functionality but was in fact supplied by a plugin (which
I apparently failed to re-install at some point during
the EAP).
So, sorry for bothering you; back to developing with
pleasure...

Regards,
Jens

0
Comment actions Permalink

Don't worry, I once posted a very similar thing, but as a bug on the tracker,
because the same thing happened to me.

Jens Voß wrote:


When reading the subject line of my post, I realized that
what I was describing was never part of the IDEA core
functionality but was in fact supplied by a plugin (which
I apparently failed to re-install at some point during
the EAP).
So, sorry for bothering you; back to developing with
pleasure...

Regards,
Jens

0

Please sign in to leave a comment.