Eclipse : edit code using drag & drop ?

P

patrick

After a few months of working with Eclipse, I'm almost 100%
happy with it, but the one feature i'm (still) missing is the ability
to edit source-code using drag & drop ...

Does anyone know if there's some way (maybe a plugin) to make
this possible ? (I've already googled on it, to no avail).
 
B

Bryce

L

Liz

After a few months of working with Eclipse, I'm almost 100%
happy with it, but the one feature i'm (still) missing is the ability
to edit source-code using drag & drop ...

Does anyone know if there's some way (maybe a plugin) to make
this possible ? (I've already googled on it, to no avail).

It is called cut/paste and it is just as fast.
 
P

patrick

After a few months of working with Eclipse, I'm almost 100%
I don't see why you need to edit source-code with drag & drop.
Could you explain?

I use the mouse to select a piece of code that needs to be replaced
(or copied). Then I must reach for the keyboard to hit ctrl + X.

It would be much more efficient if I just could drag the selected code
rightaway to its new position with the mouse (or copy it by holding
the ctrl-key).

I really don't understand that this feature is not supported by Eclipse,
lot's of text-, java- and html- ditors DO have this feature, it's nothing
special.
 
A

Andrew Thompson

I use the mouse to select a piece of code that needs to be replaced
(or copied). Then I must reach for the keyboard to hit ctrl + X.

'right click' 'cut|copy'

'left click destination' 'right click' 'paste'

HTH

BTW - I am curious. How do you get *new* code in the
editor without touching the keyboard? I suppose you
*could* always copy/paste it letter by letter.. or
keep a list of keywords open in another document..
(muttering, wanders off)
 
P

patrick

I use the mouse to select a piece of code that needs to be replaced
'right click' 'cut|copy'

'left click destination' 'right click' 'paste'

That is, in my opinion, not as handy/efficient
as just selecting and then dragging it.
 
Z

zoopy

I use the mouse to select a piece of code that needs to be replaced
(or copied). Then I must reach for the keyboard to hit ctrl + X.

It would be much more efficient if I just could drag the selected code
rightaway to its new position with the mouse (or copy it by holding
the ctrl-key).

I really don't understand that this feature is not supported by Eclipse,
lot's of text-, java- and html- ditors DO have this feature, it's nothing
special.

In the outline view you can drag methods and fields, to reorder them, or drag them to another class
in the package explorer (copying or moving them). (Cut/copy/paste also works, of course)

In the package explorer you can drag files (i.e. Java classes or interfaces) from one package to
another (even to another project). All reference to those classes/interfaces will automatigically be
changed to the new package (wherever possible).

File a RFE/feature request at <https://bugs.eclipse.org/bugs/> if you require dragging code snippets
in the editor.

Regards,
Z.
 
J

Jim McMaster

It is called cut/paste and it is just as fast.

I respectfully disagree. I used drag/drop in JBuilder, and it is
better in some cases. In general,elect/left-click/drag/release is
faster than
select/right-click/left-click/left-click/right-click/left-click.

JBuilder is buggy and overall not as good as Eclipse, but this is one
feature I really miss.
 
B

Bryce

That is, in my opinion, not as handy/efficient
as just selecting and then dragging it.

not to me. The less I have to touch my mouse the better. I love
bookmarks because I can set them, then use shortcut keys to go back to
them.

Delphi has a cool feature where (I think) ctr-alt arrow up/down would
take you to the next/previous method in a class... And I just checked
in Eclipse, and it does in fact do the same thing... learn something
new everyday.
 
L

Liz

use right mouse button

I use the mouse to select a piece of code that needs to be replaced
(or copied). Then I must reach for the keyboard to hit ctrl + X.

It would be much more efficient if I just could drag the selected code
rightaway to its new position with the mouse (or copy it by holding
the ctrl-key).

I really don't understand that this feature is not supported by Eclipse,
lot's of text-, java- and html- ditors DO have this feature, it's nothing
special.
 
A

Andrew Thompson

The less I have to touch my mouse the better.

Given it is unavoidable to touch the keyboard,
I like Apps. that allow you to do *everything*
with the keyboard. If there is no 'keyboard
equivalent' to a mouse action, I am looking for
an alternative.
 
P

patrick

After a few months of working with Eclipse, I'm almost 100%
use right mouse button

That is, in my opinion, not as handy/efficient
as just selecting and then dragging it.
 
A

Andrew Thompson

That is, in my opinion, not as handy/efficient
as just selecting and then dragging it.

Had you ever considered that D'n'D is a concept
more in tune with children's paint programs than
an OO computer language?

Rather than D'n'D you should think 'refactor', as
reused code seems to beg the question as to whether
the code should be in a utility class.

Just a thought..
 
P

patrick

use right mouse button
Had you ever considered that D'n'D is a concept
more in tune with children's paint programs than
an OO computer language?

Yeah, yeah, bla, bla, 'real programmers don't use the mouse',
that is what you are trying to tell (teach) me, isn't it ?

Can't you just accept that some people like to use the
mouse for code-editing-purposes, even if you don't ?
 
B

Bryce

Yeah, yeah, bla, bla, 'real programmers don't use the mouse',
that is what you are trying to tell (teach) me, isn't it ?

Can't you just accept that some people like to use the
mouse for code-editing-purposes, even if you don't ?

Well, doesn't seem to be a lot of people coming to your defense, so I
would assume not many people need it. If it was a highly in demand
option, then you'd see it in more IDE's. I guess for most people,
<ctr>-x and <ctr>- v work fine for them
 
P

patrick

Can't you just accept that some people like to use the
Well, doesn't seem to be a lot of people coming to your defense, so I
would assume not many people need it. If it was a highly in demand
option, then you'd see it in more IDE's. I guess for most people,
<ctr>-x and <ctr>- v work fine for them.

You DO see this option in ALMOST EVERY text, html, source-code,
you-name-it editor, just not in Eclipse. That is just what surprises
me so much, because it's a VERY COMMON option for any GUI-based
editor.
 
A

Andrew Thompson

Yeah, yeah, bla, bla, 'real programmers don't use the mouse',
that is what you are trying to tell (teach) me, isn't it ?

No. You trimmed the real point that you
have been missing all along (grasshopper)..
"Rather than D'n'D you should think 'refactor', as
reused code seems to beg the question as to whether
the code should be in a utility class."

Stop thinking like a procedural programmer and
you will see the benefit of what I am saying,
...alternatively, continue whining about something
which is apparently of interest to no-one but you,
if you so wish..
 
R

Rogan Dawes

Andrew said:
No. You trimmed the real point that you
have been missing all along (grasshopper)..
"Rather than D'n'D you should think 'refactor', as
reused code seems to beg the question as to whether
the code should be in a utility class."

Actually, the DnD that he is referring to would be a move (Ctrl-X,
Ctrl-V) rather than a copy (Ctrl-C, Ctrl-V). So a refactoring argument
is out of place here ;-)

Rogan
 
L

Liz

Rogan Dawes said:
Actually, the DnD that he is referring to would be a move (Ctrl-X,
Ctrl-V) rather than a copy (Ctrl-C, Ctrl-V). So a refactoring argument
is out of place here ;-)

Rogan

When eclipse does a 'sort methods alphabetically' how does it
decide which comments to move with each of the methods?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top