Advanced paste action

Hi All,
I have an idea to implement some sort of subj (actually the
implementation is almost done), and I need your opinion on its usability.
The issue is, that though it is a bad programming style, I've found myself
sometimes doing copy'n'paste. Probably that is because I'm a newbie in jet
brains:)
When pasting a piece of code, I'm quite annoyed by the necessity to move
the caret in the code pasted and correct wrong references and duplicate
variable declarations. That way the feature I'm thinking about is to make
IDEA analyze the code pasted and allow me to correct all the things
immediately after pasting. The UI is supposed to be like in rename wrong
reference intention, that is based on templates.
Personally I consider this feature more useful than for example SCR
11895, but again I need your feedback to make a final decision.

Evgueny


2 comments

I'd definately use this... see my SCR at
http://www.intellij.net/tracker/idea/viewSCR?publicId=10868, and the related
SCR http://www.intellij.net/tracker/idea/viewSCR?publicId=8380

N.

Evgueny Vigdorchik wrote:

Hi All,
I have an idea to implement some sort of subj (actually the
implementation is almost done), and I need your opinion on its
usability. The issue is, that though it is a bad programming style,
I've found myself sometimes doing copy'n'paste. Probably that is
because I'm a newbie in jet brains:)
When pasting a piece of code, I'm quite annoyed by the necessity
to move the caret in the code pasted and correct wrong references and
duplicate variable declarations. That way the feature I'm thinking
about is to make IDEA analyze the code pasted and allow me to correct
all the things immediately after pasting. The UI is supposed to be
like in rename wrong reference intention, that is based on templates.
Personally I consider this feature more useful than for example
SCR 11895, but again I need your feedback to make a final decision.

>

Evgueny



0

"Evgueny Vigdorchik" <ven@intellij.com> wrote in message
news:b9e2m4$21a$1@is.intellij.net...

Hi All,
I have an idea to implement some sort of subj (actually the
implementation is almost done), and I need your opinion on its usability.
The issue is, that though it is a bad programming style, I've found myself
sometimes doing copy'n'paste. Probably that is because I'm a newbie in jet
brains:)


Rape and paste a little and with due care and (possibly:-) you wont get
caught. Get hooked, rape and paste without discretion, and sooner or later a
monster bug will catch and eat you in a single mouthful :)

When pasting a piece of code, I'm quite annoyed by the necessity to move
the caret in the code pasted and correct wrong references and duplicate
variable declarations.
That way the feature I'm thinking about is to make
IDEA analyze the code pasted and allow me to correct all the things
immediately after pasting. The UI is supposed to be like in rename wrong
reference intention, that is based on templates.


What I noticed when doing rape and past coding:

1.
When I paste a bunch of code, usaually soome classes will be changed to
otheres. After pasting, I keep doing f2 and then choosing if I want to
mantain the class or change it to something other.

-> A quicker way of changing the imports in the pasted code would be useful.

2. Renaming of pasted duplicates.

3.











0

Please sign in to leave a comment.